-
Notifications
You must be signed in to change notification settings - Fork 0
/
leaderboard.html
50 lines (44 loc) · 1.32 KB
/
leaderboard.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<head>
<title>leaderboard v2.0</title>
</head>
<body>
{{> loginButtons}}
<br />
{{> addPlayerForm}}
{{> leaderboard}}
<br />
</body>
<template name="leaderboard">
<div id="leaders">
<ul>
{{#each player}}
<li class="{{selectedClass}}">{{name}} - {{score}}</li>
{{/each}}
<div id="stats">
Total players: {{totalPlayers}}
<br />
Selected Player: {{marked.name}} - {{marked._id}} - {{marked.score}}
</div>
</ul>
{{#if currentUser}}
<div id="controls">
<input type="button" value="↑ increase score" id="increment" class="btn" />
<input type="button" value="↓ decrease score" id="decrement" class="btn" />
<input type="button" value="🚷 delete player" id="deletePlayer" class="btn" />
</div>
{{/if}}
</div>
</template>
<template name="addPlayerForm">
{{#if currentUser}}
<p>You are signed in.</p>
<div class="form-style">
<form>
<input type="text" id="playerName" />
<input type="submit" value="Add Player" class="btn" />
</form>
</div>
{{else}}
<p>You are not signed in.</p>
{{/if}}
</template>