Made the elo system work. Colorized the leaderboard. Better data structure. Improved the HTML. Custom form system. Added Sessions
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
{{define "content"}}
|
||||
<div class="card">
|
||||
<h2>@{{.Viewed.Username}}</h2>
|
||||
<p class="small">Joined {{fmtTime .Viewed.CreatedAt}}</p>
|
||||
<p>Game score {{.Stats.Games}}/{{.Stats.Wins}}/{{.Stats.Losses}}</p>
|
||||
<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="{{.Viewed.Username}}" required>
|
||||
<input class="input" name="username" value="{{.User.Username}}" required>
|
||||
<div style="height:8px"></div>
|
||||
<button class="btn btn-primary">Save</button>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user