-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
51 lines (44 loc) · 1.48 KB
/
index.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
51
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Leaderboard</title>
<link rel="stylesheet" href="css/leaderboard.css">
</head>
<body>
<script type="text/x-handlebars">
<div id="outer">
{{outlet}}
</div>
</script>
<script type="text/x-handlebars" data-template-name="leaderboard">
<div class="leaderboard">
{{#each player in players}}
{{render 'player' player}}
{{/each}}
</div>
{{render 'selected_player'}}
</script>
<script type="text/x-handlebars" data-template-name="player">
<div {{bind-attr class=":player selected"}} {{action 'select'}}>
<span class="name">{{name}}</span>
<span class="score">{{score}}</span>
</div>
</script>
<script type="text/x-handlebars" data-template-name="selected_player">
{{#if model}}
<div class="details">
<div class="name">{{model.name}}</div>
<input type="button" {{action 'addPoints'}} value="Give 5 points" />
</div>
{{else}}
<div class="none">Click a player to select</div>
{{/if}}
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ember.js/1.1.2/ember.min.js"></script>
<script src="http://builds.emberjs.com/tags/v1.0.0-beta.3/ember-data.prod.js"></script>
<script src="js/app.js"></script>
</body>
</html>