{{ define "content" }}

<h1>hey {{ .Profile.DisplayName }}</h1>
<br>
<form action="/profile" method="POST" class="form" enctype="multipart/form-data">
  <label for="type">avatar.</label>
  <input type="file" name="avatar">

  <label for="type">location.</label>
  <input type="text" name="location" value="{{ .Profile.Location }}">

  <label for="type">website.</label>
  <input type="text" name="website" value="{{ .Profile.Website }}">

  <label for="type">bio.</label>
  <textarea name="bio">{{ .Profile.Bio }}</textarea>
  
  <input type="submit" value="update">

  {{ if .FormError }}
  {{ if (len .FormError.Errors) }}
  {{ range $error := .FormError.Errors }}
  <div class="error">{{ $error }}</div>
  {{ end }}
  {{ end }}
  {{ end }}
</form>

{{ end }}