Files
qrank/templates/user.html

18 lines
606 B
HTML

{{define "content"}}
<div class="card">
<h2>@{{.User.Username}}</h2>
<p class="small">Joined {{fmtTime .User.CreatedAt}}</p>
<p>Game score {{.User.GameCount}}/{{.User.WinCount}}/{{.User.LossCount}}</p>
<p>Current Elo {{.User.Elo}}</p>
{{if .Own}}
<hr>
<h3>Update your profile</h3>
<form method="POST" action="/me">
<label class="label">Username</label>
<input class="input" name="username" value="{{.User.Username}}" required>
<div style="height:8px"></div>
<button class="btn btn-primary">Save</button>
</form>
{{end}}
</div>
{{end}}