-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
executable file
·524 lines (463 loc) · 20.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
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
<!DOCTYPE html>
<html lang="en">
<head>
<!-- BASIC
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta charset="utf-8">
<meta http-equiv="cache-control" content="Public">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<title>Raffler</title>
<!-- META
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta name="description" content="Pick a name">
<meta name="author" content="Michael Chadwick">
<meta name="application-name" content="Raffler">
<meta name="title" content="Raffler" />
<meta property="og:url" content="https://raffler.neb.host">
<meta property="og:title" content="Raffler - Random choice generator">
<meta property="og:description" content="Pick a name out of a hat in a fun, digital way.">
<meta property="og:image" content="https://raffler.neb.host/assets/icons/android-chrome-512x512.png">
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:domain" content="raffler.neb.host">
<!-- FAVICONS
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="apple-touch-icon" sizes="180x180" href="./assets/icons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="./assets/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="./assets/icons/favicon-16x16.png">
<link rel="manifest" href="./site.webmanifest">
<link rel="mask-icon" href="./assets/icons/safari-pinned-tab.svg" color="#016390">
<meta name="msapplication-TileColor" content="#2b5797">
<meta name="theme-color" content="#ffffff">
<!-- FONTS
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Cabin|Overpass+Mono|Roboto">
<!-- FONTAWESOME
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="stylesheet" href="./assets/fontawesome/css/fontawesome.min.css">
<link rel="stylesheet" href="./assets/fontawesome/css/solid.min.css">
<!-- CSS
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<!--// VENDORS //-->
<link rel="stylesheet" href="./assets/css/vendor/jquery-ui.min.css">
<link rel="stylesheet" href="./assets/css/vendor/jquery-ui.structure.min.css">
<link rel="stylesheet" href="./assets/css/vendor/jquery-ui.theme.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
<!--// CUSTOM //-->
<link rel="stylesheet" href="./assets/css/modal.css">
<link rel="stylesheet" href="./assets/css/app.css">
</head>
<body>
<header>
<div class="menu-left">
<div id="nav-links">
<button id="button-nav" class="icon" aria-label="Click for links to more apps by neb.host" tabindex="-1">
<i class="fa-solid fa-bars"></i>
</button>
<div id="nav-overlay">
<div id="nav-content">
<div class="container">
<div class="nav-header">More Apps By Neb</div>
<div class="nav-list"></div>
<div class="nav-footer">
<!-- vvv neb.host subsite footer -->
<footer id="footer-neb-host">site by <a href="https://neb.host">neb.host</a>
</footer>
<!-- ^^^ neb.host subsite footer -->
</div>
</div>
<div id="button-nav-close">
<a href="#">X</a>
</div>
</div>
</div>
</div>
<button id="button-help" class="icon" aria-label="Help" tabindex="-1">
<i class="fa-solid fa-question"></i>
</button>
<div id="debug-buttons" class="debug">
<nav class="ddmenu">
<div class="ddgroup">
<button id="button-debug-dropdown" class="icon debug">
<i class="fa-solid fa-bug"></i>
</button>
<div class="ddsub">
<button id="button-show-config" class="icon">
<i class="fa-solid fa-gears"></i>
</button>
</div>
</div>
</nav>
</div>
</div>
<div class="title">
<h1>Raffler</h1>
</div>
<div class="menu-right">
<button id="button-settings" class="icon" aria-label="Settings" tabindex="-1">
<i class="fa-solid fa-gear"></i>
</button>
</div>
</header>
<div id="settings-panel">
<div id="settings-panel-header">
<div>Raffler Settings</div>
<button type="button" id="button-settings-panel-close">X</button>
</div>
<div id="settings-panel-content">
<div class="setting-row tall">
<div class="text">
<div class="title toggle">Items Available <span id="items-available-count">(0)</span></div>
<div class="description">Items available to be chosen. One item per line.</div>
</div>
<div class="control">
<details open>
<div class="container textarea">
<textarea id="items-available" spellcheck="false"></textarea>
</div>
<summary></summary>
</details>
</div>
</div>
<div class="setting-row tall">
<div class="text">
<div class="title toggle">Items Chosen <span id="items-chosen-count">(0)</span></div>
<div class="description">Items that have already been chosen.</div>
</div>
<div class="control">
<details>
<div class="container textarea">
<textarea readonly id="items-chosen" spellcheck="false"></textarea>
</div>
<summary></summary>
</details>
</div>
</div>
<!-- box resize -->
<div class="setting-row">
<div class="text">
<div class="title">Box/Text Resize</div>
<div class="description">Raffler box text will grow during countdown.</div>
</div>
<div class="control">
<div class="container">
<div id="button-setting-allow-box-resize" data-status="" class="switch" onclick="Raffler._changeAppSetting('allowBoxResize')">
<span class="knob"></span>
</div>
</div>
</div>
</div>
<!-- sounds: countdown, victory, name -->
<div class="setting-row">
<div class="setting-group">
<div class="title">Sounds <span id="audioPlaying"></span></div>
<article>
<div class="text">
<div class="title">Countdown</div>
<div class="description">Play sound during countdown.</div>
</div>
<div class="control">
<div class="container">
<div id="button-setting-sound-countdown" data-status="" class="switch" onclick="Raffler._changeAppSetting('soundCountdown')">
<span class="knob"></span>
</div>
</div>
</div>
</article>
<article>
<div class="text">
<div class="title">Victory</div>
<div class="description">Play sound when a choice is made.</div>
</div>
<div class="control">
<div class="container">
<div id="button-setting-sound-victory" data-status="" class="switch" onclick="Raffler._changeAppSetting('soundVictory')">
<span class="knob"></span>
</div>
</div>
</div>
</article>
<article>
<div class="text">
<div class="title">Name</div>
<div class="description">Read chosen item.</div>
</div>
<div class="control">
<div class="container">
<div id="button-setting-sound-name" data-status="" class="switch" onclick="Raffler._changeAppSetting('soundName')">
<span class="knob"></span>
</div>
</div>
</div>
</article>
</div>
</div>
<!-- debug settings -->
<div class="setting-row debug">
<div class="text">
<div class="title">Debug Settings</div>
<div class="description">Show additional debugging settings.</div>
</div>
<div class="control">
<div class="container">
<div id="button-setting-show-debug" data-status="" class="switch" onclick="Raffler._changeAppSetting('showDebug')">
<span class="knob"></span>
</div>
</div>
</div>
</div>
<div id="settings-debug-container">
<div class="setting-row tall">
<div class="text">
<div class="title">Test Sounds</div>
</div>
<div class="control">
<div class="container buttons buttons-test-sound" id="buttons-test-sounds">
<button class="button button-test test countdown" id="button-test-sound-countdown" title="countdown">
<i class="fas fa-stopwatch-20"></i> Raffle
</button>
<button class="button button-test test victory" id="button-test-sound-victory" title="victory">
<i class="fas fa-trophy"></i> Win
</button>
<button class="button button-test test name" id="button-test-sound-name" title="name" onclick="Raffler._readName('Winner McWinnington from Victoryland')">
<i class="fas fa-microphone"></i> Name
</button>
</div>
</div>
</div>
<div class="setting-row tall">
<div class="text">
<div class="title">Test Visual Notifications</div>
</div>
<div class="control">
<div class="container buttons buttons-test-visual" id="buttons-test-visual">
<button class="button button-test-visual test notice disabled" id="button-test-notice" title="notice" onclick="Raffler._notify('test notice msg that is long enough to actually go onto a second line because of width and such and thus.', 'notice', true)" disabled="true">
<i class="fas fa-info-circle"></i>
</button>
<button class="button button-test-visual test success disabled" id="button-test-success" title="success" onclick="Raffler._notify('test success msg that is long enough to actually go onto a second line because of width and such and thus.', 'success', true)" disabled="true">
<i class="fas fa-smile"></i>
</button>
<button class="button button-test-visual test warning disabled" id="button-test-warning" title="warning" onclick="Raffler._notify('test warning msg that is long enough to actually go onto a second line because of width and such and thus.', 'warning', true)" disabled="true">
<i class="fas fa-exclamation-triangle"></i>
</button>
<button class="button button-test-visual test error disabled" id="button-test-error" title="error" onclick="Raffler._notify('test error msg that is long enough to actually go onto a second line because of width and such and thus.', 'error', true)" disabled="true">
<i class="fas fa-times-circle"></i>
</button>
</div>
</div>
</div>
<div class="setting-row">
<div class="text">
<div class="title">Times Run</div>
<div class="description">Number of times Raffler has run.</div>
</div>
<div class="control">
<div class="container">
<div class="values" id="text-setting-timesrun-value">0</div>
</div>
</div>
</div>
<div class="setting-row">
<div class="text">
<div class="title">Timer</div>
<div class="description">Cycling timer controls.</div>
</div>
<div class="control">
<div class="container button-timers">
<a href="#" class="button start disabled" id="button-timer-start" disabled="true">
<i class="fas fa-play"></i>
<span> start</span>
</a>
<a href="#" class="button stop" id="button-timer-stop">
<i class="fas fa-stop"></i>
<span> stop</span>
</a>
</div>
</div>
</div>
<div class="setting-row">
<div class="text">
<div class="title">Stage</div>
<div class="description">Level of current raffler timer</div>
</div>
<div class="control">
<div class="container">
<div class="values" id="text-setting-stage-value">
0
</div>
</div>
</div>
</div>
<div class="setting-row">
<div class="text">
<div class="title">Interval</div>
<div class="description"></div>
</div>
<div class="control">
<div class="container">
<div class="values" id="text-setting-interval-value">
<span></span>
<input type="range" id="range-interval-value"
min="1"
max="400"
step="1"
value="25"
onchange="Raffler._changeAppSetting('intervalValue', event)"
/>
</div>
</div>
</div>
</div>
<div class="setting-row">
<div class="text">
<div class="title">Multiply</div>
<div class="description"></div>
</div>
<div class="control">
<div class="container">
<div class="values" id="text-setting-multiply-value">
<span></span>
</div>
</div>
</div>
</div>
<div class="setting-row">
<div class="text">
<div class="title">Show Graph</div>
<div class="description">Show tiny version of items being cycled.</div>
</div>
<div class-"control">
<div class="container">
<div id="button-setting-show-graph" data-status="" class="switch" onclick="Raffler._changeAppSetting('showGraph')">
<span class="knob"></span>
</div>
</div>
</div>
</div>
<div class="setting-row">
<div class="text">
<div class="title">Allow Debug Notifications</div>
<div class="description">Debug browser console notifications.</div>
</div>
<div class="control">
<div class="container">
<div id="button-setting-allow-debug-notifications" data-status="" class="switch" onclick="Raffler._changeAppSetting('allowDebugNotifications')">
<span class="knob"></span>
</div>
</div>
</div>
</div>
<div class="setting-row">
<div class="text">
<div class="title">Allow Modal Notifications</div>
<div class="description">Visual modal notifications.</div>
</div>
<div class="control">
<div class="container">
<div id="button-setting-allow-visual-notifications" data-status="" class="switch" onclick="Raffler._changeAppSetting('allowVisualNotifications')">
<span class="knob"></span>
</div>
</div>
</div>
</div>
<div class="setting-row">
<div class="text">
<div class="title">Undo Choices</div>
<div class="description">Move all Items Chosen back to Items Available.</div>
</div>
<div class="control">
<div class="container">
<a href="#" class="button danger" id="button-undo-choices">
<i class="fas fa-rotate-right"></i>
</a>
</div>
</div>
</div>
<div class="setting-row">
<div class="text">
<div class="title">Reset Raffler</div>
<div class="description">Remove all Items Available and Items Chosen. Back to defaults.</div>
</div>
<div class="control">
<div class="container">
<a href="#" class="button danger" id="button-reset-all">
<i class="fas fa-power-off"></i>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Primary Page Layout
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<section id="main-content" role="main">
<!-- status messages, button, item results -->
<div class="main-container">
<div class="main wrapper clearfix">
<div id="items-cycle">
<section id="init-raffler-cycle">
<a
href="#"
class="animate__animated animate__pulse animate__slow animate__delay-5s animate__infinite"
id="message-start"
>CLICK TO BEGIN RAFFLE!</a>
<span
id="message-limit"
>Add more than one item to raffle!</span>
<span
id="message-empty"
>Add some items to raffle!</span>
</section>
</div>
<div id="items-graph"></div>
<div id="chosen-confirm">
<h2>Accept Choice?</h2>
<button id="button-confirm-yes" class="button confirm">
<i class="fas fa-check"></i> YES
</button>
<button id="button-confirm-no" class="button deny">
<i class="fas fa-frown"></i> NO
</button>
</div>
<div id="pick-winner-container">
<a href="#" class="button raffle disabled" id="button-pick-winner" disabled="true">PICK A WINNER!</a>
</div>
<div id="results-wrapper">
<div id="results-header">
<h3>Results (<span id="results-count"></span>)</h3>
<a href="#" id="button-export-results" title="Export Results" class="button export">
<i class="fas fa-save"></i> Export Results
</a>
</div>
<div id="results-list">
<ul></ul>
</div>
</div>
</div>
</div>
</section>
<!-- End Document
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<!-- JAVASCRIPTS
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<!-- VENDOR -->
<script type="text/javascript" src="./assets/js/vendor/FileSaver.min.js"></script>
<!-- CUSTOM -->
<script type="text/javascript" src="./assets/js/app.js"></script>
<script type="text/javascript" src="./assets/js/app/constants.js"></script>
<script type="text/javascript" src="./assets/js/app/dom.js"></script>
<script type="text/javascript" src="./assets/js/app/modal.js"></script>
<!-- CUSTOM: LIB -->
<script type="text/javascript" src="./assets/js/app/lib/debug.js"></script>
<script type="text/javascript" src="./assets/js/app/lib/helpers.js"></script>
<script type="text/javascript" src="./assets/js/app/lib/notify.js"></script>
<script type="text/javascript" src="./assets/js/app/lib/settings.js"></script>
<!-- CUSTOM: MODULES -->
<script type="module" src="./assets/js/app/modules/export.js"></script>
<!-- CUSTOM: FX -->
<script type="text/javascript" src="./assets/js/app/lib/animation.js"></script>
<script type="text/javascript" src="./assets/js/app/lib/audio.js"></script>
<!-- CUSTOM: MAIN -->
<script type="text/javascript" src="./assets/js/app/main.js"></script>
</body>
</html>