-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
44 lines (35 loc) · 1.5 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0;" />
<meta charset="utf-8" />
<title>Dice Roller</title>
<link rel="stylesheet" href="css/index.css" />
<link rel="icon" href="icons/icon.png" />
<link rel="icon" href="icons/icon.svg" />
</head>
<body onload="diceDOMManager.setButtonStatus(); diceDOMManager.updateDisplay(); getCurrentTime();">
<p id="time-bar">
<span id="date"></span> <span id="time"></span>
</p>
<h1><img id="die-icon" src="icons/icon.svg">Dice Roller</h1>
<p>This dice roller supports rolling 1~6 fair six-sided dice.</p>
<div id="dice-holder"><div class="die">1</div></div>
<div id="status">
<p><b>Sum:</b> <br><span id="sum">6</span></p>
<p><b>Lucky Rolls:</b> <br><span id="lucky-rolls">0</span> time(s)</p>
<br>
<button id="add" onclick="diceDOMManager.addDie();" accesskey="a"><b>+</b> <u>A</u>dd</button>
<button id="remove" onclick="diceDOMManager.removeLastDie();" accesskey="m"><b>-</b> Re<u>m</u>ove</button>
<button id="roll" onclick="diceDOMManager.rollDice();" accesskey="r" autofocus><b>↻</b> <u>R</u>oll</button>
</div>
<p>A roll is <i>lucky</i> if: </p>
<ol>
<li>Rolling a <b>6</b> if rolling a single die.</li>
<li>Rolling <b>all the same number</b> if rolling 2~6 dice.</li>
</ol>
<p><b><a id="source-code-on-github" href="https://github.com/ytx21cn/dice-roller-demo" target="_blank">→ Source Code on GitHub</a></b></p>
</body>
<script src="js/dice.js"></script>
<script src="js/time.js"></script>
</html>