generated from harvanchik/tailwind-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
487 lines (471 loc) · 19.1 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
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
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Football Game Card</title>
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes" />
<link rel="apple-touch-icon" href="./assets/img/app.png" />
<link rel="stylesheet" href="./assets/styles/styles.css" />
<!-- START: Scripts -->
<!-- AlpineJS -->
<script
defer
src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script>
<!-- END: Scripts -->
</head>
<body class="relative">
<!-- START: Game Card -->
<section
class="mx-auto mt-10 flex w-max lg:mt-0 lg:h-screen lg:items-center">
<div
class="flex max-h-[4.9in] max-w-[3.65in] flex-col space-y-1.5 rounded-xl border-2 border-black bg-gray-500/10 p-3 shadow-lg print:mt-40 print:scale-[1.75] print:shadow-none lg:h-[4.9in] lg:w-[3.65in] lg:scale-[1.8]">
<!-- START: Team Info -->
<div class="flex flex-col space-y-1.5">
<div class="flex flex-row space-x-2">
<div
x-data="{ isHome: true }"
class="flex w-3/5 flex-row space-x-1">
<label
@click="isHome = !isHome"
for="team"
x-text="isHome ? 'home' : 'visitor'"
class="cursor-pointer uppercase"></label>
<input id="team" type="text" spellcheck="false" />
</div>
<div class="flex w-2/5 flex-row space-x-1">
<label for="color">COLOR</label>
<input
id="color"
type="text"
spellcheck="false"
class="!uppercase" />
</div>
</div>
<!-- START: Coaches -->
<div class="flex flex-row space-x-2">
<!-- START: Head Coach -->
<div class="flex w-[84%] flex-row space-x-1">
<label for="color">HEAD COACH</label>
<input id="color" type="text" spellcheck="false" />
</div>
<!-- END: Head Coach -->
<!-- START: Assistant Coach -->
<div class="flex flex-row space-x-1">
<label for="color">ASST.</label>
<input id="color" type="text" spellcheck="false" />
</div>
<!-- END: Assistant Coach -->
</div>
<!-- END: Coaches -->
</div>
<!-- END: Team Info -->
<!-- START: Coin Toss -->
<div
x-data="{
lostToss: false,
first_half_option: null,
get isDefer() { return this.first_half_option === 'defer' },
set isDefer(val) { this.first_half_option = this.first_half_option === 'defer' ? null : 'defer' },
get isReceive() { return this.first_half_option === 'receive' },
set isReceive(val) { this.first_half_option = this.first_half_option === 'receive' ? null : 'receive' },
get isDefend() { return this.first_half_option === 'defend' },
set isDefend(val) { this.first_half_option = this.first_half_option === 'defend' ? null : 'defend' }
}"
class="flex w-full flex-col">
<!-- START: First Row -->
<div class="flex flex-row">
<!-- START: Won Toss -->
<div
class="relative flex w-max border-2 border-black px-[3px] py-[1px]">
<label for="win-toss" class="flex flex-col">
<span class="ml-2">WON</span>
<span class="ml-4">TOSS</span>
</label>
<!-- NOTE: When unchecking win-toss, the options will be unchecked and disabled. -->
<input
id="win-toss"
type="checkbox"
@click="lostToss && isDefer ? first_half_option = null : null"
x-model="lostToss"
class="absolute bottom-[2px] left-[2px]" />
</div>
<!-- END: Won Toss -->
<!-- START: First Half Possession -->
<div
class="relative ml-[-2px] flex w-full flex-row items-center space-x-1 border-2 border-black p-[3px]">
<!-- START: Options -->
<div class="flex flex-row items-center space-x-2.5">
<div class="flex flex-row items-center space-x-1">
<input
id="defer-1"
type="checkbox"
:disabled="!lostToss"
x-model="isDefer" />
<label for="defer-1" class="m-0 mb-[-1px]">DEFER</label>
</div>
<div class="flex flex-row items-center space-x-1">
<input id="receive-1" type="checkbox" x-model="isReceive" />
<label for="receive-1" class="m-0 mb-[-1px]">RECEIVE</label>
</div>
<div class="flex flex-row items-center space-x-1">
<input id="defend-1" type="checkbox" x-model="isDefend" />
<label for="defend-1" class="m-0 mb-[-1px]">DEFEND</label>
</div>
</div>
<input
id="goal-1"
type="text"
spellcheck="false"
class="flex !w-7 text-center !uppercase"
maxlength="2" />
<label for="goal-1" class="m-0 mb-[-1px]">GOAL</label>
<!-- END: Options -->
</div>
<!-- END: First Half Possession -->
</div>
<!-- END: First Row -->
<!-- START: Second Row -->
<div
x-data="{
second_half_option: 'receive',
get isReceive() { return this.second_half_option === 'receive' && this.isDefer },
set isReceive(val) { this.second_half_option = this.second_half_option === 'receive' ? null : 'receive' },
get isDefend() { return this.second_half_option === 'defend' && this.isDefer },
set isDefend(val) { this.second_half_option = this.second_half_option === 'defend' ? null : 'defend' }
}"
class="flex flex-row">
<!-- START: Second Half Option (Deferred) -->
<div
class="relative mt-[-2px] flex w-max border-2 border-black px-[3px] py-[1px]">
<label
for="2nd-half-opt"
class="flex flex-col"
:class="isDefer || 'text-gray-600/80 print:text-black'">
<span>SECOND HALF</span>
<span class="ml-4">OPTION</span>
</label>
<input
id="2nd-half-opt"
type="checkbox"
:disabled="!isDefer"
x-model="isDefer"
class="absolute bottom-[2px] left-[2px]" />
</div>
<!-- END: Second Half Option (Deferred) -->
<!-- START: Second Half Possession -->
<div
class="relative ml-[-2px] mt-[-2px] flex w-full border-2 border-black p-[3px]">
<!-- START: Options -->
<div class="mx-auto flex w-max flex-row items-center space-x-1">
<div class="5 item-center flex flex-row space-x-2">
<div class="flex flex-row items-center space-x-1">
<input
id="receive-2"
type="checkbox"
:disabled="!isDefer"
x-model="isReceive" />
<label
for="receive-2"
:disabled="!isDefer"
class="m-0 mb-[-1px]"
>RECEIVE</label
>
</div>
<div class="flex flex-row items-center space-x-1">
<input
id="defend-2"
type="checkbox"
:disabled="!isDefer"
x-model="isDefend" />
<label
for="defend-2"
:disabled="!isDefer"
class="m-0 mb-[-1px]"
>DEFEND</label
>
</div>
</div>
<input
id="goal-2"
type="text"
spellcheck="false"
class="!w-7 text-center !uppercase"
maxlength="2" />
<label for="goal-2" class="m-0 mb-[-1px]">GOAL</label>
</div>
<!-- END: Options -->
</div>
<!-- END: Second Half Possession -->
</div>
<!-- START: Second Row -->
</div>
<!-- END: Coin Toss -->
<!-- START: Team Captains -->
<table
x-data="{ captains: ['cap', 'alt'] }"
class="flex flex-col space-y-1.5">
<template x-for="captain in captains">
<tr
class="flex flex-row space-x-1"
:style="captain === 'cap' && { marginTop: 0 }">
<td class="flex flex-row space-x-1">
<label for="captain-1">
<span x-text="captain" class="font-mono uppercase"></span>.
</label>
<input
id="captain-1"
type="text"
spellcheck="false"
class="flex-1" />
</td>
<td class="flex flex-row space-x-1">
<label for="number-1">NO.</label
><input
id="number-1"
type="number"
class="!w-10 text-center"
oninput="this.value = this.value.slice(0,this.maxLength)"
maxlength="2"
min="0"
max="99" />
</td>
<td class="flex flex-row space-x-1">
<label for="position-1">POS.</label>
<input
id="position-1"
type="text"
spellcheck="false"
class="!w-10 text-center !uppercase"
maxlength="2" />
</td>
</tr>
</template>
</table>
<!-- END: Team Captains -->
<!-- START: Timeouts -->
<div
x-data
class="flex flex-col space-y-1.5 border-2 border-black px-[3px] pt-[3px] pb-[2px]">
<!-- START: First Half Timeouts -->
<div class="flex flex-row space-x-1">
<h2>
<span class="font-mono font-medium tracking-tighter">1ST</span>
HALF T.O.
</h2>
<div class="mt-auto !-ml-1 flex flex-row space-x-2">
<template x-for="i in 3">
<input
type="text"
pattern="[0-9]{1,2}:[0-9]{2}"
spellcheck="false"
class="!h-4 text-center"
maxlength="5" />
</template>
</div>
</div>
<!-- END: First Half Timeouts -->
<!-- START: Second Half Timeouts -->
<div class="flex flex-row space-x-1">
<h2>
<span class="font-mono font-medium tracking-tighter">2ND</span>
HALF T.O.
</h2>
<div class="mt-auto !-ml-1 flex flex-row space-x-2">
<template x-for="i in 3">
<input
type="text"
pattern="[0-9]{1,2}:[0-9]{2}"
spellcheck="false"
class="!h-4 text-center"
maxlength="5" />
</template>
</div>
</div>
<!-- END: Second Half Timeouts -->
</div>
<!-- END: Timeouts -->
<!-- START: Scoring Record -->
<div class="flex flex-col space-y-0.5">
<h2 class="mx-auto my-0.5 w-max">SCORING SUMMARY</h2>
<div class="flex flex-row">
<div class="grid w-full grid-cols-2 grid-rows-2">
<div class="group relative h-8 border-2 border-black bg-white">
<label
for="first"
class="absolute top-0.5 left-0.5 font-mono text-[8px] group-focus-within:font-semibold group-focus-within:text-indigo-600">
1ST</label
>
<input
id="first"
type="number"
class="!border-0 !bg-transparent pl-0.5 text-center"
oninput="this.value = this.value.slice(0,this.maxLength)"
maxlength="3"
min="0"
max="999" />
</div>
<div
class="group relative h-8 border-2 border-l-0 border-black bg-white">
<label
for="second"
class="absolute top-0.5 left-0.5 font-mono text-[8px] group-focus-within:font-semibold group-focus-within:text-indigo-600">
2ND</label
>
<input
id="second"
type="number"
class="!border-0 !bg-transparent pl-0.5 text-center"
oninput="this.value = this.value.slice(0,this.maxLength)"
maxlength="3"
min="0"
max="999" />
</div>
<div
class="group relative h-8 border-2 border-t-0 border-black bg-white">
<label
for="third"
class="absolute top-0.5 left-0.5 font-mono text-[8px] group-focus-within:font-semibold group-focus-within:text-indigo-600">
3RD</label
>
<input
id="third"
type="number"
class="!border-0 !bg-transparent pl-0.5 text-center"
oninput="this.value = this.value.slice(0,this.maxLength)"
maxlength="3"
min="0"
max="999" />
</div>
<div
class="group relative h-8 border-2 border-l-0 border-t-0 border-black bg-white">
<label
for="fourth"
class="absolute top-0.5 left-0.5 font-mono text-[8px] group-focus-within:font-semibold group-focus-within:text-indigo-600">
4TH</label
>
<input
id="fourth"
type="number"
class="!border-0 !bg-transparent pl-0.5 text-center"
oninput="this.value = this.value.slice(0,this.maxLength)"
maxlength="3"
min="0"
max="999" />
</div>
</div>
<div
class="group relative flex h-16 w-12 border-2 border-l-0 border-black bg-white">
<label
for="final-score"
class="absolute top-0.5 left-[3px] group-focus-within:font-semibold group-focus-within:text-indigo-600">
FINAL</label
>
<input
id="final-score"
type="number"
class="!border-0 !bg-transparent pl-0.5 text-center"
:placeholder="final_score"
oninput="this.value = this.value.slice(0,this.maxLength)"
maxlength="3"
min="0"
max="999" />
</div>
</div>
</div>
<!-- END: Scoring Record -->
<!-- START: Unsportsmanlike Conducts -->
<div
x-data
class="flex flex-col space-y-1.5 border-2 border-black px-[3px] pt-[3px] pb-[2px]">
<div class="flex flex-row space-x-1 font-mono font-medium">
<h2>UNSPORTSMANLIKES</h2>
<div
class="mt-auto flex w-full flex-row space-x-2"
style="margin-right: 0.5rem">
<template x-for="i in 4">
<input
type="number"
spellcheck="false"
class="!h-4 text-center"
oninput="this.value = this.value.slice(0,this.maxLength)"
maxlength="2"
min="0"
max="99" />
</template>
</div>
</div>
<!-- START: Game Notes -->
<div class="flex flex-row space-x-1">
<label for="game-notes">GAME<br />NOTES</label>
<textarea
id="game-notes"
class="scrollbar-hide !h-16 resize-none !normal-case"></textarea>
</div>
<!-- END: Game Notes -->
</div>
<!-- END: Unsportsmanlike Conducts -->
<!-- START: Game Information -->
<div class="flex flex-col space-y-2 pb-[2px]">
<!-- START: Date and Times -->
<div class="flex flex-col space-y-1">
<div class="flex flex-row space-x-1">
<div class="flex flex-row space-x-1">
<label for="date" class="text-[0.6rem]">DATE</label>
<input
id="date"
type="text"
pattern="^(([0-9])|([0-2][0-9])|([3][0-1])) (jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec) \d{4}$"
spellcheck="false"
class="!w-[5rem] text-center !uppercase" />
</div>
<div class="flex flex-row space-x-1">
<label for="start" class="text-[0.6rem]">START</label>
<input
id="start"
type="text"
pattern="((1[0-2]|0?[1-9]):([0-5][0-9]) ?([AaPp][Mm]))"
spellcheck="false"
class="text-center !uppercase" />
</div>
<div class="flex flex-row space-x-1">
<label for="end" class="text-[0.6rem]">END</label>
<input
id="end"
type="text"
pattern="((1[0-2]|0?[1-9]):([0-5][0-9]) ?([AaPp][Mm]))"
spellcheck="false"
class="text-center !uppercase" />
</div>
</div>
</div>
<!-- END: Date and Times -->
</div>
<!-- END: Game Information -->
<!-- START: Credit -->
<h3 class="mx-auto flex w-max flex-col space-y-0.5 pt-[3px]">
<span class="text-[8px] font-medium uppercase">
Game Card • Mark 2 • by Jake Harvanchik</span
>
<span
class="!select-all text-center text-[7px] font-medium lowercase selection:bg-indigo-400 selection:text-white">
https://jake.harvanchik.me/game-card</span
>
</h3>
<!-- END: Credit -->
</div>
</section>
<!-- END: Game Card -->
<!-- START: Download Game Cards PDF Button -->
<a
href="./assets/img/game-cards-m2.pdf"
download
class="absolute right-0 bottom-0 m-5 hidden h-12 w-12 rounded-xl bg-black/20 transition-colors duration-150 hover:bg-black/40 lg:block">
<img src="./assets/img/svg/printer.svg" alt="printer" class="p-1.5" />
</a>
<!-- END: Download Game Cards PDF Button -->
</body>
</html>