forked from dinguschan-owo/Helios
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
799 lines (709 loc) · 32.9 KB
/
Copy pathindex.html
File metadata and controls
799 lines (709 loc) · 32.9 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vita Anatis</title>
<link rel="icon" type="image/png" href="https://vitaanatis.github.io/newlogo.png">
<link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Roboto:wght%40300;400;700&display=swap" rel="stylesheet">
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8141368681793084" crossorigin="anonymous"></script>
<style>
@font-face {
font-family: 'Digital Numbers';
src: url('https://raw.githubusercontent.com/VitaAnatis/VitaAnatis.github.io/main/digital-7.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
:root {
--bg-dark-blue: #800080;
--bg-dark-purple: #1F1735;
--text-color-primary: #e0e0e0;
--text-color-secondary: #c0c0c0;
--accent-color-light: #00eaff;
--accent-color-dark: #8f00ff;
--button-bg-start: #8b0000;
--button-bg-end: #8b0000;
--button-hover-start: #ff4500;
--button-hover-end: #cc3700;
--banner-bg: rgba(0, 0, 0, 0.8);
--glass-bg: rgba(255, 255, 255, 0.08);
--glass-border: rgba(255, 255, 255, 0.1);
--discord-purple: #7289DA;
--discord-dark-purple: #6A7EBA;
--chat-bg-color: #A020F0;
--chat-hover-color: #8A2BE2;
--chat-shadow-color: #FFD700;
/* New Intro Colors */
--duck-purple-glow: #EE82EE; /* Violet / lighter purple for glow */
--duck-purple-base: #8A2BE2; /* Blue Violet / deeper purple */
}
body {
margin: 0;
background: linear-gradient(135deg, var(--bg-dark-blue), var(--bg-dark-purple));
overflow: hidden; /* Hide scrollbar during intro */
display: flex;
flex-direction: column;
min-height: 100vh;
font-family: 'Roboto', sans-serif;
color: var(--text-color-primary);
position: relative;
}
body::before {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('https://vitaanatis.github.io/newlogo.png');
background-size: cover;
background-position: center center;
background-repeat: no-repeat;
filter: brightness(0.4) grayscale(0.6);
opacity: 0.7;
z-index: -2;
}
canvas {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
}
/* Intro Overlay */
#intro-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: black;
display: flex;
justify-content: center;
align-items: center;
z-index: 1000; /* Highest z-index */
overflow: hidden;
opacity: 1; /* Start visible */
transition: opacity 1s ease-out;
flex-direction: column; /* Allow duck and text to stack */
}
#duck-walker {
width: 100px; /* Base size for the duck */
height: 100px;
position: relative; /* For pseudo-elements */
opacity: 0; /* Start invisible */
animation: duck-fade-in 1s forwards ease-out,
duck-float 2s 1s infinite alternate ease-in-out, /* Starts after fade in */
duck-fade-out 1s 4s forwards ease-out; /* Starts after a delay (1s fade-in + 2s float + 1s buffer) */
margin-bottom: 30px; /* Space between duck and title */
}
/* Generic Duck Shape using CSS */
#duck-walker::before { /* Body */
content: '';
position: absolute;
width: 100%;
height: 70%;
background-color: var(--duck-purple-base);
border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
bottom: 0;
left: 0;
transform: translateX(-10%); /* Slight body offset */
filter: drop-shadow(0 0 8px var(--duck-purple-glow)) drop-shadow(0 0 15px var(--duck-purple-glow));
}
#duck-walker::after { /* Head */
content: '';
position: absolute;
width: 50%;
height: 50%;
background-color: var(--duck-purple-base);
border-radius: 50%;
top: -10%;
right: 0;
transform: rotate(-15deg); /* Neck bend */
filter: drop-shadow(0 0 8px var(--duck-purple-glow)) drop-shadow(0 0 15px var(--duck-purple-glow));
}
/* Small beak effect - now part of the body's shadow for a glowy look */
#duck-walker::before {
box-shadow: inset 0 0 0 5px orange; /* Represents a beak-like glow effect */
}
#intro-title-container {
display: flex; /* Arrange letters horizontally */
position: relative; /* Allow letters to flow naturally within flex container */
z-index: 1001;
perspective: 1000px; /* For 3D transformations */
}
.intro-letter {
font-family: 'Orbitron', sans-serif;
font-size: 5rem; /* Slightly smaller for better fit */
font-weight: 700;
color: transparent; /* Start transparent */
opacity: 0;
transition: opacity 0.3s ease-out, transform 0.5s ease-out, filter 0.5s ease-out;
white-space: pre; /* Preserve space for ' ' in 'Vita Anatis' */
text-shadow: 0 0 10px rgba(255, 255, 255, 0); /* Start without glow */
padding: 0 5px; /* Spacing between letters */
transform-origin: bottom center; /* For bounce effect */
}
.intro-letter.active {
opacity: 1;
color: white; /* Appear as white text */
animation: letter-appear 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards; /* Bounce effect */
}
.intro-letter.glowing {
animation: letter-glow 0.8s forwards; /* Stronger glow animation */
}
.duck-particle {
position: absolute;
opacity: 0;
filter: drop-shadow(0 0 5px var(--duck-purple-glow));
pointer-events: none; /* Make them unclickable */
width: 25px; /* Small duck base size */
height: 25px;
z-index: 1002; /* Ensure particles are above overlay */
}
.duck-particle::before { /* Body */
content: '';
position: absolute;
width: 100%;
height: 70%;
background-color: var(--duck-purple-base);
border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
bottom: 0;
left: 0;
transform: translateX(-10%);
filter: drop-shadow(0 0 3px var(--duck-purple-glow));
}
.duck-particle::after { /* Head */
content: '';
position: absolute;
width: 50%;
height: 50%;
background-color: var(--duck-purple-base);
border-radius: 50%;
top: -10%;
right: 0;
transform: rotate(-15deg);
filter: drop-shadow(0 0 3px var(--duck-purple-glow));
}
/* Main content styling adjustments */
#main-content {
display: none; /* Controlled by JS */
opacity: 0; /* Fade in */
transition: opacity 1s ease-in;
display: flex; /* Use flexbox for vertical fill */
flex-direction: column;
min-height: 100vh; /* Ensure it fills screen vertically */
position: relative; /* For the absolute positioned icons */
}
.header {
background: rgba(0, 0, 0, 0.6);
padding: 10px 20px;
display: flex;
justify-content: space-between;
align-items: center;
font-family: 'Digital Numbers', monospace;
font-size: 1.5em;
color: var(--accent-color-light);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
z-index: 101;
text-shadow: 0 0 8px var(--accent-color-light);
}
.battery-icon {
font-size: 1.2em;
margin-left: 10px;
}
.clock-container-wrapper {
flex: 1; /* This will make the clock container take available space */
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
z-index: 1;
}
.clock-container {
background: var(--glass-bg);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
border-radius: 15px;
border: 1px solid var(--glass-border);
padding: 30px 40px;
box-shadow: 0 0 25px rgba(0, 234, 255, 0.15), 0 0 10px rgba(255, 87, 245, 0.1);
font-family: 'Orbitron', sans-serif;
color: white;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
max-width: 90%;
}
#main-heading {
font-size: clamp(2.5em, 7vw, 4.5em);
text-shadow: 0 0 20px var(--accent-color-light), 0 0 30px var(--accent-color-dark);
animation: pulseGlow 2s infinite alternate;
margin-bottom: 5px;
}
.email-address {
font-size: 0.8em;
color: var(--text-color-secondary);
margin-top: 0;
text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}
@keyframes pulseGlow {
from { text-shadow: 0 0 15px var(--accent-color-light), 0 0 25px var(--accent-color-dark); }
to { text-shadow: 0 0 25px var(--accent-color-light), 0 0 40px var(--accent-color-dark); }
}
.banner {
width: 100%;
background: var(--banner-bg);
color: white;
text-align: center;
padding: 15px 0;
z-index: 100;
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 12px;
box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.6);
/* This ensures the banner is at the bottom when flex-direction is column */
margin-top: auto;
}
.banner button {
background: linear-gradient(45deg, var(--button-bg-start), var(--button-bg-end));
color: white;
border: none;
padding: 14px 22px;
border-radius: 28px;
font-weight: bold;
font-size: 1.05em;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
position: relative;
overflow: hidden;
}
.banner button::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
transition: left 0.5s ease;
}
.banner button:hover {
background: linear-gradient(45deg, var(--button-hover-start), var(--button-hover-end));
transform: translateY(-4px) scale(1.02);
box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-color-light);
}
.banner button:hover::before {
left: 100%;
}
.discord-link {
position: absolute;
top: 20px;
right: 20px;
z-index: 102;
display: flex;
align-items: center;
justify-content: center;
width: 60px;
height: 60px;
background-color: var(--discord-purple);
border-radius: 50%;
box-shadow: 0 0 15px var(--discord-purple), 0 0 30px var(--accent-color-light);
transition: all 0.3s ease;
}
.discord-link:hover {
transform: scale(1.1) rotate(5deg);
background-color: var(--discord-dark-purple);
box-shadow: 0 0 25px var(--discord-dark-purple), 0 0 40px var(--accent-color-light);
}
.discord-link svg {
width: 35px;
height: 35px;
fill: white;
transition: fill 0.3s ease;
}
.discord-link:hover svg {
fill: #E0E0E0;
}
.chat-link {
position: absolute;
top: 20px;
right: 90px;
z-index: 102;
display: flex;
align-items: center;
justify-content: center;
width: 60px;
height: 60px;
background-color: var(--chat-bg-color);
border-radius: 50%;
box-shadow: 0 0 15px var(--chat-bg-color), 0 0 30px var(--chat-shadow-color);
transition: all 0.3s ease;
}
.chat-link:hover {
transform: scale(1.1) rotate(-5deg);
background-color: var(--chat-hover-color);
box-shadow: 0 0 25px var(--chat-hover-color), 0 0 40px var(--chat-shadow-color);
}
.chat-link svg {
width: 35px;
height: 35px;
fill: white;
transition: fill 0.3s ease;
}
.chat-link:hover svg {
fill: #FFD700;
}
@media (max-width: 768px) {
.header { font-size: 1.2em; padding: 8px 15px; }
#main-heading { font-size: clamp(2em, 8vw, 3.5em); }
.email-address { font-size: 0.7em; }
.clock-container { padding: 25px 30px; }
.banner { padding: 10px; gap: 8px; }
.banner button { padding: 10px 15px; font-size: 0.9em; }
.discord-link, .chat-link { width: 45px; height: 45px; top: 10px; }
.discord-link { right: 10px; }
.chat-link { right: 65px; }
.discord-link svg, .chat-link svg { width: 25px; height: 25px; }
#duck-walker { transform: scale(0.7); margin-bottom: 20px; } /* Smaller duck on mobile */
.intro-letter { font-size: 3.5rem; padding: 0 2px; }
.duck-particle { transform: scale(0.7); }
}
@media (max-width: 480px) {
.banner button { width: calc(50% - 16px); }
}
/* Intro Animations */
@keyframes duck-fade-in {
from { opacity: 0; transform: scale(0.5) translateY(50px); }
to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes duck-float {
0% { transform: scale(1) translateY(0px) rotate(0deg); }
50% { transform: scale(1.05) translateY(-10px) rotate(3deg); }
100% { transform: scale(1) translateY(0px) rotate(0deg); }
}
@keyframes duck-fade-out {
from { opacity: 1; transform: scale(1) translateY(0); }
to { opacity: 0; transform: scale(0.5) translateY(-50px); }
}
@keyframes letter-appear {
0% { opacity: 0; transform: translateY(50px) scale(0.2); filter: blur(10px); }
80% { opacity: 1; transform: translateY(-5px) scale(1.05); filter: blur(0); }
100% { transform: translateY(0) scale(1); }
}
@keyframes letter-glow {
0% { text-shadow: 0 0 10px rgba(255, 255, 255, 0), 0 0 20px rgba(255, 255, 255, 0); }
50% { text-shadow: 0 0 20px var(--duck-purple-glow), 0 0 40px var(--duck-purple-glow), 0 0 60px var(--duck-purple-base); }
100% { text-shadow: 0 0 10px rgba(255, 255, 255, 0), 0 0 20px rgba(255, 255, 255, 0); }
}
@keyframes duck-burst-fly {
0% { transform: translate(0, 0) scale(1); opacity: 1; }
100% { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; }
}
</style>
</head>
<body>
<div id="intro-overlay">
<div id="duck-walker"></div>
<div id="intro-title-container">
</div>
</div>
<div id="main-content">
<a href="https://discord.gg/ysxZmhKp" target="_blank" class="discord-link" aria-label="Join our Discord server">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 245 240">
<path d="M104.4 103.9c-5.7 0-10.2 5-10.2 11.1s4.6 11.1 10.2 11.1c5.7 0 10.2-5 10.2-11.1.1-6.1-4.5-11.1-10.2-11.1zM140.9 103.9c-5.7 0-10.2 5-10.2 11.1s4.6 11.1 10.2 11.1c5.7 0 10.2-5 10.2-11.1s-4.5-11.1-10.2-11.1z"/>
<path d="M189.5 20h-134C44.2 20 35 29.2 35 40.6v135.2c0 11.4 9.2 20.6 20.5 20.6h113.4l-5.3 18.2c-1.3 4.4 1.4 9.1 5.8 10.4 4.4 1.3 9.1-1.4 10.4-5.8l5.4-18.7c-4.7-.7-9.4-1.9-14-3.8l-1.4-1.1-3.2-2.5c-2-.3-4-.4-6-.4h-1.6c-4.2 0-8.2-.7-12-2.1-4.5 4.3-9.4 7.6-14.7 9.8 13.9 4.3 28.2 6.7 42.7 6.7s28.9-2.4 42.7-6.7c-5.3-2.2-10.2-5.5-14.7-9.8-3.8 1.4-7.9 2.1-12.1 2.1-2.1 0-4-.1-6.1-.4l-3.2 2.5-1.4 1.1c-4.6 1.9-9.3 3.1-14 3.8l5.4 18.7c1.3 4.4 6 7.1 10.4 5.8 4.4-1.3 7.1-6 5.8-10.4l-5.3-18.2h11.7c11.4 0 20.6-9.2 20.6-20.6V40.6C210.1 29.2 200.9 20 189.5 20zM92.7 151.7c-4.7 0-8.4-4.2-8.4-9.3 0-5.1 3.8-9.3 8.4-9.3 4.7 0 8.4 4.2 8.4 9.3 0 5.1-3.7 9.3-8.4 9.3zm59.6 0c-4.7 0-8.4-4.2-8.4-9.3 0-5.1 3.8-9.3 8.4-9.3 4.7 0 8.4 4.2 8.4 9.3 0 5.1-3.7 9.3-8.4 9.3z"/>
</svg>
</a>
<a href="https://blipchatv2.onrender.com" target="_blank" class="chat-link" aria-label="Join our Chat server">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z"/>
</svg>
</a>
<div class="header">
<div id="top-left-clock"></div>
<div id="battery-status">
<span id="battery-level"></span>
<span class="battery-icon"></span>
</div>
</div>
<div class="clock-container-wrapper">
<div class="clock-container">
<div id="main-heading">VitaAnatis</div>
<p class="email-address">a683company@gmail.com</p>
</div>
</div>
<div class="banner">
<button onclick="window.open('https://vitaanatis.github.io/aboutblank', '_blank')">About:Blank</button>
<button onclick="window.open('https://vitaanatis.github.io/gaming-escape/games', '_blank')">Gaming Escape</button>
<button onclick="window.open('https://vitaanatis.github.io/uc/games/games.html', '_blank')">Unblocked Cave</button>
<button onclick="window.open('https://vitaanatis.github.io/3kh0', '_blank')">3kh0</button>
<button onclick="window.open('https://vitaanatis.github.io/tgh', '_blank')">Gamehub</button>
<button onclick="window.open('https://vitaanatis.github.io/incredible-website', '_blank')">Incredible Website</button>
<button onclick="window.open('https://vitaanatis.github.io/hub-pro', '_blank')">Hub Pro</button>
<button onclick="window.open('https://vitaanatis.github.io/rena-hub', '_blank')">RenaHub</button>
<button onclick="window.open('https://vitaanatis.github.io/opium/index.html', '_blank')">Opium</button>
<button onclick="window.open('https://vitaanatis.github.io/boredashell/index.html', '_blank')">BoredAsHell</button>
<button onclick="window.open('https://vitaanatis.github.io/evowars', '_blank')">Evowars</button>
<button onclick="window.open('https://vitaanatis.github.io/strongdog', '_blank')">StrongDog XP</button>
<button onclick="window.open('https://vitaanatis.github.io/hypackel/staticproxy/index.html', '_blank')">Hypackel</button>
<button onclick="window.open('https://vitaanatis.github.io/ccported', '_blank')">CCPorted+ (Not working)</button>
</div>
<canvas id="canvas"></canvas>
</div>
<script>
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
let animationFrameId;
function resizeCanvas() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
initParticles();
}
resizeCanvas();
window.addEventListener('resize', resizeCanvas);
const particlesArray = [];
const numberOfParticles = 75;
const maxConnectionDistance = 120;
// --- Top-Left Clock and Battery Logic ---
function updateTopClockAndBattery() {
const clockElement = document.getElementById('top-left-clock');
const now = new Date();
let hours = now.getHours();
const minutes = String(now.getMinutes()).padStart(2, '0');
const seconds = String(now.getSeconds()).padStart(2, '0');
const ampm = hours >= 12 ? 'PM' : 'AM';
hours = hours % 12 || 12;
clockElement.textContent = `${hours}:${minutes}:${seconds} ${ampm}`;
// Battery Status (if supported by browser)
if ('getBattery' in navigator) {
navigator.getBattery().then(function(battery) {
const batteryLevel = Math.floor(battery.level * 100);
const batteryCharging = battery.charging;
const batteryLevelElement = document.getElementById('battery-level');
const batteryIconElement = document.querySelector('.battery-icon');
batteryLevelElement.textContent = `${batteryLevel}%`;
if (batteryCharging) {
batteryIconElement.innerHTML = '☍'; // Charging icon
batteryIconElement.style.color = '#76FF03';
} else if (batteryLevel > 75) {
batteryIconElement.innerHTML = '🔋'; // Full battery icon
batteryIconElement.style.color = '#76FF03';
} else if (batteryLevel > 40) {
batteryIconElement.innerHTML = '🔊'; // Medium battery icon
batteryIconElement.style.color = 'orange';
} else {
batteryIconElement.innerHTML = '🔌'; // Low battery icon
batteryIconElement.style.color = 'red';
}
});
} else {
document.getElementById('battery-status').style.display = 'none';
}
}
setInterval(updateTopClockAndBattery, 1000);
updateTopClockAndBattery();
// --- Ripple Effect Logic ---
function createRipple() {
const x = canvas.width * (0.3 + Math.random() * 0.4);
const y = canvas.height * (0.3 + Math.random() * 0.4);
let radius = 5;
const maxRadius = Math.min(canvas.width, canvas.height) / 3;
let alpha = 0.8;
const speed = 1.5;
function drawRipple() {
ctx.beginPath();
ctx.arc(x, y, radius, 0, Math.PI * 2);
ctx.strokeStyle = `rgba(255, 255, 255, ${alpha})`;
ctx.lineWidth = 2;
ctx.stroke();
}
function animateRipple() {
radius += speed;
alpha -= 0.015;
drawRipple();
if (radius < maxRadius && alpha > 0) {
requestAnimationFrame(animateRipple);
}
}
animateRipple();
}
setInterval(createRipple, 3000);
// --- Particle System Logic ---
class Particle {
constructor(x, y, directionX, directionY, size, color) {
this.x = x;
this.y = y;
this.directionX = directionX;
this.directionY = directionY;
this.size = size;
this.color = color;
}
draw() {
ctx.beginPath();
ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2, false);
ctx.fillStyle = this.color;
ctx.fill();
}
update() {
if (this.x + this.size > canvas.width || this.x - this.size < 0) {
this.directionX = -this.directionX;
}
if (this.y + this.size > canvas.height || this.y - this.size < 0) {
this.directionY = -this.directionY;
}
this.x += this.directionX;
this.y += this.directionY;
this.draw();
}
}
function initParticles() {
particlesArray.length = 0;
for (let i = 0; i < numberOfParticles; i++) {
const size = Math.random() * 3 + 1;
const x = Math.random() * canvas.width;
const y = Math.random() * canvas.height;
const directionX = (Math.random() * 0.8) - 0.4;
const directionY = (Math.random() * 0.8) - 0.4;
const color = `rgba(${Math.floor(Math.random() * 100) + 155}, ${Math.floor(Math.random() * 100) + 155}, ${Math.floor(Math.random() * 100) + 200}, 0.5)`;
particlesArray.push(new Particle(x, y, directionX, directionY, size, color));
}
}
function connectParticles() {
let opacityValue = 1;
for (let a = 0; a < particlesArray.length; a++) {
for (let b = a; b < particlesArray.length; b++) {
let distance = ((particlesArray[a].x - particlesArray[b].x) * (particlesArray[a].x - particlesArray[b].x)) +
((particlesArray[a].y - particlesArray[b].y) * (particlesArray[a].y - particlesArray[b].y));
if (distance < maxConnectionDistance * maxConnectionDistance) {
opacityValue = 1 - (distance / (maxConnectionDistance * maxConnectionDistance));
ctx.strokeStyle = `rgba(255,255,255,${opacityValue * 0.15})`;
ctx.lineWidth = 0.8;
ctx.beginPath();
ctx.moveTo(particlesArray[a].x, particlesArray[a].y);
ctx.lineTo(particlesArray[b].x, particlesArray[b].y);
ctx.stroke();
}
}
}
}
function animateParticles() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
particlesArray.forEach(particle => particle.update());
connectParticles();
animationFrameId = requestAnimationFrame(animateParticles);
}
initParticles();
animateParticles();
</script>
<script>
document.addEventListener('DOMContentLoaded', () => {
const introOverlay = document.getElementById('intro-overlay');
const duckWalker = document.getElementById('duck-walker');
const introTitleContainer = document.getElementById('intro-title-container');
const mainContent = document.getElementById('main-content');
const siteTitle = "Vita Anatis";
const letterElements = [];
// Hide main content initially
mainContent.style.display = 'none';
// Create letter elements
siteTitle.split('').forEach(char => {
const span = document.createElement('span');
span.textContent = char;
span.classList.add('intro-letter');
introTitleContainer.appendChild(span);
letterElements.push(span);
});
// Timings for intro animation
const duckFadeInDuration = 1000; // 1 second
const duckFloatDuration = 2000; // 2 seconds
const duckFadeOutDuration = 1000; // 1 second
const duckTotalPresence = duckFadeInDuration + duckFloatDuration + duckFadeOutDuration; // 4 seconds (1s in + 2s float + 1s out)
const letterDropDelay = 100; // Delay between each letter appearing
const letterGlowDuration = 600; // How long each letter glows
const duckBurstDuration = 800; // Duration for each duck particle to fly away
// Start intro sequence after a brief delay for initial rendering
setTimeout(() => {
// Duck animation starts automatically via CSS
setTimeout(() => {
// Duck has faded out, now start letters
let currentLetterIndex = 0;
const dropNextLetter = () => {
if (currentLetterIndex < letterElements.length) {
const letter = letterElements[currentLetterIndex];
letter.classList.add('active'); // Triggers letter-appear animation
currentLetterIndex++;
setTimeout(dropNextLetter, letterDropDelay);
} else {
// All letters dropped, now make them glow and burst
setTimeout(startLetterGlowAndBurst, 500); // Small delay before glowing
}
};
dropNextLetter();
}, duckTotalPresence); // This timeout waits for the duck's entire animation to complete
}, 100); // Initial slight delay before starting the whole intro sequence
function startLetterGlowAndBurst() {
let glowIndex = 0;
const glowInterval = setInterval(() => {
if (glowIndex < letterElements.length) {
const letter = letterElements[glowIndex];
letter.classList.add('glowing');
setTimeout(() => {
letter.classList.remove('glowing');
createDuckBurst(letter);
letter.style.opacity = 0; // Make original letter disappear
}, letterGlowDuration);
glowIndex++;
} else {
clearInterval(glowInterval);
// All letters have burst, fade out overlay and show main content
setTimeout(() => {
introOverlay.style.opacity = 0;
setTimeout(() => {
introOverlay.style.display = 'none';
mainContent.style.display = 'flex'; // Change to flex to use column layout
document.body.style.overflow = 'auto'; // Re-enable scrolling
mainContent.style.opacity = 1;
}, 1000); // Match intro-overlay transition duration
}, 500); // Small delay after last burst
}
}, letterGlowDuration / 2); // Stagger glow slightly
}
function createDuckBurst(letterElement) {
const rect = letterElement.getBoundingClientRect();
const numDucks = 8; // Number of small ducks per letter
for (let i = 0; i < numDucks; i++) {
const duckParticle = document.createElement('div');
duckParticle.classList.add('duck-particle');
introOverlay.appendChild(duckParticle);
// Random initial position around the letter
const startX = rect.left + rect.width / 2 + (Math.random() * 20 - 10);
const startY = rect.top + rect.height / 2 + (Math.random() * 20 - 10);
duckParticle.style.left = `${startX}px`;
duckParticle.style.top = `${startY}px`;
// Random direction and distance for flying off
const angle = Math.random() * Math.PI * 2; // Full circle
const distance = Math.random() * 200 + 100; // 100 to 300px away
const endX = startX + distance * Math.cos(angle);
const endY = startY + distance * Math.sin(angle);
// Set CSS variables for animation
duckParticle.style.setProperty('--dx', `${endX - startX}px`);
duckParticle.style.setProperty('--dy', `${endY - startY}px`);
// Animate the duck particle
duckParticle.style.animation = `duck-burst-fly ${duckBurstDuration / 1000}s ease-out forwards`;
duckParticle.style.opacity = 1; // Make visible for animation
// Remove after animation
duckParticle.addEventListener('animationend', () => {
duckParticle.remove();
});
}
}
});
</script>
</body>
</html>