-
Notifications
You must be signed in to change notification settings - Fork 0
/
bowlscore.html
230 lines (201 loc) · 6.11 KB
/
bowlscore.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
<head>
<title>bowlscore</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
{{> navs}}
{{> page}}
</body>
<template name="navs">
<div class="navbar navbar-fixed-top" style="position: static;">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".navbar-inverse-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="#">Bowling</a>
<div class="nav-collapse collapse navbar-inverse-collapse">
<ul class="nav">
<li><a href="#">Trainings</a></li>
<li><a href="#">Games</a></li>
<li><a href="#">Streams</a></li>
</ul>
<form class="navbar-search pull-left" action="">
<input type="text" class="search-query span2" placeholder="Search">
</form>
<ul class="nav pull-right" style="margin-top: 6px">
<li class="divider-vertical"></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
{{#if currentUser}}
Log out
{{else}}
Log in
{{/if}}
<b class="caret"></b></a>
<ul class="dropdown-menu">
<li>{{loginButtons}}</li>
</ul>
</li>
</ul>
</div><!-- /.nav-collapse -->
</div>
</div><!-- /navbar-inner -->
</div>
</template>
<template name="page">
{{#if showCreateDialog}}
{{> createDialog}}
{{/if}}
{{#if showEditDialog}}
{{> editDialog}}
{{/if}}
<div class="container">
{{> tgames}}
</div>
</template>
<template name="tgames">
<div style="margin-top: 12px">
{{#each games}}
{{> tgame}}
{{/each}}
{{> controls}}
</div>
</template>
<template name="controls">
<div class="well corner_text pull-left">
<div class="input-append">
<input type="text" class="title input-large">
<input type="button" class="btn btn-primary save" value="Add player" />
</div>
<div>
</template>
<template name="tgame">
<div class="well corner_text">
<div class="corner_text_label">
<i class="icon-edit editDlg"></i>
<i class="icon-remove del"></i>
{{name}}
</div>
<div style="margin-top: 12px">
<table class="game" cellspacing=0 cellpadding=0>
<tr class="gamerow">
{{#each gameframes}}
<td class="gamebox">
{{> tframe}}
</td>
{{/each}}
</tr>
</table>
</div>
</div>
</template>
<template name="tframe">
<table class="frame" cellspacing=0 cellpadding=0 >
<tr style="background-color: #E6E6E6;">
{{#if lastframe}}
<td class="totallast" colspan=3 >{{this.framenro}}</td>
{{else}}
<td class="total" colspan=2 >{{this.framenro}}</td>
{{/if}}
</tr>
<tr class="framerow" {{#if isEven}} bgcolor="#E6E6E6" {{/if}}>
{{#if lastframe}}
<td class="last-first" style="background-color: {{getColor}};">{{first}}</td>
<td class="last-second" style="background-color: {{getColorSecond}};">{{second}}</td>
<td class="last-third" style="background-color: {{getColorThird}};">{{third}}</td>
{{else}}
<td class="first" style="background-color: {{getColor}};">{{first}}</td>
<td class="second">{{second}}</td>
{{/if}}
</tr>
<tr {{#if isEven}} bgcolor="#E6E6E6" {{/if}}>
{{#if lastframe}}
<td class="totallast" colspan=3 >{{points}}</td>
{{else}}
<td class="total" colspan=2 >{{points}}</td>
{{/if}}
</tr>
</table>
</template>
<template name="createDialog">
<div class="mask"> </div>
<div class="modal">
<div class="modal-header">
<button type="button" class="close cancel">×</button>
<h3>Add player</h3>
</div>
<div class="modal-body">
{{#if error}}
<div class="alert alert-error">{{error}}</div>
{{/if}}
<label>Name</label>
<input type="text" class="title span5">
</div>
<div class="modal-footer">
<a href="#" class="btn cancel">Cancel</a>
<a href="#" class="btn btn-primary save">Add player</a>
</div>
</div>
</template>
<template name="editDialog">
<div class="mask"> </div>
<div class="modal">
<div class="modal-header">
<button type="button" class="close cancel">×</button>
<h3>Edit player</h3>
</div>
<div class="modal-body">
{{#if error}}
<div class="alert alert-error">{{error}}</div>
{{/if}}
<label>Name</label>
<input type="text" class="title span5" value="{{playerName}}">
</div>
<div class="modal-footer">
<a href="#" class="btn cancel">Cancel</a>
<a href="#" class="btn btn-primary save">Save</a>
</div>
</div>
</template>
<template name="editFrameDialog">
<div class="mask"> </div>
<div class="modal">
<div class="modal-header">
<button type="button" class="close cancel">×</button>
<h3>Edit frame</h3>
</div>
<div class="modal-body">
{{#if error}}
<div class="alert alert-error">{{error}}</div>
{{/if}}
<div class="btn-toolbar" style="margin: 0;">
<div class="btn-group">
<button class="btn btn-success">X</button>
<button class="btn">/</button>
</div>
<div class="btn-group">
<button class="btn">9</button>
<button class="btn">8</button>
<button class="btn">7</button>
<button class="btn">6</button>
<button class="btn">6</button>
<button class="btn">4</button>
<button class="btn">3</button>
<button class="btn">2</button>
<button class="btn">1</button>
</div>
<div class="btn-group">
<button class="btn btn-danger">-</button>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<a href="#" class="btn cancel">Cancel</a>
<a href="#" class="btn btn-primary save">Save</a>
</div>
</div>
</template>