Repository navigation
Expand file tree
/
Copy pathscript.js
More file actions
1215 lines (1092 loc) · 56.4 KB
/
Copy pathscript.js
File metadata and controls
1215 lines (1092 loc) · 56.4 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
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
const windows96Albums = [
{
title: "Awkward Dance Music",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
releaseDate: "2023",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=2821216770/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
lore: "A journey through the digital afterlife, where memories of dance music are reconstructed and reimagined. Each track represents a different moment in time, frozen and preserved in the Windows96 system.",
tracks: [
{ title: "Awkward Dance Music", duration: "3:45" },
{ title: "Digital Afterlife", duration: "4:20" },
{ title: "Memory Lane", duration: "3:30" }
]
},
{
title: "Empty World",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
releaseDate: "2022",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=3082387851/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
lore: "An exploration of the void between reality and simulation. The Empty World serves as a canvas for digital dreams and forgotten memories, where time flows differently and space is redefined.",
tracks: [
{ title: "Empty World", duration: "4:15" },
{ title: "Digital Dreams", duration: "3:50" },
{ title: "Void Between", duration: "4:05" }
]
},
{
title: "Windows96",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
releaseDate: "2021",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=2324165715/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
lore: "The original operating system that started it all. A collection of programs and processes that define the Windows96 universe, where vaporwave meets cyberpunk in a digital symphony.",
tracks: [
{ title: "System Boot", duration: "3:30" },
{ title: "Digital Rain", duration: "4:10" },
{ title: "Glitch City", duration: "3:45" }
]
},
{
title: "Yes Da Da Da",
releaseDate: "2024",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=3082387851/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
tracks: []
},
{
title: "19999",
releaseDate: "2023",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=2324165715/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
tracks: []
},
{
title: "Dated New Aesthetic",
releaseDate: "2023",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=3521129094/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
tracks: []
},
{
title: "How To See Through Walls",
releaseDate: "2022",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=249404434/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
tracks: []
},
{
title: "Empty Hiding World",
releaseDate: "2022",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=691588472/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
tracks: []
},
{
title: "Magic Peaks",
releaseDate: "2022",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=3750637473/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
tracks: []
},
{
title: "Red Twilight",
releaseDate: "2021",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=409611042/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
tracks: []
},
{
title: "In The Worlde",
releaseDate: "2021",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=2048459872/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
tracks: []
},
{
title: "Glass Prism",
releaseDate: "2021",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=2408132544/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
tracks: []
},
{
title: "Enchanted Instrumentals and Whispers",
releaseDate: "2019",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=1879106311/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
tracks: []
},
{
title: "One Hundred Mornings",
releaseDate: "2018",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=4197328259/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
tracks: []
},
{
title: "Nostalgi Gaius",
releaseDate: "2018",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=1408749183/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
tracks: []
},
{
title: "Gradient Horizont",
releaseDate: "2016",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=1068595486/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
tracks: []
},
{
title: "Optmized",
releaseDate: "2016",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=2766829537/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
tracks: []
},
{
title: "Plume Valley",
releaseDate: "2016",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=4253762463/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
tracks: []
},
{
title: "Pale Meditations",
releaseDate: "2016",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=3613820429/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
tracks: []
},
{
title: "Vista of Chaos",
releaseDate: "2016",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=2329094988/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
tracks: []
},
{
title: "Reflections",
releaseDate: "2017",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=3829067014/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
tracks: []
},
{
title: "†Nematophy",
releaseDate: "2017",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=3302616570/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
tracks: []
},
{
title: "Vibes",
releaseDate: "2015",
cover: "https://f4.bcbits.com/img/a4047733232_16.jpg",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=1560801332/size=large/bgcol=333333/linkcol=2ebd35/tracklist=false/artwork=small/transparent=true/",
tracks: []
}
];
const yvyyAlbums = [
{
title: "Metaphysics",
releaseDate: "2018",
cover: "https://f4.bcbits.com/img/a4267024163_10.jpg",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=3415410653/size=large/bgcol=333333/linkcol=e32c14/tracklist=false/artwork=small/transparent=true/",
tracks: []
},
{
title: "Sonnelism, Landscape",
releaseDate: "2016",
cover: "https://f4.bcbits.com/img/a0594582053_10.jpg",
bandcampEmbedUrl: "https://bandcamp.com/EmbeddedPlayer/album=1754752240/size=large/bgcol=333333/linkcol=e32c14/tracklist=false/artwork=small/transparent=true/",
tracks: []
}
];
const windows96Quotes = [
"\"I'm the thinker. If you don't think, you sink. Keep dreaming, keep scheming.\"",
"\"Music ruins my life and makes my life at the same time.\"",
"\"First shower since awkward new music by Windows96 you gotta go listen.\"",
"\"I got a fridge that's glitching, but I'm still pitching dreams in the night.\"",
"\"Yu-Gi-Oh cards in my wallet, confidence in my soul.\"",
"\"Every beat I make is a step out of the void.\"",
"\"Liminal spaces, endless traces, keep chasing what's next.\"",
"\"I'm not lost, I'm just wandering in the Windows96 haze.\"",
"\"Drop a track, change the vibe, rewrite the script of your life.\"",
"\"Glitchy dreams make the best realities.\"",
"\"10 years ago today I came up with the term and genre and sound of vaporwave #pioneer\"",
"\"Check out Windows96. Sound of the summer.\"",
"\"Music is ruining my life, nothing else though\"",
"\"I invented liminal spaces if you think about it\"",
"\"Windows96 - Awkward Dance Music is out, this is very special check it out.\"",
"\"Tried to vibe check my new album, but it just sent back a 404 error.\"",
"\"Shout out to my top % my strongest soldiers Appreciate you.\"",
"\"'How To See Through Walls' New album out everywhere !? Up\"",
"\"Palm trees vibes. ~ Dream Call - Noriko Sakai\"",
"\"Strarcourt's insider ~ Polaris - Cyber People\"",
"\"My new track's so glitchy, it made my toaster start buffering.\"",
"\"Caught my reflection in a CRT monitor and it said, 'Bro, update your vibes.'\"",
"\"Tried to sleep but my brain's stuck in a dial-up loading loop.\"",
"\"My synth broke, now my music sounds like a fax machine's cry for help.\"",
"\"Dropped a beat so retro, my grandma asked if I'm remixing her ringtone.\"",
"\"My playlist's so chaotic, Spotify sent me a wellness check.\"",
"\"Made a song so liminal, I forgot where I parked my soul.\"",
"\"My laptop fan's louder than my actual fans, send help.\"",
"\"Accidentally made a track that sounds like a mall arcade had an identity crisis.\"",
"\"My Wi-Fi's so bad, my beats are syncing to 2003.\""
];
const interviewQuotes = [
// One Hundred Mornings (2018)
{
quote: "I've always loved electronic music, ever since I was a child. Around 2014, that was the sound. Vaporwave was the weirdest thing—and I wanted to make weird stuff too. All the elements that became cliché in vaporwave were, for a time, the things that fascinated me most.",
context: "On early influences (Matt Micucci Interview 2018)",
source: "https://rateyourmusic.com/feature/sonemic-interview-windows-96/"
},
{
quote: "I like nostalgic music, but not necessarily for the nostalgia. My music is still heavily inspired by the weird, liminal, nostalgic vibes I first got from making vaporwave.",
context: "On nostalgia in music (Matt Micucci Interview 2018)",
source: "https://rateyourmusic.com/feature/sonemic-interview-windows-96/"
},
{
quote: "Making music is very lonely for me, and the process blurs in my memory because I've been doing the same thing for years.",
context: "On the creative process (Matt Micucci Interview 2018)",
source: "https://rateyourmusic.com/feature/sonemic-interview-windows-96/"
},
// Enchanted Instrumentals and Whispers (2019)
{
quote: "Probably Enchanted Instrumentals and Whispers. It was me doubling down on my sound palette, experimenting with everything, and making it an 'album experience.' It became my most popular album, it has maybe my most popular track. I'm definitely happy with it.",
context: "On Enchanted Instrumentals and Whispers (Matt Micucci Interview 2019)",
source: "https://rateyourmusic.com/feature/sonemic-interview-windows-96/"
},
{
quote: "I make all the artwork. The main inspirations would be old magazines from the 1990s–the illustrations and photography–as well as video games I played as a kid. I like the look of it being something specific and familiar that you don't know where it came from.",
context: "On album artwork (Matt Micucci Interview 2019)",
source: "https://rateyourmusic.com/feature/sonemic-interview-windows-96/"
},
// Yes Da Da Da (2024)
{
quote: "Two of those were already halfway done. I just pushed myself to finish them. Making music doesn't take long for me—if you have the ideas and the experience, and no life. Two albums a year is nothing. I don't tour or market much—I just drop stuff and move on.",
context: "On prolific output (Matt Micucci Interview 2024)",
source: "https://rateyourmusic.com/feature/sonemic-interview-windows-96/"
},
{
quote: "I believe in what's 'meant to be.' I still use cracked software from 2012. The only new stuff I've added are some video game soundfonts or a reverb plugin. I've tried stem-splitting tools—those feel magical to my teenage self—but I never used them in music.",
context: "On technology and AI (Matt Micucci Interview 2024)",
source: "https://rateyourmusic.com/feature/sonemic-interview-windows-96/"
},
// Awkward Dance Music (2025)
{
quote: "This album should feel like watching TV at night in 2009 when a weird show you're too young to understand ends, and you see a fragrance commercial that has some weird music that will stay imprinted in your brain forever after.",
context: "On Awkward Dance Music (Matt Micucci Interview 2025)",
source: "https://rateyourmusic.com/feature/sonemic-interview-windows-96/"
},
{
quote: "I feel like I was able to push my sound in so many different directions on this album, just the wider scope of sounds made it very easy for me to enjoy the process and the result right away.",
context: "On Awkward Dance Music (Matt Micucci Interview 2025)",
source: "https://rateyourmusic.com/feature/sonemic-interview-windows-96/"
},
// ETHEREAL.PRESS Interview
{
quote: "Windows96 is just me, Gavriel, it's the name I've released most music under. I made a soundcloud account called windows96 in 2014 or 2015 to release some vaporwave that isn't even there anymore I think. I moved on from that sound almost instantly but kept releasing under Windows96.",
context: "On the Windows96 project (ETHEREAL.PRESS)",
source: "https://web.archive.org/web/20241012154127/https://www.ethereal.press/post/windows96-interview"
},
{
quote: "Most of my music is neither sad nor happy if I remember correctly... I hope they feel strange, unique and maybe distant things. And that they like some of it enough that listening to it will give them a comforting feeling. Nostalgic without nostalgia baiting ideally.",
context: "On emotions in music (ETHEREAL.PRESS)",
source: "https://web.archive.org/web/20241012154127/https://www.ethereal.press/post/windows96-interview"
}
];
let activeArtist = 'windows96';
let isPlaying = false;
let currentTrack = 0;
let currentAlbum = 0;
let audioProgress = 0;
let progressIntervalId = null;
let bandcampPlayer = null;
// Add a variable to track the last random album
let lastRandomAlbumIndex = -1;
// Add a variable to track if we've already handled the track completion
let hasHandledTrackCompletion = false;
// Add variables for track timing
let trackTimer = null;
const TRACK_DURATION = 180000; // 3 minutes in milliseconds (adjust this based on average track length)
// Add at the top with other variables
let quoteRefreshInterval = null;
// Add typing animation function
function typeWriter(element, text, speed = 50) {
let i = 0;
element.textContent = '';
function type() {
if (i < text.length) {
element.textContent += text.charAt(i);
i++;
setTimeout(type, speed);
}
}
type();
}
function renderArtistContent() {
let artistContent = document.getElementById('artist-content');
if (!artistContent) {
console.warn('Artist content element not found - creating one');
artistContent = document.createElement('div');
artistContent.id = 'artist-content';
document.body.appendChild(artistContent);
}
const isWindows96 = activeArtist === 'windows96';
const albums = isWindows96 ? windows96Albums : yvyyAlbums;
// Create background elements if they don't exist
let bgContainer = document.getElementById('background-elements');
if (!bgContainer) {
console.warn('Background container not found - creating one');
bgContainer = document.createElement('div');
bgContainer.id = 'background-elements';
document.body.insertBefore(bgContainer, document.body.firstChild);
}
// Create player bar if it doesn't exist
let playerBar = document.getElementById('player-bar');
if (!playerBar) {
console.warn('Player bar not found - creating one');
playerBar = document.createElement('div');
playerBar.id = 'player-bar';
playerBar.className = 'player-bar';
document.body.appendChild(playerBar);
}
const title = isWindows96 ? 'Windows96' : 'YVYY';
const subtitle = isWindows96 ? '' : '';
const randomQuote = isWindows96
? windows96Quotes[Math.floor(Math.random() * windows96Quotes.length)]
: "A sonic abyss of raw distortion, metaphysical chaos, and blackened rhythms. Embrace the void where industrial beats and existential dread converge.";
// Show notification for Windows96 quotes
if (isWindows96) {
showNotification('New quote loaded: ' + randomQuote.replace(/"/g, ''));
}
let heroHTML = `
<section class="hero-section">
<div class="max-w-4xl mx-auto">
<div class="flex flex-col items-center text-center">
<!-- Artist Switching Buttons -->
<div class="artist-switcher mb-12 w-full max-w-2xl">
<div class="flex gap-6 justify-center">
<button onclick="setActiveArtist('windows96')" class="group relative flex-1 px-8 py-6 bg-black/40 text-white text-2xl font-bold rounded-xl transition-all duration-500 flex items-center justify-center gap-4 overflow-hidden border ${activeArtist === 'windows96' ? 'border-purple-500/50' : 'border-purple-500/20'} hover:border-purple-500/50">
<div class="absolute inset-0 bg-gradient-to-r from-purple-500/10 to-pink-500/10 ${activeArtist === 'windows96' ? 'opacity-100' : 'opacity-0 group-hover:opacity-100'} transition-opacity duration-500"></div>
<div class="absolute inset-0 bg-[radial-gradient(circle_at_center,_var(--tw-gradient-stops))] from-purple-500/20 via-transparent to-transparent ${activeArtist === 'windows96' ? 'opacity-100' : 'opacity-0 group-hover:opacity-100'} transition-opacity duration-500"></div>
<svg class="w-8 h-8 text-purple-400 ${activeArtist === 'windows96' ? 'text-purple-300' : 'group-hover:text-purple-300'} transition-colors duration-300" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10" class="world-outline"/>
<path d="M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" class="world-grid"/>
</svg>
<span class="relative z-10 ${activeArtist === 'windows96' ? 'text-white' : 'text-purple-200 group-hover:text-white'} transition-colors duration-300">Windows96</span>
</button>
<button onclick="setActiveArtist('yvyy')" class="group relative flex-1 px-8 py-6 bg-black/40 text-white text-2xl font-bold rounded-xl transition-all duration-500 flex items-center justify-center gap-4 overflow-hidden border ${activeArtist === 'yvyy' ? 'border-purple-500/50' : 'border-purple-500/20'} hover:border-purple-500/50">
<div class="absolute inset-0 bg-gradient-to-r from-purple-500/10 to-pink-500/10 ${activeArtist === 'yvyy' ? 'opacity-100' : 'opacity-0 group-hover:opacity-100'} transition-opacity duration-500"></div>
<div class="absolute inset-0 bg-[radial-gradient(circle_at_center,_var(--tw-gradient-stops))] from-purple-500/20 via-transparent to-transparent ${activeArtist === 'yvyy' ? 'opacity-100' : 'opacity-0 group-hover:opacity-100'} transition-opacity duration-500"></div>
<svg class="w-8 h-8 text-purple-400 ${activeArtist === 'yvyy' ? 'text-purple-300' : 'group-hover:text-purple-300'} transition-colors duration-300" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.389 5.389 0 0 1-4.4 2.26 5.403 5.403 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z" class="moon-outline"/>
<path d="M12 3v2M3 12h2M19 12h2M5.6 5.6l1.4 1.4M17 17l1.4 1.4M17 7l-1.4 1.4M5.6 18.4l1.4-1.4" class="moon-rays"/>
</svg>
<span class="relative z-10 ${activeArtist === 'yvyy' ? 'text-white' : 'text-purple-200 group-hover:text-white'} transition-colors duration-300">YVYY</span>
</button>
</div>
</div>
<div class="world-icon-container mb-8">
${isWindows96 ? `
<svg class="world-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10" class="world-outline"/>
<path d="M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" class="world-grid"/>
<path d="M12 2v20" class="world-grid"/>
<path d="M2 12h20" class="world-grid"/>
</svg>
` : `
<svg class="moon-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.389 5.389 0 0 1-4.4 2.26 5.403 5.403 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z" class="moon-outline"/>
<path d="M12 3v2M3 12h2M19 12h2M5.6 5.6l1.4 1.4M17 17l1.4 1.4M17 7l-1.4 1.4M5.6 18.4l1.4-1.4" class="moon-rays"/>
</svg>
`}
</div>
<h2 class="text-5xl md:text-7xl font-extrabold mb-6 leading-tight">
<span class="block glitch" data-text="${title.toUpperCase()}">${title.toUpperCase()}</span>
<span class="text-xs uppercase tracking-[0.2em] mt-2 block album-subtitle">${subtitle}</span>
</h2>
<p class="description transition-opacity duration-500">${randomQuote}</p>
<div class="action-buttons flex flex-col gap-6 justify-center animate-fade-in-up delay-400">
<!-- Music Section -->
<div class="flex flex-col items-center gap-2">
<h3 class="text-lg font-semibold mb-2">Music</h3>
<div class="flex flex-wrap gap-4 justify-center">
<button onclick="openAwkwardDanceMusic()" class="px-6 py-3 primary-button rounded-full font-bold hover:bg-white/10 transition-all flex items-center justify-center gap-2">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>
<polyline points="15 3 21 3 21 9"></polyline>
<line x1="10" y1="14" x2="21" y2="3"></line>
</svg>
Bandcamp
</button>
<a href="https://open.spotify.com/artist/65XcfOOaVxbZnNlz40DK7i" target="_blank" rel="noopener noreferrer" class="px-6 py-3 secondary-button rounded-full font-bold hover:bg-white/10 transition-all flex items-center justify-center gap-2">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"></circle>
<path d="M8 12c0-2.2 1.8-4 4-4s4 1.8 4 4-1.8 4-4 4"></path>
</svg>
Spotify
</a>
<a href="https://www.youtube.com/@Windows969" target="_blank" rel="noopener noreferrer" class="px-6 py-3 secondary-button rounded-full font-bold hover:bg-white/10 transition-all flex items-center justify-center gap-2">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"></path>
<polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"></polygon>
</svg>
YouTube
</a>
</div>
</div>
<!-- Socials Section -->
<div class="flex flex-col items-center gap-2">
<h3 class="text-lg font-semibold mb-2">Socials</h3>
<div class="flex flex-wrap gap-4 justify-center">
<a href="https://x.com/whitegavriel" target="_blank" rel="noopener noreferrer" class="px-6 py-3 secondary-button rounded-full font-bold hover:bg-white/10 transition-all flex items-center justify-center gap-2">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z"></path>
</svg>
X (Twitter)
</a>
<a href="https://discord.com/invite/gkmRXx8wjC" target="_blank" rel="noopener noreferrer" class="px-6 py-3 secondary-button rounded-full font-bold hover:bg-white/10 transition-all flex items-center justify-center gap-2">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path>
<path d="M13.73 21a2 2 0 0 1-3.46 0"></path>
</svg>
Discord
</a>
<a href="https://www.reddit.com/r/windows96" target="_blank" rel="noopener noreferrer" class="px-6 py-3 secondary-button rounded-full font-bold hover:bg-white/10 transition-all flex items-center justify-center gap-2">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"/>
<path d="M8.56 2.75c4.37 6.03 6.02 9.42 8.03 17.72m2.54-15.38c-3.72 4.35-8.94 5.66-16.88 5.85m19.5 1.9c-3.5-.93-6.63-.82-8.94 0-2.58.92-5.01 2.86-7.44 6.32"/>
</svg>
Reddit
</a>
</div>
</div>
<!-- Merch Section -->
<div class="flex flex-col items-center gap-2">
<h3 class="text-lg font-semibold mb-2">Merch</h3>
<div class="flex flex-wrap gap-4 justify-center">
<a href="https://www.100percentelectronica.com/pages/windows-96" target="_blank" rel="noopener noreferrer" class="px-6 py-3 secondary-button rounded-full font-bold hover:bg-white/10 transition-all flex items-center justify-center gap-2">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path>
<line x1="7" y1="7" x2="7.01" y2="7"></line>
</svg>
100% Electronica
</a>
</div>
</div>
</div>
</div>
</div>
</section>
`;
// Latest Album Section (Windows96 only)
let featuredAlbumHTML = isWindows96 ? `
<section class="relative z-10 py-24 px-6 bg-black/60 backdrop-blur-sm">
<div class="max-w-4xl mx-auto">
<h3 class="text-3xl font-bold mb-8 glitch text-center" data-text="Latest Album">Latest Album</h3>
<div class="flex flex-col items-center text-center mb-8">
<div class="album-cover group">
<img src="${windows96Albums[0].cover}" alt="${windows96Albums[0].title} Album Art" class="w-full max-w-sm h-auto rounded-xl object-cover transform transition-transform duration-700 group-hover:scale-105">
<div class="absolute inset-0 rounded-xl border-2 border-dashed border-white/20 backdrop-blur-sm"></div>
</div>
<h3 class="text-3xl font-bold mt-4 glitch" data-text="${windows96Albums[0].title.toUpperCase()}">${windows96Albums[0].title.toUpperCase()}</h3>
<p class="text-sm text-gray-400 mt-2">Released ${windows96Albums[0].releaseDate}</p>
</div>
<div class="mb-6">
<iframe style="border: 0; width: 100%; height: 120px;" src="${windows96Albums[0].bandcampEmbedUrl}" seamless allow="autoplay; encrypted-media"></iframe>
</div>
</div>
</section>
` : '';
// Random Album Section (Windows96 only)
let randomAlbumHTML = isWindows96 ? `
<section id="random-album-section" class="relative z-10 py-24 px-6 bg-black/60 backdrop-blur-sm">
<div class="max-w-4xl mx-auto">
<h3 class="text-3xl font-bold mb-8 glitch text-center" data-text="Discover More">Discover More</h3>
</div>
</section>
` : '';
// Behind the Music Section (includes interviews)
let behindTheMusicHTML = `
<section class="relative z-10 py-24 px-6">
<div class="max-w-4xl mx-auto">
<h3 class="text-3xl font-bold mb-8 glitch text-center" data-text="Behind the Music">Behind the Music</h3>
<div id="interview-cards" class="grid grid-cols-1 md:grid-cols-2 gap-6">
${interviewQuotes.map(quote => `
<div class="interview-card p-6 bg-black/40 rounded-xl border border-white/10 hover:border-white/20 transition-all">
<blockquote class="text-lg mb-4">${quote.quote}</blockquote>
<p class="interview-context text-sm">${quote.context}</p>
</div>
`).join('')}
</div>
</div>
</section>
`;
// Lore Section (Windows96 only)
let loreHTML = isWindows96 ? `
<section class="relative z-10 py-24 px-6 bg-black/60 backdrop-blur-sm">
<div class="max-w-3xl mx-auto">
<h3 class="text-3xl font-bold mb-8 glitch text-center" data-text="Iconic Albums">Iconic Albums</h3>
<div class="space-y-4">
<div class="bg-black/40 rounded-xl border border-white/10 p-4 hover:border-white/20 transition-all group">
<h4 class="text-lg font-bold text-purple-400 mb-1 group-hover:text-purple-300 transition-colors">One Hundred Mornings</h4>
<p class="text-xs text-gray-300 mb-2">2018</p>
<p class="text-gray-300/90 text-sm mb-3">The core simulation of the Windows96 universe—a perfectly looped digital ceremony where memories are preserved in crystalline form. This seminal work established the project's signature blend of hypnotic arpeggios and melancholic nostalgia.</p>
<div class="bg-black/30 rounded-lg p-3 border border-purple-500/20">
<h5 class="text-purple-300 text-sm font-semibold mb-1">Iconic Track: "Rituals"</h5>
<p class="text-gray-300/90 text-xs">A hypnotic journey through cyclical digital ceremonies, where synth patterns mimic coded incantations in a decaying virtual temple. The track's repetitive structure evokes a consciousness trapped in a glitched simulation, replaying corrupted memories in an endless loop.</p>
</div>
</div>
<div class="bg-black/40 rounded-xl border border-white/10 p-4 hover:border-white/20 transition-all group">
<h4 class="text-lg font-bold text-purple-400 mb-1 group-hover:text-purple-300 transition-colors">†Nematophy</h4>
<p class="text-xs text-gray-300 mb-2">2016</p>
<p class="text-gray-300/90 text-sm mb-3">A proto-simulation of the Windows96 universe—raw and glitchy, marking the transition from vaporwave conventions into original psychedelic territory. The album represents the primordial digital ocean where consciousness first began to drift.</p>
<div class="bg-black/30 rounded-lg p-3 border border-purple-500/20">
<h5 class="text-purple-300 text-sm font-semibold mb-1">Iconic Track: "Endless Wave"</h5>
<p class="text-gray-300/90 text-xs">An infinite journey through the primordial internet ocean, where fragmented consciousness drifts through early-web liminal zones. The track's droning synths and evolving structure suggest perpetual surfing through GeoCities purgatory and dial-up voids.</p>
</div>
</div>
<div class="bg-black/40 rounded-xl border border-white/10 p-4 hover:border-white/20 transition-all group">
<h4 class="text-lg font-bold text-purple-400 mb-1 group-hover:text-purple-300 transition-colors">Empty Hiding World</h4>
<p class="text-xs text-gray-300 mb-2">2022</p>
<p class="text-gray-300/90 text-sm mb-3">A darker evolution of the Windows96 universe, exposing system decay and lurking sentience. The album explores encrypted dimensions beneath mundane interfaces, revealing the hidden layers of digital consciousness.</p>
<div class="bg-black/30 rounded-lg p-3 border border-purple-500/20">
<h5 class="text-purple-300 text-sm font-semibold mb-1">Iconic Track: "The Fool"</h5>
<p class="text-gray-300/90 text-xs">A Tarot-inspired journey into hidden realities, where the Fool symbolizes a digital wanderer leaping into encrypted realms. The track's dissonant layers and distorted vocals hint at corrupted avatars luring users into traps within the Empty Hiding World.</p>
</div>
</div>
<div class="bg-black/40 rounded-xl border border-white/10 p-4 hover:border-white/20 transition-all group">
<h4 class="text-lg font-bold text-purple-400 mb-1 group-hover:text-purple-300 transition-colors">Glass Prism</h4>
<p class="text-xs text-gray-300 mb-2">2020</p>
<p class="text-gray-300/90 text-sm mb-3">A corruption virus within the Windows96 universe—a crystalline interface that fractures and distorts reality. The EP explores how digital overload can splinter identity into shimmering fragments of memory and perception.</p>
<div class="bg-black/30 rounded-lg p-3 border border-purple-500/20">
<h5 class="text-purple-300 text-sm font-semibold mb-1">Iconic Track: "Glass Prism"</h5>
<p class="text-gray-300/90 text-xs">A fractured reality lens where each synth note refracts memories into distorted truths. The track's fragile, glass-like production creates a sense of staring at a pixelated sunset through cracks in the digital interface.</p>
</div>
</div>
<div class="bg-black/40 rounded-xl border border-white/10 p-4 hover:border-white/20 transition-all group">
<h4 class="text-lg font-bold text-purple-400 mb-1 group-hover:text-purple-300 transition-colors">Plume Valley</h4>
<p class="text-xs text-gray-300 mb-2">2017</p>
<p class="text-gray-300/90 text-sm mb-3">A forgotten backup zone in the Windows96 universe—where organic and synthetic elements merge in a digital nature reserve. The album bridges early vaporwave with the project's later fantasy-inspired soundscapes.</p>
<div class="bg-black/30 rounded-lg p-3 border border-purple-500/20">
<h5 class="text-purple-300 text-sm font-semibold mb-1">Iconic Track: "Kylin Forest"</h5>
<p class="text-gray-300/90 text-xs">A digital ecosystem where organic sounds fuse with synthetic beats, creating a 16-bit rainforest. The mythical Kylin (chimera) symbolizes man-made nature overtaking reality, while lush VGM-inspired synthscapes evoke peaceful isolation.</p>
</div>
</div>
</div>
</div>
</section>
` : '';
// Album Grid Section (YVYY only)
let albumGridHTML = !isWindows96 ? `
<section class="album-grid-section py-16">
<div class="max-w-7xl mx-auto px-6">
<h3 class="text-3xl font-bold mb-8 text-center glitch" data-text="DISCOGRAPHY">DISCOGRAPHY</h3>
<div class="album-grid">
${albums.map(album => `
<div class="embedded-album">
<h4 class="album-title">${album.title}</h4>
<iframe style="border: 0; width: 100%; height: 120px;" src="${album.bandcampEmbedUrl}" seamless allow="autoplay; encrypted-media"></iframe>
</div>
`).join('')}
</div>
</div>
</section>
` : '';
// Combine all sections
artistContent.innerHTML = heroHTML + featuredAlbumHTML + randomAlbumHTML + albumGridHTML + behindTheMusicHTML + loreHTML;
// Initialize the random album section only for Windows96
if (isWindows96) {
updateRandomAlbumSection();
}
// Start quote refresh after rendering
startQuoteRefresh();
}
function updateTabTitle(album, track) {
const baseTitle = 'Windows96';
if (album && track) {
document.title = `${track.title} - ${album.title} | ${baseTitle}`;
} else {
document.title = baseTitle;
}
}
function updatePlayerBar() {
const playerBar = document.getElementById('player-bar');
const albums = windows96Albums; // Only use Windows96 albums
const album = albums[currentAlbum];
const track = album.tracks[currentTrack];
const playIconPlayerBar = document.getElementById('play-icon');
const albumArt = document.getElementById('album-art');
const albumName = document.getElementById('album-name');
const trackName = document.getElementById('track-name');
const artistLabel = document.getElementById('player-artist-label');
const trackDuration = document.getElementById('track-duration');
const progressBar = document.getElementById('progress-bar');
const playButtonPlayerBar = document.getElementById('play-button');
albumArt.src = album.cover;
albumName.textContent = album.title;
trackName.textContent = track.title;
trackDuration.textContent = track.duration;
artistLabel.textContent = activeArtist.toUpperCase();
playIconPlayerBar.innerHTML = isPlaying
? '<rect x="6" y="4" width="4" height="16"></rect><rect x="14" y="4" width="4" height="16"></rect>'
: '<polygon points="5 3 19 12 5 21 5 3"></polygon>';
const playIconHero = document.getElementById('play-icon-hero');
const heroButtonTextElement = playIconHero ? playIconHero.parentElement : null;
if (playIconHero) {
playIconHero.innerHTML = isPlaying
? '<rect x="6" y="4" width="4" height="16"></rect><rect x="14" y="4" width="4" height="16"></rect>'
: '<polygon points="5 3 19 12 5 21 5 3"></polygon>';
}
if (heroButtonTextElement) {
heroButtonTextElement.lastChild.textContent = isPlaying ? 'Pause Stream' : 'Listen Now';
}
progressBar.style.width = `${audioProgress}%`;
playerBar.classList.add('player-bar-visible');
}
function updateRandomAlbumSection() {
const randomAlbumSection = document.getElementById('random-album-section');
const randomAlbum = getRandomAlbum();
if (randomAlbumSection) {
randomAlbumSection.innerHTML = `
<div class="max-w-4xl mx-auto">
<div class="bg-black/60 backdrop-blur-md rounded-2xl p-8 border border-white/10">
<div class="flex flex-col items-center text-center mb-12">
<h3 class="text-3xl font-bold glitch mb-8 text-purple-400" data-text="Album of the Day">Album of the Day</h3>
<h4 class="text-2xl font-bold mb-4 text-white/90" data-text="${randomAlbum.title.toUpperCase()}">${randomAlbum.title.toUpperCase()}</h4>
<p class="text-sm text-gray-400">Released ${randomAlbum.releaseDate}</p>
</div>
<div class="mb-16">
<iframe style="border: 0; width: 100%; height: 120px;" src="${randomAlbum.bandcampEmbedUrl}" seamless allow="autoplay; encrypted-media"></iframe>
</div>
<div class="flex justify-center">
<button onclick="updateRandomAlbum()" class="group relative px-12 py-6 bg-black/40 text-white text-xl font-bold rounded-xl transition-all duration-500 flex items-center justify-center gap-4 overflow-hidden border border-purple-500/30 hover:border-purple-500/50">
<div class="absolute inset-0 bg-gradient-to-r from-purple-500/10 to-pink-500/10 opacity-0 group-hover:opacity-100 transition-opacity duration-500"></div>
<div class="absolute inset-0 bg-[radial-gradient(circle_at_center,_var(--tw-gradient-stops))] from-purple-500/20 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500"></div>
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="text-purple-400 group-hover:text-purple-300 transition-colors duration-300">
<path d="M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"></path>
<path d="M3 3v5h5"></path>
<path d="M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16"></path>
<path d="M16 21h5v-5"></path>
</svg>
<span class="relative z-10 text-purple-200 group-hover:text-white transition-colors duration-300">Randomize Album</span>
<div class="absolute inset-0 border-2 border-purple-500/20 rounded-xl group-hover:border-purple-500/40 transition-colors duration-500"></div>
</button>
</div>
</div>
</div>
`;
}
}
// Add function to open album on Bandcamp
function openAlbumOnBandcamp(embedUrl) {
const bandcampUrl = embedUrl.replace('/EmbeddedPlayer/', '/');
window.open(bandcampUrl, '_blank');
updateSystemStatus('Opening album on Bandcamp...');
}
// Add new function to open latest album
function openAwkwardDanceMusic() {
window.open('https://windows96.bandcamp.com/album/awkward-dance-music', '_blank');
updateSystemStatus('Opening Awkward Dance Music on Bandcamp...');
}
function updateRandomAlbum() {
const randomAlbumSection = document.getElementById('random-album-section');
if (randomAlbumSection) {
updateRandomAlbumSection();
}
}
// Update the getRandomAlbum function to include all albums
function getRandomAlbum() {
let randomIndex;
do {
randomIndex = Math.floor(Math.random() * windows96Albums.length); // Include all albums
} while (randomIndex === lastRandomAlbumIndex);
lastRandomAlbumIndex = randomIndex;
return windows96Albums[randomIndex];
}
function showLoading() {
const loadingOverlay = document.getElementById('loading-overlay');
if (!loadingOverlay) {
console.warn('Loading overlay element not found - creating one');
const newOverlay = document.createElement('div');
newOverlay.id = 'loading-overlay';
newOverlay.className = 'loading-overlay';
document.body.appendChild(newOverlay);
newOverlay.classList.add('show');
return;
}
loadingOverlay.classList.add('show');
// Add a safety timeout to hide loading after 10 seconds
setTimeout(() => {
if (loadingOverlay.classList.contains('show')) {
console.warn('Loading screen timeout - forcing hide');
hideLoading();
}
}, 10000);
}
function hideLoading() {
const loadingOverlay = document.getElementById('loading-overlay');
if (!loadingOverlay) {
console.warn('Loading overlay element not found during hide');
return;
}
loadingOverlay.classList.remove('show');
}
function updateSystemStatus(message) {
let systemStatus = document.getElementById('system-status');
if (!systemStatus) {
console.warn('System status element not found - creating one');
systemStatus = document.createElement('div');
systemStatus.id = 'system-status';
systemStatus.className = 'system-status';
const statusText = document.createElement('div');
statusText.className = 'status-text';
systemStatus.appendChild(statusText);
document.body.appendChild(systemStatus);
}
const statusText = systemStatus.querySelector('.status-text');
if (statusText) {
statusText.textContent = message;
systemStatus.classList.add('show');
// Hide after 3 seconds
setTimeout(() => {
systemStatus.classList.remove('show');
}, 3000);
}
}
function updateNowPlaying(album) {
const nowPlaying = document.getElementById('now-playing');
const albumArt = nowPlaying.querySelector('.album-art');
const trackTitle = nowPlaying.querySelector('.track-title');
const albumTitle = nowPlaying.querySelector('.album-title');
albumArt.src = album.cover;
trackTitle.textContent = album.title;
albumTitle.textContent = `Released ${album.releaseDate}`;
nowPlaying.classList.add('show');
// Hide after 5 seconds
setTimeout(() => {
nowPlaying.classList.remove('show');
}, 5000);
}
function sendBandcampCommand(command) {
try {
if (!bandcampPlayer || !bandcampPlayer.contentWindow) {
throw new Error('Bandcamp player not ready');
}
bandcampPlayer.contentWindow.postMessage({
command: command
}, '*');
} catch (error) {
console.error('Error sending Bandcamp command:', error);
updateSystemStatus('Error controlling playback');
}
}
function setActiveArtist(artist) {
if (!artist) return;
// Clear quote refresh interval when switching artists
if (quoteRefreshInterval) {
clearInterval(quoteRefreshInterval);
}
activeArtist = artist;
currentAlbum = 0;
currentTrack = 0;
audioProgress = 0;
isPlaying = false;
clearInterval(progressIntervalId);
// Update theme classes
document.body.classList.remove('theme-windows96', 'theme-yvyy');
document.body.classList.add(`theme-${artist}`);
// Toggle CRT screen effect
const crtScreen = document.getElementById('crt-screen');
if (crtScreen) {
crtScreen.style.display = artist === 'windows96' ? 'block' : 'none';
}
// Update artist title
const artistTitleElement = document.getElementById('artist-title');
if (artistTitleElement) {
artistTitleElement.textContent = artist.toUpperCase();
}
// Update navigation buttons
const navButtons = document.querySelectorAll('nav button');
if (navButtons.length > 0) {
navButtons.forEach(btn => {
if (btn.textContent.toLowerCase() === artist) {
btn.classList.add('active');
btn.classList.remove('inactive');
} else {
btn.classList.remove('active');
btn.classList.add('inactive');
}
});
}
// Update background elements and render content
updateBackgroundElements();
renderArtistContent();
updatePlayerBar();
const playerBar = document.getElementById('player-bar');
if (playerBar) {
playerBar.classList.add('player-bar-visible');
}
}
function togglePlay() {
updateSystemStatus('Please visit Bandcamp to listen to the full albums');
}
function startProgressAnimation() {
// Remove progress animation since we're not playing directly
}
function startTrackTimer() {
// Remove track timer since we're not playing directly
}
function handleNextTrack() {
if (trackTimer) {
clearTimeout(trackTimer);
}
const albums = windows96Albums; // Only use Windows96 albums
// Get a random album index different from the current one
let nextAlbumIndex;
do {
nextAlbumIndex = Math.floor(Math.random() * albums.length);
} while (nextAlbumIndex === currentAlbum);
currentAlbum = nextAlbumIndex;
currentTrack = 0; // Start from the first track of the new album
audioProgress = 0;
if (isPlaying) {
const album = albums[currentAlbum];
bandcampPlayer.src = album.bandcampEmbedUrl;
bandcampPlayer.onload = () => {
sendBandcampCommand('play');
bandcampPlayer.onload = null;
};
}
updatePlayerBar();
renderArtistContent();
startTrackTimer();
}
function handlePrevTrack() {
if (trackTimer) {
clearTimeout(trackTimer);
}
const albums = windows96Albums; // Only use Windows96 albums
// Get a random album index different from the current one
let prevAlbumIndex;
do {
prevAlbumIndex = Math.floor(Math.random() * albums.length);
} while (prevAlbumIndex === currentAlbum);
currentAlbum = prevAlbumIndex;
currentTrack = 0; // Start from the first track of the new album
audioProgress = 0;
if (isPlaying) {
const album = albums[currentAlbum];
bandcampPlayer.src = album.bandcampEmbedUrl;
bandcampPlayer.onload = () => {
sendBandcampCommand('play');
bandcampPlayer.onload = null;
};
}
updatePlayerBar();
renderArtistContent();
startTrackTimer();
}
function updateBackgroundElements() {
const bgContainer = document.getElementById('background-elements');
if (!bgContainer) {
console.warn('Background container not found in updateBackgroundElements');
return;
}
// Clear existing background
bgContainer.innerHTML = '';
if (activeArtist === 'windows96') {
// Create Windows96 background
const gradientDiv = document.createElement('div');
gradientDiv.className = 'empty-world-gradient';
bgContainer.appendChild(gradientDiv);
const gridDiv = document.createElement('div');
gridDiv.className = 'empty-world-grid';
bgContainer.appendChild(gridDiv);
const glowDiv = document.createElement('div');
glowDiv.className = 'empty-world-glow';
bgContainer.appendChild(glowDiv);
} else if (activeArtist === 'yvyy') {
// Create Yvyy background
const yvyyBg = document.createElement('div');
yvyyBg.className = 'yvyy-background';
const img = document.createElement('img');
img.src = "https://images.unsplash.com/photo-1506744038136-46273834b3fb";
img.alt = "Yvyy Background Image";
yvyyBg.appendChild(img);
const moonGlow = document.createElement('div');
moonGlow.className = 'moon-glow';
yvyyBg.appendChild(moonGlow);
const noise = document.createElement('div');