Made the elo system work. Colorized the leaderboard. Better data structure. Improved the HTML. Custom form system. Added Sessions
This commit is contained in:
@@ -12,25 +12,25 @@
|
||||
<div style="flex:1;min-width:180px">
|
||||
<h3>Team A</h3>
|
||||
<label class="label">Player A1</label>
|
||||
<input class="input" name="a1" {{if .a1}}value="{{.a1}}"{{else}}value="{{.CurrentUser.Username}}"{{end}} placeholder="username or email">
|
||||
<input class="input" name="a1" {{if (index .Form "a1")}}value="{{index .Form "a1"}}"{{else}}value="{{.CurrentUser.Username}}"{{end}} placeholder="username or email">
|
||||
<div style="height:6px"></div>
|
||||
<label class="label">Player A2 (optional)</label>
|
||||
<input class="input" name="a2" {{if .a2}}value="{{.a2}}"{{end}} placeholder="username or email">
|
||||
<input class="input" name="a2" value="{{index .Form "a2"}}" placeholder="username or email">
|
||||
<div style="height:12px"></div>
|
||||
<label class="label">Score A</label>
|
||||
<input class="input" type="number" name="scoreA" {{if .scoreA}}value="{{.scoreA}}"{{else}}value="0"{{end}} min="0" max="10" required>
|
||||
<input class="input" type="number" name="scoreA" value="{{index .Form "scoreA"}}" placeholder="0" min="0" max="10" required>
|
||||
</div>
|
||||
|
||||
<div style="flex:1;min-width:180px">
|
||||
<h3>Team B</h3>
|
||||
<label class="label">Player B1</label>
|
||||
<input class="input" name="b1" {{if .b1}}value="{{.b1}}"{{end}} placeholder="username or email">
|
||||
<input class="input" name="b1" value="{{index .Form "b1"}}" placeholder="username or email">
|
||||
<div style="height:6px"></div>
|
||||
<label class="label">Player B2 (optional)</label>
|
||||
<input class="input" name="b2" {{if .b2}}value="{{.b2}}"{{end}} placeholder="username or email">
|
||||
<input class="input" name="b2" value="{{index .Form "b2"}}" placeholder="username or email">
|
||||
<div style="height:12px"></div>
|
||||
<label class="label">Score B</label>
|
||||
<input class="input" type="number" name="scoreB" {{if .scoreB}}value="{{.scoreB}}"{{else}}value="0"{{end}} min="0" max="10" required>
|
||||
<input class="input" type="number" name="scoreB" value="{{index .Form "scoreB"}}" placeholder="0" min="0" max="10" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user