hatecomputers.club/templates/profile.html

30 lines
771 B
HTML
Raw Normal View History

2024-04-08 19:04:19 -04:00
{{ define "content" }}
<h1>hey {{ .Profile.DisplayName }}</h1>
<br>
<form action="/profile" method="POST" class="form" enctype="multipart/form-data">
<label for="type">avatar.</label>
2024-04-08 19:15:31 -04:00
<input type="file" name="avatar" required>
2024-04-08 19:04:19 -04:00
<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 }}