-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
286 lines (286 loc) · 12.8 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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" href="/favicon.ico">
<title>Ryan's Game Score</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
</head>
<body>
<noscript>
<strong>We're sorry but GameScore doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<app-menu></app-menu>
<div id="appcontainer"></div>
<template id="app-menu-template">
<ul class="list-group list-group-horizontal d-flex justify-content-center">
<li data-comp="score-bowling" class="list-group-item">Bowling</li>
<li data-comp="score-mexican-train" class="list-group-item">Mexican Train</li>
</ul>
</template>
<template id="score-bowling-template">
<div class="container-fluid">
<form>
<div class="form-group row">
<label for="numplayers" class="col-sm-2 col-form-label"># Players</label>
<div class="col-sm-5">
<select id="numplayers" name="numplayers" class="custom-select">
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
<option value="4">Four</option>
<option value="5">Five</option>
<option value="6">Six</option>
</select>
</div>
<div class="col-sm-5">
<button id="resetButton" type="button" class="btn btn-warning">Reset Game</button>
</div>
</div>
</form>
<table class="table table-bordered table-striped">
<thead>
<tr class="table-secondary">
<th>Frame</th>
</tr>
</thead>
<tbody>
<tr>
<th>1</th>
</tr>
<tr>
<th>2</th>
</tr>
<tr>
<th>3</th>
</tr>
<tr>
<th>4</th>
</tr>
<tr>
<th>5</th>
</tr>
<tr>
<th>6</th>
</tr>
<tr>
<th>7</th>
</tr>
<tr>
<th>8</th>
</tr>
<tr>
<th>9</th>
</tr>
<tr>
<th>10</th>
</tr>
</tbody>
<tfoot>
<tr class="table-secondary text-right">
<th>Total</th>
</tr>
</tfoot>
</table>
</div>
</template>
<template id="bowling-score-modal">
<div class="modal fade bd-example-modal-lg" id="scoreModal" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="scoreModalTitle" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="scoreModalTitle">Enter Score for <span id="scoreTitle"></span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<div class="m-auto">
<div class="input-group">
<div class="input-group-prepend">
<label class="input-group-text" for="score1">First Roll </label>
</div>
<select class="custom-select" id="score1">
<option selected>Choose...</option>
<option value="0">Zero</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
<option value="4">Four</option>
<option value="5">Five</option>
<option value="6">Six</option>
<option value="7">Seven</option>
<option value="8">Eight</option>
<option value="9">Nine</option>
<option value="X">X - Strike!</option>
</select>
</div>
</div>
<div class="m-auto">
<div class="input-group">
<div class="input-group-prepend">
<label class="input-group-text" for="score2">Second Roll</label>
</div>
<select class="custom-select" id="score2">
<option selected>Choose...</option>
<option value="0">Zero</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
<option value="4">Four</option>
<option value="5">Five</option>
<option value="6">Six</option>
<option value="7">Seven</option>
<option value="8">Eight</option>
<option value="9">Nine</option>
<option value="/">/ - Spare!</option>
</select>
</div>
</div>
<div class="m-auto" id="extraframe" style="display:none;">
<div class="input-group">
<div class="input-group-prepend">
<label class="input-group-text" for="score3">Extra Frame</label>
</div>
<select class="custom-select" id="score3">
<option selected>Choose...</option>
<option value="0">Zero</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
<option value="4">Four</option>
<option value="5">Five</option>
<option value="6">Six</option>
<option value="7">Seven</option>
<option value="8">Eight</option>
<option value="9">Nine</option>
<option value="X">X - Strike!</option>
</select>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" id="saveButton">Save changes</button>
</div>
</div>
</div>
</div>
</template>
<template id="score-mexican-train-template">
<div class="container-fluid">
<form>
<div class="form-group row">
<label for="numplayers" class="col-sm-2 col-form-label"># Players</label>
<div class="col-sm-5">
<select id="numplayers" name="numplayers" class="custom-select">
<option value="2">Two</option>
<option value="3">Three</option>
<option value="4">Four</option>
<option value="5">Five</option>
<option value="6">Six</option>
</select>
</div>
<div class="col-sm-5">
<button id="resetButton" type="button" class="btn btn-warning">Reset Game</button>
</div>
</div>
</form>
<table class="table table-bordered table-striped">
<thead>
<tr class="table-secondary">
<th>Player</th>
<th class="text-center">Score (tap # to score)</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</template>
<template id="train-score-modal">
<div class="modal fade bd-example-modal-lg" id="scoreModal" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="scoreModalTitle" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="scoreModalTitle">Enter Score for <span id="scoreTitle"></span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row mb-4">
<div class="col">
<p id="scoreMath" class="text-monospace"></p>
</div>
</div>
<div class="row">
<div class="col-2">
<button type="button" data-value="1" class="btn score-btn btn-secondary btn-block">1</button>
</div>
<div class="col-2">
<button type="button" data-value="2" class="btn score-btn btn-secondary btn-block">2</button>
</div>
<div class="col-2">
<button type="button" data-value="3" class="btn score-btn btn-secondary btn-block">3</button>
</div>
<div class="col-2">
<button type="button" data-value="4" class="btn score-btn btn-secondary btn-block">4</button>
</div>
<div class="col-2">
<button type="button" data-value="5" class="btn score-btn btn-secondary btn-block">5</button>
</div>
<div class="col-2">
<button type="button" data-value="6" class="btn score-btn btn-secondary btn-block">6</button>
</div>
</div>
<div class="row mt-2">
<div class="col-2">
<button type="button" data-value="7" class="btn score-btn btn-secondary btn-block">7</button>
</div>
<div class="col-2">
<button type="button" data-value="8" class="btn score-btn btn-secondary btn-block">8</button>
</div>
<div class="col-2">
<button type="button" data-value="9" class="btn score-btn btn-secondary btn-block">9</button>
</div>
<div class="col-2">
<button type="button" data-value="10" class="btn score-btn btn-secondary btn-block">10</button>
</div>
<div class="col-2">
<button type="button" data-value="11" class="btn score-btn btn-secondary btn-block">11</button>
</div>
<div class="col-2">
<button type="button" data-value="12" class="btn score-btn btn-secondary btn-block">12</button>
</div>
</div>
<div class="row mt-2 justify-content-center">
<div class="col-2">
<button type="button" data-value="50" class="btn score-btn btn-secondary btn-block">50</button>
</div>
<div class="col-6">
<button type="button" data-value="reset" class="btn score-btn btn-warning btn-block">Reset</button>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" id="saveButton">Save changes</button>
</div>
</div>
</div>
</div>
</template>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script type="module" src="./bundle.js"></script>
</body>
</html>