-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
174 lines (126 loc) · 4.43 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="assets/css/styles.css">
<title>Tony's Casino</title>
</head>
<body>
<div id="toolbar">
<button onclick="displayPageWrapper('match-information');">
<img src="assets/images/icon_matchInformation.png">
</button>
<br />
<button onclick="displayPageWrapper('betting');">
<img src="assets/images/icon_betting.png">
</button>
<br />
<button onclick="displayPageWrapper('registration');">
<img src="assets/images/icon_registration.png">
</button>
<button onclick="displayPageWrapper('leaderboard'); displayLeaderboard();">
<img src="assets/images/icon_leaderboard.png">
</button>
</div>
<div id="home" class="page-wrapper">
<h2>Welcome</h2>
<p>
Welcome to Tony's Casino.
</p>
<p>
Start by navigating with the taskbar.
</p>
<p>
<button onclick="eraseLocalStorageDatabase();">Erase All Data</button>
</p>
</div>
<div id="match-information" class="page-wrapper">
<h2>Match Information</h2>
<p>
<div class="label">Event</div>
<input id="match-information-event" type="text">
<br />
<div class="label">Type</div>
<input id="match-information-type" type="text">
<br />
<div class="label">Number</div>
<input id="match-information-number" type="number">
</p>
<p>
<button onclick="registerMatch();">Register Match</button>
</p>
<p>
<div class="label">Blue Team</div>
<input id="match-information-b1" type="number">
<input id="match-information-b2" type="number">
<input id="match-information-b3" type="number">
<br />
<div class="label">Red Team</div>
<input id="match-information-r1" type="number">
<input id="match-information-r2" type="number">
<input id="match-information-r3" type="number">
</p>
<p>
<button class="blue-alliance-button" onclick="addMatchWinner('b');">Blue Alliance Won</button>
<button class="red-alliance-button" onclick="addMatchWinner('r');">Red Alliance Won</button>
</p>
</div>
<div id="betting" class="page-wrapper">
<h2>Betting</h2>
<p>
<div class="label">User ID</div>
<input id="betting-user-id" type="number">
<br />
<div class="label">Password</div>
<input id="betting-password" type="password">
<br />
<div class="label">Bet Amount</div>
<input id="betting-amount" type="number">
</p>
<p>
<button class="blue-alliance-button" onclick="betAlliance('b');">Bet Blue Alliance</button>
<button class="red-alliance-button" onclick="betAlliance('r');">Bet Red Alliance</button>
</p>
</div>
<div id="registration" class="page-wrapper">
<h2>User Registration</h2>
<p>
<div class="label">User ID</div>
<input id="registration-user-id" type="number">
<br />
<div class="label">Password</div>
<input id="registration-password" type="password" placeholder="Don't re-use a password">
<br />
<div class="label">Verify Pswd</div>
<input id="registration-confirm-password" type="password">
</p>
<p>
<button onclick="registerAccount();">Create User</button>
</p>
</div>
<div id="leaderboard" class="page-wrapper">
<h2>Leaderboard</h2>
<table id="leaderboard-table">
<thead>
<tr>
<th>User ID</th>
<th>Score</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div id="status-box" class="init-fade">Status</div>
<script>const sha256 = require('js-sha256');</script>
<script src="funcs.js"></script>
<script src="dom.js"></script>
<script src="display.js"></script>
<script src="db.js"></script>
<script src="index.js"></script>
<script>
displayPageWrapper("home");
createLocalStorageDatabase();
</script>
</body>
</html>