-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
66 lines (54 loc) · 1.68 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>An Ember dice roller</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<script type="text/x-handlebars" id="application">
<h1>Dice Roller</h1>
{{outlet}}
</script>
<script type="text/x-handlebars" id="index">
<p>
{{#link-to "roll"}}Start rolling dice!{{/link-to}}
</p>
</script>
<script type="text/x-handlebars" id="roll">
<p>
Enter your required dice roll below, for instance "3d6" will roll three six sided dice.
</p>
{{view Roller.DiceInputField valueBinding="rollString" action="rollDice" placeholder="Enter your dice roll, e.g. '3d6' here"}}
<button {{action "rollDice"}}>Roll Dice</button>
{{#if errors}}
<div class="errors">
{{errors}}
</div>
{{/if}}
<hr>
<h2>Results</h2>
{{#each content}}
{{render "roll_result" this}}
{{else}}
No results yet
{{/each}}
</script>
<!-- Results Template -->
<script type="text/x-handlebars" id='roll_result'>
<div class="roll">
<span class="roll-number">{{diceNumber}}</span>
<span class="roll-result" {{bind-attr style="proportion"}}>{{numberOfRolls}}</span>
</div>
</script>
<script src="js/libs/jquery-1.10.2.js"></script>
<script src="js/libs/handlebars-1.1.2.js"></script>
<script src="js/libs/ember-1.5.1.js"></script>
<script src="js/app.js"></script>
<script src="js/router.js"></script>
<!-- to activate the test runner, add the "?test" query string parameter -->
<script src="tests/runner.js"></script>
<script src="js/models/roll.js"></script>
<script src="js/controllers/roll_controller.js"></script>
</body>
</html>