-
Notifications
You must be signed in to change notification settings - Fork 39
/
app.html
384 lines (378 loc) · 12.6 KB
/
app.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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>TableChamp</title>
<link rel="stylesheet" type="text/css" charset="utf-8" media="screen, projection" href="css/tablechamp.css" />
<link href="https://fonts.googleapis.com/css?family=Libre+Franklin:400,600" rel="stylesheet">
</head>
<body>
<div class="message"></div>
<div class="loader"></div>
<div class="css-block"></div>
<div class="sidebar">
<div class="sidebar-container">
<header></header>
<div class="sidebar-menu"></div>
<div class="sidebar-body"></div>
</div>
</div>
<div class="app">
<header></header>
<div class="doubles" style="display: none;">
<div class="top-rankings"></div>
<div class="rankings"></div>
</div>
<div class="singles">
<div class="top-rankings"></div>
<div class="rankings"></div>
</div>
</div>
<div class="modal-backdrop show">
<div class="modal"></div>
</div>
<script src="js/firebase-key.js"></script>
<script src="js/jquery.min.js"></script>
<script src="js/i18n.js"></script>
<script src="js/templating.js"></script>
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
<script src="js/firebase.3.6.5.js"></script>
<script type="text/javascript" src="js/iris.min.js"></script>
<script type="text/javascript" src="js/source/tablechamp.js"></script>
<!-- JS Templates -->
<script type="text/html" id="appHeader">
<a href="#" class="c-button c-button--md c-button--primary right add-score"><%=addScore%></a>
<div class="name">
<span class="org"></span>
<span class="game-type"></span>
</div>
<div class="header-block">
<a href="#" class="singles-toggle ranking-toggle c-button c-button--md is-selected" tabindex="-1" data-view="singles"><%=singles%></a>
<a href="#" class="doubles-toggle ranking-toggle c-button c-button--md" data-view="doubles"><%=doubles%></a>
<a href="#" class="c-button c-button--link settings"><%=settings%></a>
<a href="#" class="c-button c-button--link logout"><%=logOut%></a>
</div>
</script>
<script type="text/html" id="loader">
<%=loading%>...
</script>
<script type="text/html" id="playersRow">
<tr class="player" data-id="<%=key%>">
<td><input type="text" value="<%=playerName%>" /></td>
<td>
<a href="#" class="player-status"><%=playerStatus%></a>
<a href="#" class="player-delete"><%=deleteLink%></a>
</td>
</tr>
</script>
<script type="text/html" id="rankingsRow">
<div class="ranking" data-id="<%=key%>" tabindex="0">
<span class="rank"><%=rank%></span>
<span class="name"><%=name%></span>
<div class="right">
<span class="movement"><%=lastMovement%></span>
<span class="points"><%=points%></span>
</div>
</div>
</script>
<script type="text/html" id="scoreAdd">
<div class="modal-header">
<a href="#" class="modal-close c-button">x</a>
<%=addScoreTitle%>
</div>
<form class="score-add">
<div class="modal-body">
<div class="t1">
<section>
<strong><%=teamOnePlayers%>:</strong>
<div class="players-select t1-players"></div>
<strong><%=teamOneScore%>:</strong>
<div class="score">
<div class="decrement">
<a href="#" data-team="1" data-amount="1" data-type="-">-1</a>
<a href="#" data-team="1" data-amount="5" data-type="-">-5</a>
<a href="#" data-team="1" data-amount="10" data-type="-">-10</a>
</div>
<div class="increment">
<a href="#" data-team="1" data-amount="1" data-type="+">+1</a>
<a href="#" data-team="1" data-amount="5" data-type="+">+5</a>
<a href="#" data-team="1" data-amount="10" data-type="+">+10</a>
</div>
<input type="text" class="t1-score" value="0"/>
</div>
</section>
</div>
<div class="t2">
<section>
<strong><%=teamTwoPlayers%>:</strong>
<div class="players-select t2-players"></div>
<strong><%=teamTwoScore%>:</strong>
<div class="score">
<div class="decrement">
<a href="#" data-team="2" data-amount="1" data-type="-">-1</a>
<a href="#" data-team="2" data-amount="5" data-type="-">-5</a>
<a href="#" data-team="2" data-amount="10" data-type="-">-10</a>
</div>
<div class="increment">
<a href="#" data-team="2" data-amount="1" data-type="+">+1</a>
<a href="#" data-team="2" data-amount="5" data-type="+">+5</a>
<a href="#" data-team="2" data-amount="10" data-type="+">+10</a>
</div>
<input type="text" class="t2-score" value="0"/>
</div>
</section>
</div>
</div>
<div class="modal-footer">
<button class="c-button c-button--md c-button--primary" type="submit"><%=addScoreButton%></button>
</div>
</form>
</script>
<script type="text/html" id="scorePlayers">
<a href="#" data-id="<%=key%>"><%=playerName%></a>
</script>
<script type="text/html" id="settingsBasics">
<section class="basics">
<form>
<div class="control">
<strong><%=orgName%>?</strong>
<input type="text" id="orgName" placeholder="<%=companyOrClub%>">
</div>
<div class="control">
<strong><%=whatGame%>?</strong>
<label for="game1"><input type="radio" name="gameType" id="game1" value="air-hockey"> <span><%=gameAirHockey%></span></label>
<label for="game2"><input type="radio" name="gameType" id="game2" value="billiards"> <span><%=gameBilliards%></span></label>
<label for="game3"><input type="radio" name="gameType" id="game3" value="foosball"> <span><%=gameFoosball%></span></label>
<label for="game4"><input type="radio" name="gameType" id="game4" value="shuffleboard"> <span><%=gameShuffleboard%></span></label>
<label for="game5"><input type="radio" name="gameType" id="game5" value="table-tennis"> <span><%=gameTableTennis%></span></label>
</div>
<div class="control">
<strong><%=language%></strong>
<select class="lang">
<option value="da">dansk</option>
<option value="de">Deutsche</option>
<option value="en">English</option>
<option value="es">Español</option>
<option value="fr">français</option>
<option value="hi">हिंदी</option>
<option value="id">bahasa Indonesia</option>
<option value="it">italiano</option>
<option value="ja">日本語</option>
<option value="ko">한국어</option>
<option value="pt">Português</option>
<option value="ru">русский</option>
<option value="sv">svenska</option>
<option value="zh">中文</option>
</select>
</div>
<div class="control">
<a href="#" class="next c-button c-button--md c-button--primary"><%=nextButton%></a>
</div>
</form>
</section>
</script>
<script type="text/html" id="settingsColors">
<section class="colors">
<form>
<div class="control c0">
<input type="text" class="color-picker" id="c0" value="<%=c0%>">
<span class="swatch" style="background: <%=c0%>;"></span>
<span><%=primaryText%></span>
</div>
<div class="control c1">
<input type="text" class="color-picker" id="c1" value="<%=c1%>">
<span class="swatch" style="background: <%=c1%>;"></span>
<span><%=highlightColor%></span>
</div>
<div class="control c2">
<input type="text" class="color-picker" id="c2" value="<%=c2%>">
<span class="swatch" style="background: <%=c2%>;"></span>
<span><%=secondaryText%></span>
</div>
<div class="control c3">
<input type="text" class="color-picker" id="c3" value="<%=c3%>">
<span class="swatch" style="background: <%=c3%>;"></span>
<span><%=secondaryBackground%></span>
</div>
<div class="control c4">
<input type="text" class="color-picker" id="c4" value="<%=c4%>">
<span class="swatch" style="background: <%=c4%>;"></span>
<span><%=primaryBackground%></span>
</div>
<div class="control c5">
<input type="text" class="color-picker" id="c5" value="<%=c5%>">
<span class="swatch" style="background: <%=c5%>;"></span>
<span><%=primaryButton%></span>
</div>
<div class="control">
<a href="#" class="next c-button c-button--md c-button--primary"><%=nextButton%></a>
<a href="#" class="reset-colors c-button c-button--link right"><%=resetColors%></a>
</div>
</form>
</section>
</script>
<script type="text/html" id="settingsPlayers">
<section class="players-add" style="display: none;">
<form class="players-add-form">
<p><%=onePerLine%>:</p>
<div class="control">
<textarea placeholder="<%=addPlayers%>"></textarea>
<button type="submit" class="c-button right"><%=addPlayers%></button>
</div>
</form>
</section>
<section class="players-view">
<form>
<div class="control">
<a href="#" class="players-add-link"><%=addPlayers%></a>
<table class="players-list"></table>
</div>
<div class="control">
<a href="#" class="next c-button c-button--md c-button--primary"><%=nextButton%></a>
</div>
</form>
</section>
</script>
<script type="text/html" id="settingsUsers">
<section class="users">
<form>
<div class="control">
<p><%=manageLogins%> <a href="" class="account-manage">FireBase</a></p>
</div>
</form>
</section>
</script>
<script type="text/html" id="sidebarHeader">
<h3><%=settings%></h3>
<a href="#" class="c-button sidebar-close">x</a>
</script>
<script type="text/html" id="sidebarMenu">
<div class="button-group">
<a href="#" class="sidebar-basics c-button active"><%=basics%></a>
<a href="#" class="sidebar-colors c-button"><%=colors%></a>
<a href="#" class="sidebar-players c-button"><%=players%></a>
<a href="#" class="sidebar-users c-button"><%=users%></a>
</div>
</script>
<script type="text/html" id="stats">
<div class="modal-header">
<a href="#" class="modal-close c-button">x</a>
<%=playerStats%><span><%=forText%> <%=name%></span>
</div>
<div class="modal-body">
<div class="stats-player-container"><table class="stats-player"></table></div>
<div class="stats-player-games">
<ul></ul>
</div>
</div>
</script>
<script type="text/html" id="statsPlayer">
<tr class="table-header">
<th></th>
<th><%=singles%></th>
<th><%=doubles%></th>
</tr>
<tr>
<th><%=gamesPlayed%></th>
<td><%=singles_played%></td>
<td><%=doubles_played%></td>
</tr>
<tr>
<th><%=gamesWon%></th>
<td><%=singles_won%></td>
<td><%=doubles_won%></td>
</tr>
<tr>
<th><%=gamesLost%></th>
<td><%=singles_lost%></td>
<td><%=doubles_lost%></td>
</tr>
<tr>
<th><%=ranking%></th>
<td><%=singles_rank%></td>
<td><%=doubles_rank%></td>
</tr>
</script>
<script type="text/html" id="statsPlayerGames">
<li><strong class="<%=status%>"><%=status%></strong> <%=t1%> (<%=t1Score%>) vs. <%=t2%> (<%=t2Score%>)</li>
</script>
<script type="text/html" id="cssBlock">
<style>
/* Color 0 */
.color-bg-0,
.modal { background: <%=c0%>; }
.color-tx-0,
.c-button:active,
.c-button:focus,
.c-button:hover,
.c-button.is-selected,
.ranking,
.top-rankings .movement,
.top-rankings .rank,
.top-rankings .ranking,
header .name,
.movement-positive { color: <%=c0%> }
/* Color 1 */
.c-button,
.color-tx-1 { color: <%=c1%>; }
.ranking:focus,
.ranking:hover { border-color: <%=c1%>; }
/* Color 2 */
.ranking:focus,
.ranking:hover { border-color: <%=c2%>; }
.ranking .movement,
.ranking .rank,
header .game-type,
.top-rankings .movement span { color: <%=c2%>; }
.title-bar { background: <%=c2%>; }
/* Color 3 */
.c-button,
.c-button:active,
.c-button:focus,
.c-button:hover,
.c-button.is-selected,
.c-button.is-selected:active,
.c-button.is-selected:focus,
.c-button.is-selected:hover,
.ranking { border-color: <%=c3%>; }
.c-button:active,
.c-button:focus,
.c-button:hover,
.c-button.is-selected,
.c-button.is-selected:active,
.c-button.is-selected:focus,
.c-button.is-selected:hover,
.top-rankings .ranking { background: <%=c3%>; }
/* Color 4 */
body { background: <%=c4%>; }
/* Links */
.c-button--link {
background: transparent;
border: transparent;
color: <%=c1%>;
}
.c-button--link:active,
.c-button--link:focus,
.c-button--link:hover {
background: transparent;
border: transparent;
color: <%=c0%>;
}
/* Primary */
.c-button--primary {
background: transparent;
border-color: <%=c5%>;
color: <%=c5%>;
}
.c-button--primary:active,
.c-button--primary:focus,
.c-button--primary:hover {
background: <%=c5%>;
border-color: <%=c5%>;
color: <%=c0%>;
text-decoration: none;
}
</style>
</script>
</body>
</html>