{{define "profile.html"}}
{{template "shell-start" .}}
<header class="page-head"><div><p class="eyebrow">ACCOUNT</p><h1>Your profile</h1><p>Manage your profile photo shown across the team workspace.</p></div></header>
{{template "notice" .}}
<section class="card profile-card">
  <div class="profile-avatar">{{if .User.AvatarURL}}<img src="{{.User.AvatarURL}}" alt="Profile photo">{{else}}<span>{{initial .User.DisplayName}}</span>{{end}}</div>
  <div><p class="eyebrow">{{.User.Role}}</p><h2>{{.User.DisplayName}}</h2><p>@{{.User.Username}}{{if .User.Email}} · {{.User.Email}}{{end}}</p></div>
  <form method="post" action="/profile/avatar" enctype="multipart/form-data" class="profile-upload"><input type="hidden" name="csrf" value="{{.CSRF}}"><label>Profile photo<input type="file" name="avatar" accept="image/jpeg,image/png,image/webp" required></label><small>JPG, PNG, or WebP up to 2MB.</small><button class="button primary" type="submit">Upload photo</button></form>
</section>
<section class="card profile-account-actions"><p class="eyebrow">SESSION</p><h2>Account access</h2><p>Sign out of this workspace on this device.</p><form method="post" action="/logout"><input type="hidden" name="csrf" value="{{.CSRF}}"><button class="button secondary" type="submit">Sign out</button></form></section>
{{template "shell-end" .}}
{{end}}
