-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
823 lines (763 loc) · 41.6 KB
/
Copy pathindex.html
File metadata and controls
823 lines (763 loc) · 41.6 KB
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
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="A fun and colorful clock app for children with event scheduling">
<meta name="theme-color" content="#FFB6C1">
<title>Kids Clock</title>
<link rel="manifest" href="manifest.json">
<link rel="stylesheet" href="styles.css">
<link rel="icon" type="image/png" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='0.9em' font-size='90'>🕐</text></svg>">
</head>
<body>
<!-- Animated Day Background -->
<div id="dayBackground" class="animated-background day-background hidden">
<div class="day-sun">
<div class="sun-rays"></div>
</div>
<div class="day-cloud day-cloud-1"></div>
<div class="day-cloud day-cloud-2"></div>
<div class="day-cloud day-cloud-3"></div>
<div class="day-cloud day-cloud-4"></div>
<div class="day-bird day-bird-1">
<div class="day-bird-body">
<div class="day-bird-head">
<div class="day-bird-eye"></div>
<div class="day-bird-beak"></div>
</div>
<div class="day-bird-wing"></div>
<div class="day-bird-tail"></div>
</div>
</div>
<div class="day-bird day-bird-2">
<div class="day-bird-body">
<div class="day-bird-head">
<div class="day-bird-eye"></div>
<div class="day-bird-beak"></div>
</div>
<div class="day-bird-wing"></div>
<div class="day-bird-tail"></div>
</div>
</div>
<div class="day-bird day-bird-3">
<div class="day-bird-body">
<div class="day-bird-head">
<div class="day-bird-eye"></div>
<div class="day-bird-beak"></div>
</div>
<div class="day-bird-wing"></div>
<div class="day-bird-tail"></div>
</div>
</div>
<div class="day-bird day-bird-4">
<div class="day-bird-body">
<div class="day-bird-head">
<div class="day-bird-eye"></div>
<div class="day-bird-beak"></div>
</div>
<div class="day-bird-wing"></div>
<div class="day-bird-tail"></div>
</div>
</div>
<div class="day-bird day-bird-5">
<div class="day-bird-body">
<div class="day-bird-head">
<div class="day-bird-eye"></div>
<div class="day-bird-beak"></div>
</div>
<div class="day-bird-wing"></div>
<div class="day-bird-tail"></div>
</div>
</div>
<div class="day-bird day-bird-6 day-bird-reverse">
<div class="day-bird-body">
<div class="day-bird-head">
<div class="day-bird-eye"></div>
<div class="day-bird-beak"></div>
</div>
<div class="day-bird-wing"></div>
<div class="day-bird-tail"></div>
</div>
</div>
<div class="day-bird day-bird-7 day-bird-reverse">
<div class="day-bird-body">
<div class="day-bird-head">
<div class="day-bird-eye"></div>
<div class="day-bird-beak"></div>
</div>
<div class="day-bird-wing"></div>
<div class="day-bird-tail"></div>
</div>
</div>
<div class="day-bird day-bird-8 day-bird-reverse">
<div class="day-bird-body">
<div class="day-bird-head">
<div class="day-bird-eye"></div>
<div class="day-bird-beak"></div>
</div>
<div class="day-bird-wing"></div>
<div class="day-bird-tail"></div>
</div>
</div>
<div class="day-grass">
<div class="day-flower day-flower-1">🌸</div>
<div class="day-flower day-flower-2">🌼</div>
<div class="day-flower day-flower-3">🌺</div>
<div class="day-flower day-flower-4">🌻</div>
<div class="day-flower day-flower-5">🌷</div>
</div>
<div class="day-tree day-tree-1">
<div class="pine-foliage pine-foliage-top"></div>
<div class="pine-foliage pine-foliage-middle"></div>
<div class="pine-foliage pine-foliage-bottom"></div>
</div>
<div class="day-tree day-tree-2">
<div class="pine-foliage pine-foliage-top"></div>
<div class="pine-foliage pine-foliage-middle"></div>
<div class="pine-foliage pine-foliage-bottom"></div>
</div>
<div class="day-tree day-tree-3">
<div class="pine-foliage pine-foliage-top"></div>
<div class="pine-foliage pine-foliage-middle"></div>
<div class="pine-foliage pine-foliage-bottom"></div>
</div>
<div class="day-tree day-tree-4">
<div class="pine-foliage pine-foliage-top"></div>
<div class="pine-foliage pine-foliage-middle"></div>
<div class="pine-foliage pine-foliage-bottom"></div>
</div>
<div class="day-tree day-tree-5">
<div class="pine-foliage pine-foliage-top"></div>
<div class="pine-foliage pine-foliage-middle"></div>
<div class="pine-foliage pine-foliage-bottom"></div>
</div>
<div class="day-tree day-tree-6">
<div class="pine-foliage pine-foliage-top"></div>
<div class="pine-foliage pine-foliage-middle"></div>
<div class="pine-foliage pine-foliage-bottom"></div>
</div>
<div class="day-tree day-tree-7">
<div class="pine-foliage pine-foliage-top"></div>
<div class="pine-foliage pine-foliage-middle"></div>
<div class="pine-foliage pine-foliage-bottom"></div>
</div>
<div class="day-leafy-tree day-leafy-tree-1">
<div class="leafy-cluster leafy-cluster-1"></div>
<div class="leafy-cluster leafy-cluster-2"></div>
<div class="leafy-cluster leafy-cluster-3"></div>
</div>
<div class="day-leafy-tree day-leafy-tree-2">
<div class="leafy-cluster leafy-cluster-1"></div>
<div class="leafy-cluster leafy-cluster-2"></div>
<div class="leafy-cluster leafy-cluster-3"></div>
</div>
<div class="day-leafy-tree day-leafy-tree-3">
<div class="leafy-cluster leafy-cluster-1"></div>
<div class="leafy-cluster leafy-cluster-2"></div>
<div class="leafy-cluster leafy-cluster-3"></div>
</div>
<div class="day-road">
<div class="road-dashes"></div>
</div>
<div class="day-car day-car-1" data-car-style="sedan">
<div class="car-body">
<div class="car-top"></div>
<div class="car-window car-window-left"></div>
<div class="car-window car-window-right"></div>
<div class="car-wheel car-wheel-front"></div>
<div class="car-wheel car-wheel-back"></div>
<div class="car-headlight"></div>
<div class="car-headlight-beam"></div>
<div class="car-taillight"></div>
<div class="car-taillight-cone"></div>
</div>
</div>
<div class="day-car day-car-2" data-car-style="truck">
<div class="car-body">
<div class="car-top"></div>
<div class="car-window car-window-left"></div>
<div class="car-window car-window-right"></div>
<div class="car-wheel car-wheel-front"></div>
<div class="car-wheel car-wheel-back"></div>
<div class="car-headlight"></div>
<div class="car-headlight-beam"></div>
<div class="car-taillight"></div>
<div class="car-taillight-cone"></div>
</div>
</div>
<div class="day-car day-car-3" data-car-style="hatchback">
<div class="car-body">
<div class="car-top"></div>
<div class="car-window car-window-left"></div>
<div class="car-window car-window-right"></div>
<div class="car-wheel car-wheel-front"></div>
<div class="car-wheel car-wheel-back"></div>
<div class="car-headlight"></div>
<div class="car-headlight-beam"></div>
<div class="car-taillight"></div>
<div class="car-taillight-cone"></div>
</div>
</div>
<div class="day-car day-car-4 day-car-reverse" data-car-style="sedan">
<div class="car-body">
<div class="car-top"></div>
<div class="car-window car-window-left"></div>
<div class="car-window car-window-right"></div>
<div class="car-wheel car-wheel-front"></div>
<div class="car-wheel car-wheel-back"></div>
<div class="car-headlight"></div>
<div class="car-headlight-beam"></div>
<div class="car-taillight"></div>
<div class="car-taillight-cone"></div>
</div>
</div>
<div class="day-car day-car-5 day-car-reverse" data-car-style="truck">
<div class="car-body">
<div class="car-top"></div>
<div class="car-window car-window-left"></div>
<div class="car-window car-window-right"></div>
<div class="car-wheel car-wheel-front"></div>
<div class="car-wheel car-wheel-back"></div>
<div class="car-headlight"></div>
<div class="car-headlight-beam"></div>
<div class="car-taillight"></div>
<div class="car-taillight-cone"></div>
</div>
</div>
</div>
<!-- Animated Night Background -->
<div id="nightBackground" class="animated-background night-background hidden">
<div class="night-moon">
<div class="moon-crater moon-crater-1"></div>
<div class="moon-crater moon-crater-2"></div>
<div class="moon-crater moon-crater-3"></div>
</div>
<div class="night-planet night-planet-1">
<div class="planet-rings"></div>
</div>
<div class="night-planet night-planet-2"></div>
<div class="night-planet night-planet-3"></div>
<div id="starsContainer"></div>
<div class="shooting-star shooting-star-1"></div>
<div class="shooting-star shooting-star-2"></div>
<div class="shooting-star shooting-star-3"></div>
<div class="night-cloud night-cloud-1"></div>
<div class="night-cloud night-cloud-2"></div>
<div class="night-cloud night-cloud-3"></div>
<div class="night-cloud night-cloud-4"></div>
<div class="night-cloud night-cloud-5"></div>
<div class="night-tree night-tree-1">
<div class="pine-foliage pine-foliage-top"></div>
<div class="pine-foliage pine-foliage-middle"></div>
<div class="pine-foliage pine-foliage-bottom"></div>
</div>
<div class="night-tree night-tree-2">
<div class="pine-foliage pine-foliage-top"></div>
<div class="pine-foliage pine-foliage-middle"></div>
<div class="pine-foliage pine-foliage-bottom"></div>
</div>
<div class="night-tree night-tree-3">
<div class="pine-foliage pine-foliage-top"></div>
<div class="pine-foliage pine-foliage-middle"></div>
<div class="pine-foliage pine-foliage-bottom"></div>
</div>
<div class="night-tree night-tree-4">
<div class="pine-foliage pine-foliage-top"></div>
<div class="pine-foliage pine-foliage-middle"></div>
<div class="pine-foliage pine-foliage-bottom"></div>
</div>
<div class="night-tree night-tree-5">
<div class="pine-foliage pine-foliage-top"></div>
<div class="pine-foliage pine-foliage-middle"></div>
<div class="pine-foliage pine-foliage-bottom"></div>
</div>
<div class="night-tree night-tree-6">
<div class="pine-foliage pine-foliage-top"></div>
<div class="pine-foliage pine-foliage-middle"></div>
<div class="pine-foliage pine-foliage-bottom"></div>
</div>
<div class="night-tree night-tree-7">
<div class="pine-foliage pine-foliage-top"></div>
<div class="pine-foliage pine-foliage-middle"></div>
<div class="pine-foliage pine-foliage-bottom"></div>
</div>
<div class="night-leafy-tree night-leafy-tree-1">
<div class="leafy-cluster leafy-cluster-1"></div>
<div class="leafy-cluster leafy-cluster-2"></div>
<div class="leafy-cluster leafy-cluster-3"></div>
</div>
<div class="night-leafy-tree night-leafy-tree-2">
<div class="leafy-cluster leafy-cluster-1"></div>
<div class="leafy-cluster leafy-cluster-2"></div>
<div class="leafy-cluster leafy-cluster-3"></div>
</div>
<div class="night-leafy-tree night-leafy-tree-3">
<div class="leafy-cluster leafy-cluster-1"></div>
<div class="leafy-cluster leafy-cluster-2"></div>
<div class="leafy-cluster leafy-cluster-3"></div>
</div>
<div class="night-road">
<div class="road-dashes"></div>
</div>
<div class="night-car night-car-1" data-car-style="sedan">
<div class="car-body">
<div class="car-top"></div>
<div class="car-window car-window-left"></div>
<div class="car-window car-window-right"></div>
<div class="car-wheel car-wheel-front"></div>
<div class="car-wheel car-wheel-back"></div>
<div class="car-headlight"></div>
<div class="car-headlight-beam"></div>
<div class="car-taillight"></div>
<div class="car-taillight-cone"></div>
</div>
</div>
<div class="night-car night-car-2" data-car-style="truck">
<div class="car-body">
<div class="car-top"></div>
<div class="car-window car-window-left"></div>
<div class="car-window car-window-right"></div>
<div class="car-wheel car-wheel-front"></div>
<div class="car-wheel car-wheel-back"></div>
<div class="car-headlight"></div>
<div class="car-headlight-beam"></div>
<div class="car-taillight"></div>
<div class="car-taillight-cone"></div>
</div>
</div>
<div class="night-car night-car-3" data-car-style="hatchback">
<div class="car-body">
<div class="car-top"></div>
<div class="car-window car-window-left"></div>
<div class="car-window car-window-right"></div>
<div class="car-wheel car-wheel-front"></div>
<div class="car-wheel car-wheel-back"></div>
<div class="car-headlight"></div>
<div class="car-headlight-beam"></div>
<div class="car-taillight"></div>
<div class="car-taillight-cone"></div>
</div>
</div>
<div class="night-car night-car-4 night-car-reverse" data-car-style="sedan">
<div class="car-body">
<div class="car-top"></div>
<div class="car-window car-window-left"></div>
<div class="car-window car-window-right"></div>
<div class="car-wheel car-wheel-front"></div>
<div class="car-wheel car-wheel-back"></div>
<div class="car-headlight"></div>
<div class="car-headlight-beam"></div>
<div class="car-taillight"></div>
<div class="car-taillight-cone"></div>
</div>
</div>
<div class="night-car night-car-5 night-car-reverse" data-car-style="truck">
<div class="car-body">
<div class="car-top"></div>
<div class="car-window car-window-left"></div>
<div class="car-window car-window-right"></div>
<div class="car-wheel car-wheel-front"></div>
<div class="car-wheel car-wheel-back"></div>
<div class="car-headlight"></div>
<div class="car-headlight-beam"></div>
<div class="car-taillight"></div>
<div class="car-taillight-cone"></div>
</div>
</div>
<div class="night-grass">
<div class="firefly firefly-1"></div>
<div class="firefly firefly-2"></div>
<div class="firefly firefly-3"></div>
<div class="firefly firefly-4"></div>
<div class="firefly firefly-5"></div>
</div>
</div>
<div id="app">
<!-- Settings Button -->
<button id="settingsBtn" class="icon-btn settings-btn-fixed" aria-label="Settings">⚙️</button>
<!-- Main Clock Display -->
<main id="mainView">
<div class="clock-container">
<!-- Digital Clock -->
<div id="digitalClock" class="clock-display">
<div class="time-display">
<span id="hours">00</span>:<span id="minutes">00</span>:<span id="seconds">00</span><span id="ampm"></span>
</div>
<div class="date-display" id="dateDisplay"></div>
</div>
<!-- Analog Clock -->
<div id="analogClock" class="clock-display hidden">
<svg viewBox="0 0 200 200" class="analog-clock-svg">
<!-- Clock face -->
<circle cx="100" cy="100" r="95" fill="rgba(255, 255, 255, 0.3)" stroke="#333" stroke-width="3"/>
<!-- Hour markers -->
<g class="hour-markers">
<line x1="100" y1="10" x2="100" y2="20" stroke="#333" stroke-width="3"/>
<line x1="100" y1="180" x2="100" y2="190" stroke="#333" stroke-width="3"/>
<line x1="10" y1="100" x2="20" y2="100" stroke="#333" stroke-width="3"/>
<line x1="180" y1="100" x2="190" y2="100" stroke="#333" stroke-width="3"/>
</g>
<!-- Numbers -->
<text x="100" y="30" text-anchor="middle" font-size="20" font-weight="bold">12</text>
<text x="143" y="43" text-anchor="middle" font-size="20" font-weight="bold">1</text>
<text x="170" y="73" text-anchor="middle" font-size="20" font-weight="bold">2</text>
<text x="170" y="107" text-anchor="middle" font-size="20" font-weight="bold">3</text>
<text x="170" y="141" text-anchor="middle" font-size="20" font-weight="bold">4</text>
<text x="143" y="171" text-anchor="middle" font-size="20" font-weight="bold">5</text>
<text x="100" y="185" text-anchor="middle" font-size="20" font-weight="bold">6</text>
<text x="57" y="171" text-anchor="middle" font-size="20" font-weight="bold">7</text>
<text x="30" y="141" text-anchor="middle" font-size="20" font-weight="bold">8</text>
<text x="30" y="107" text-anchor="middle" font-size="20" font-weight="bold">9</text>
<text x="30" y="73" text-anchor="middle" font-size="20" font-weight="bold">10</text>
<text x="57" y="43" text-anchor="middle" font-size="20" font-weight="bold">11</text>
<!-- Hour hand -->
<line id="hourHand" x1="100" y1="100" x2="100" y2="50" stroke="#333" stroke-width="6" stroke-linecap="round"/>
<!-- Minute hand -->
<line id="minuteHand" x1="100" y1="100" x2="100" y2="35" stroke="#666" stroke-width="4" stroke-linecap="round"/>
<!-- Second hand -->
<line id="secondHand" x1="100" y1="100" x2="100" y2="30" stroke="#ff6b6b" stroke-width="2" stroke-linecap="round"/>
<!-- Center dot -->
<circle cx="100" cy="100" r="5" fill="#333"/>
</svg>
</div>
</div>
</main>
<!-- Event Modal -->
<div id="eventModal" class="modal hidden">
<div class="modal-content">
<div class="modal-header">
<h2 id="modalTitle">Create New Event</h2>
<button class="close-btn" id="closeModal">✖️</button>
</div>
<div class="modal-body">
<div class="form-group">
<label for="eventTime">Time (24h format):</label>
<input type="time" id="eventTime" class="input-field" required>
</div>
<div class="form-group">
<label for="eventName">Event Name:</label>
<input type="text" id="eventName" class="input-field" placeholder="e.g., Snack Time!" required>
</div>
<!-- Announcement -->
<div class="form-group">
<label for="announcementText">📢 Announcement Message (optional):</label>
<textarea id="announcementText" class="input-field" rows="3" placeholder="Time to wash your hands!"></textarea>
</div>
<div class="form-group">
<label for="eventVoice">Voice (optional - overrides default):</label>
<select id="eventVoice" class="input-field">
<option value="">Use Default Voice</option>
</select>
</div>
<!-- Picture -->
<div class="form-group">
<label for="pictureUrl">🖼️ Picture URL or upload (optional):</label>
<input type="file" id="pictureUpload" class="input-field" accept="image/*">
<input type="text" id="pictureUrl" class="input-field" placeholder="Or paste image URL">
</div>
<!-- Audio -->
<div class="form-group">
<label for="audioUrl">🎵 Audio URL or upload (optional):</label>
<input type="file" id="audioUpload" class="input-field" accept="audio/*">
<input type="text" id="audioUrl" class="input-field" placeholder="Or paste audio URL">
</div>
<div class="form-group">
<label for="recurrenceType">Recurrence:</label>
<select id="recurrenceType" class="input-field" onchange="app.handleRecurrenceTypeChange()">
<option value="none">One-time event</option>
<option value="daily">Daily</option>
<option value="weekly">Weekly (specific day)</option>
<option value="yearly">Yearly (specific date)</option>
<option value="interval">Custom interval</option>
</select>
</div>
<!-- Weekly recurrence options -->
<div id="weeklyRecurrenceOptions" class="recurrence-options hidden">
<label>Select day(s) of the week:</label>
<div class="days-selector">
<label><input type="checkbox" name="weekday" value="0"> Sun</label>
<label><input type="checkbox" name="weekday" value="1"> Mon</label>
<label><input type="checkbox" name="weekday" value="2"> Tue</label>
<label><input type="checkbox" name="weekday" value="3"> Wed</label>
<label><input type="checkbox" name="weekday" value="4"> Thu</label>
<label><input type="checkbox" name="weekday" value="5"> Fri</label>
<label><input type="checkbox" name="weekday" value="6"> Sat</label>
</div>
</div>
<!-- Yearly recurrence options -->
<div id="yearlyRecurrenceOptions" class="recurrence-options hidden">
<label for="yearlyDate">Select the date for yearly recurrence:</label>
<input type="date" id="yearlyDate" class="input-field">
<p style="font-size: 0.9em; color: #666; margin-top: 5px;">
The event will trigger every year on this date at the specified time.
</p>
</div>
<!-- Interval recurrence options -->
<div id="intervalRecurrenceOptions" class="recurrence-options hidden">
<div class="interval-inputs">
<label>Repeat every:</label>
<div style="display: flex; gap: 10px; align-items: center;">
<input type="number" id="intervalValue" class="input-field" min="1" max="365" value="1" style="flex: 1;">
<select id="intervalUnit" class="input-field" style="flex: 1;">
<option value="minutes">Minutes</option>
<option value="hours">Hours</option>
<option value="days">Days</option>
<option value="weeks">Weeks</option>
<option value="years">Years</option>
</select>
</div>
</div>
</div>
<div class="modal-actions">
<button id="saveEventBtn" class="btn-primary">Save Event</button>
<button id="cancelEventBtn" class="btn-secondary">Cancel</button>
</div>
</div>
</div>
</div>
<!-- Event Display Overlay -->
<div id="eventOverlay" class="event-overlay hidden">
<div class="event-overlay-content">
<button class="close-overlay-btn" id="closeOverlay">✖️</button>
<div id="overlayContent"></div>
</div>
</div>
<!-- Settings Panel -->
<div id="settingsPanel" class="modal hidden">
<div class="modal-content settings-modal-content">
<div class="modal-header">
<h2>⚙️ Settings</h2>
<button class="close-btn" id="closeSettings">✖️</button>
</div>
<div class="settings-tabs">
<button class="settings-tab active" data-tab="general">🔧 General</button>
<button class="settings-tab" data-tab="clock">⏰ Clock</button>
<button class="settings-tab" data-tab="events">📅 Events</button>
<button class="settings-tab" data-tab="background">🎨 Background</button>
<button class="settings-tab" data-tab="voice">🎙️ Voice</button>
<button class="settings-tab" data-tab="hourly">🕐 Hourly</button>
<button class="settings-tab" data-tab="debug">🐛 Debug</button>
</div>
<div class="modal-body">
<div class="settings-tab-content active" data-content="general">
<div class="form-group">
<label>
<input type="checkbox" id="keepScreenAwake">
Keep screen awake
</label>
<p style="font-size: 0.85em; color: #666; margin-top: 5px;">
Prevent the screen from turning off automatically. Useful for keeping the clock visible.
</p>
</div>
</div>
<div class="settings-tab-content" data-content="clock">
<h3 style="color: #667eea; margin-bottom: 15px;">⏰ Clock Display</h3>
<div class="form-group">
<label>Clock Display:</label>
<div style="margin-top: 10px;">
<label style="display: block; margin-bottom: 8px;">
<input type="checkbox" id="showDigitalClock" checked>
Show digital clock
</label>
<label style="display: block; margin-bottom: 8px;">
<input type="checkbox" id="showAnalogClock">
Show analog clock
</label>
</div>
</div>
<div class="form-group">
<label>
<input type="checkbox" id="showSeconds" checked>
Show seconds on digital clock
</label>
</div>
<div class="form-group">
<label>
<input type="checkbox" id="showAnalogSeconds" checked>
Show seconds on analog clock
</label>
</div>
<div class="form-group">
<label>
<input type="checkbox" id="enable24Hour">
Use 24-hour time format
</label>
</div>
</div>
<div class="settings-tab-content" data-content="events">
<h3 style="color: #667eea; margin-bottom: 15px;">📅 Events</h3>
<div class="form-group">
<button id="addEventBtnSettings" class="btn-primary" style="width: 100%;">➕ Add New Event</button>
</div>
<div class="form-group">
<div id="eventsListSettings" class="events-list-settings">
<p class="no-events">No events scheduled yet!</p>
</div>
</div>
</div>
<div class="settings-tab-content" data-content="background">
<h3 style="color: #667eea; margin-bottom: 15px;">🎨 Background</h3>
<div class="form-group">
<label>Background Mode:</label>
<div style="margin-top: 10px;">
<label style="display: block; margin-bottom: 8px;">
<input type="radio" name="backgroundMode" value="gradient" checked>
Gradient Colors (smooth transitions)
</label>
<label style="display: block; margin-bottom: 8px;">
<input type="radio" name="backgroundMode" value="animated">
Animated Day/Night (scenes with animations)
</label>
</div>
</div>
<div id="gradientBackgroundSettings" class="form-group">
<p style="font-size: 0.9em; color: #666; margin-bottom: 10px;">
Configure background colors for different times of day. Colors will transition smoothly.
</p>
<div id="timeColorsList"></div>
<button id="addTimeColorBtn" class="btn-secondary" style="width: 100%; margin-top: 10px;">+ Add Time Period</button>
</div>
<div id="animatedBackgroundInfo" class="form-group hidden">
<p style="font-size: 0.9em; color: #666; margin-bottom: 10px;">
Animated backgrounds show a sunny day scene and a starry night scene. Choose how to switch between them.
</p>
<div class="form-group">
<label>Day/Night Mode:</label>
<div style="margin-top: 10px;">
<label style="display: block; margin-bottom: 8px;">
<input type="radio" name="dayNightMode" value="auto" checked>
Auto (based on time of day)
</label>
<label style="display: block; margin-bottom: 8px;">
<input type="radio" name="dayNightMode" value="day">
Always Day
</label>
<label style="display: block; margin-bottom: 8px;">
<input type="radio" name="dayNightMode" value="night">
Always Night
</label>
</div>
</div>
<div id="autoModeLocationSettings">
<p style="font-size: 0.9em; color: #666; margin-top: 15px; margin-bottom: 10px;">
In Auto mode, day/night times are calculated based on your location using actual sunrise and sunset times.
</p>
<div class="form-group">
<label>📍 Location for Sunrise/Sunset:</label>
<button id="detectLocationBtn" class="btn-secondary" style="width: 100%; margin-top: 5px;">📍 Auto-detect Location</button>
</div>
<div class="form-group">
<label for="latitudeInput" style="display: block; margin-bottom: 5px;">Latitude:</label>
<input type="number" id="latitudeInput" class="input-field" placeholder="e.g., 40.7128" step="0.0001" min="-90" max="90">
</div>
<div class="form-group">
<label for="longitudeInput" style="display: block; margin-bottom: 5px;">Longitude:</label>
<input type="number" id="longitudeInput" class="input-field" placeholder="e.g., -74.0060" step="0.0001" min="-180" max="180">
</div>
<div id="sunTimesDisplay" style="font-size: 0.85em; color: #666; margin-top: 10px; padding: 8px; background: #f5f5f5; border-radius: 5px;">
<span id="sunTimesText">Location not set. Enable location access or enter coordinates manually.</span>
</div>
</div>
</div>
</div>
<div class="settings-tab-content" data-content="voice">
<h3 style="color: #667eea; margin-bottom: 15px;">🎙️ Text-to-Speech</h3>
<div class="form-group">
<label>
<input type="checkbox" id="enableTTS" checked>
Enable Text-to-Speech for announcements
</label>
</div>
<div class="form-group">
<label for="ttsVoice">Voice:</label>
<select id="ttsVoice" class="input-field">
<option value="">Default Voice</option>
</select>
</div>
<div class="form-group">
<label for="ttsRate">Speech Rate:</label>
<input type="range" id="ttsRate" min="0.5" max="2" step="0.1" value="1" class="slider">
<span id="ttsRateValue">1x</span>
</div>
<div class="form-group">
<label for="ttsPitch">Speech Pitch:</label>
<input type="range" id="ttsPitch" min="0.5" max="2" step="0.1" value="1" class="slider">
<span id="ttsPitchValue">1x</span>
</div>
<div class="form-group">
<button id="testTTS" class="btn-primary">Test Voice</button>
</div>
</div>
<div class="settings-tab-content" data-content="hourly">
<h3 style="color: #667eea; margin-bottom: 15px;">🕐 Hourly Time Announcements</h3>
<div class="form-group">
<label>
<input type="checkbox" id="enableHourlyAnnouncement">
Enable hourly time announcements
</label>
</div>
<div class="form-group">
<label for="hourlyAnnouncementStart">Start Time (24h format):</label>
<input type="time" id="hourlyAnnouncementStart" class="input-field" value="08:00">
</div>
<div class="form-group">
<label for="hourlyAnnouncementEnd">End Time (24h format):</label>
<input type="time" id="hourlyAnnouncementEnd" class="input-field" value="22:00">
</div>
<div class="form-group">
<label for="hourlyAnnouncementFormat">Custom Format (optional):</label>
<input type="text" id="hourlyAnnouncementFormat" class="input-field" placeholder='e.g., "Hey! It is {time}!"'>
</div>
<div class="form-group">
<label>
<input type="checkbox" id="hourlyAnnouncement24Hour">
Use 24-hour format for announcements
</label>
</div>
<div class="form-group">
<button id="testHourlyAnnouncement" class="btn-primary">Test Hourly Announcement</button>
</div>
<p style="font-size: 0.9em; color: #666; margin-top: 10px;">
The clock will announce the time at the top of each hour within this time range.
</p>
</div>
<div class="settings-tab-content" data-content="debug">
<h3 style="color: #ff6b6b; margin-bottom: 15px;">🐛 Debug Mode</h3>
<div class="form-group">
<label>
<input type="checkbox" id="debugModeEnabled">
Enable debug mode (simulate time)
</label>
</div>
<div class="form-group">
<label for="debugSpeed">Simulation Speed:</label>
<input type="number" id="debugSpeed" class="input-field" min="1" max="1000" value="1" step="1">
<p style="font-size: 0.85em; color: #666; margin-top: 5px;">
Speed multiplier (1 = normal speed, 60 = 1 second per minute, 3600 = 1 second per hour)
</p>
</div>
<div class="form-group">
<button id="applyDebugMode" class="btn-primary" style="background-color: #ff6b6b;">Apply Debug Settings</button>
</div>
<p style="font-size: 0.9em; color: #666; margin-top: 10px;">
When enabled, time will be simulated at the specified speed. A red indicator will show the current speed.
</p>
</div>
</div>
</div>
</div>
</div>
<script src="app.js"></script>
<script>
// Register service worker
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('service-worker.js')
.then(reg => console.log('Service Worker registered'))
.catch(err => console.log('Service Worker registration failed', err));
});
}
</script>
</body>
</html>