forked from sk66641/Random-Disco-Light-Simulator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
605 lines (525 loc) · 22.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Sanu Kumar">
<meta name="description" content="Experience the vibrant Random Disco Light Simulator! Enjoy dynamic, colorful light patterns and immerse yourself in a fun, party-like atmosphere.">
<meta name="keywords" content="disco lights, light simulator, random disco lights, colorful lights, dynamic light patterns, party lights, interactive light effects, fun lighting, vibrant light show, random light patterns">
<title>Random Disco Light Simulator</title>
<link rel="icon" href="assets/images/favicon/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="css/style.css">
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://www.youtube.com/iframe_api"></script>
<script src="/js/backToTopBtn.js"></script>
<style>/* style.css */
.form-group {
margin-bottom: 20px;
/* Adjust the spacing as per your design */
}
.form-group label {
margin-bottom: 5px;
/* Adjust the spacing between label and input */
}
.circle {
position: absolute;
width: 20px;
height: 20px;
border-radius: 50%;
pointer-events: none;
background: radial-gradient(circle, rgba(73, 232, 247, 0.466), rgba(141, 38, 172, 0.5));
transition: transform 0.1s, left 0.1s, top 0.1s;
box-shadow: 0 0 20px #23bdf5,
0 0 60px #f523f5,
0 0 100px #23bdf5;
animation: colors 1s infinite;
transform: translate(-50%, -50%);
}
.circle-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 9999;
}
@media (max-width: 724px) {
.circle-container{
display: none;
}
}
@keyframes colors {
0% {
filter: hue-rotate(0deg);
}
100% {
filter: hue-rotate(360deg);
}
}
</style>
</head>
<body>
<div class="circle-container">
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
</div>
<script>
document.addEventListener("DOMContentLoaded", function () {
const coords = { x: 0, y: 0 };
const circles = document.querySelectorAll(".circle");
circles.forEach(function (circle) {
circle.x = 0;
circle.y = 0;
});
window.addEventListener("mousemove", function (e) {
coords.x = e.pageX;
coords.y = e.pageY - window.scrollY; // Adjust for vertical scroll position
});
function animateCircles() {
let x = coords.x;
let y = coords.y;
circles.forEach(function (circle, index) {
circle.style.left = `${x - 12}px`;
circle.style.top = `${y - 12}px`;
circle.style.transform = `scale(${(circles.length - index) / circles.length})`;
const nextCircle = circles[index + 1] || circles[0];
circle.x = x;
circle.y = y;
x += (nextCircle.x - x) * 0.25;
y += (nextCircle.y - y) * 0.25;
});
requestAnimationFrame(animateCircles);
}
animateCircles();
});
</script>
<div class="loader">
<div>
<lottie-player src="https://lottie.host/451aadfb-9af8-4298-98be-e9c583f8a72c/jPRsrfR2jf.json"
background="##FFFFFF" speed="1" style="width: 300px; height: 300px" loop autoplay mode="normal">
</lottie-player>
</div>
</div>
<div class="indexpage">
<button id="backToTopBtn" title="Back to Top" aria-label="Back to Top" onclick="backToTop()"><i class="fas fa-arrow-up"></i></button>
</div>
<!-- Generate snowflakes dynamically with JavaScript -->
<div class="snowflakes">
<div id="particles-js"></div>
</div>
<!-- navbar -->
<div class="navHeader">
<div class="header-content">
<nav>
<button id="muteBtn" class="mute-btn" style="display: none;">
<i id="muteIcon" class="fas fa-volume-up"></i>
</button>
<ul class="sidebarOne">
<li class="cross"><i style="cursor: pointer;" class="fa-solid fa-x"></i></li>
<li class="logo"><a href="./index.html"><img src="assets/images/logo/logo..png" alt="Website Logo"></a></li>
<li><a href="#" id="reload" style="display: none;" aria-label="reload">Reload</a></li>
<!-- <li><a href="#" id="addTime" aria-label="Add Time" style="display: none;">Add Time</a></li> -->
<li><a href="#" id="pauseStartBtn" style="display: none;" aria-label="Pause/Start">Pause</a></li>
<li><a href="#" id="fullscreenBtn" aria-label="Toggle Fullscreen">Fullscreen</a></li>
<li><a href="#" id="editBtn" aria-label="Edit">Edit</a></li>
<!-- edit drop down content -->
<div class="editdropdown" id="editdropdown" style="display: none;">
<li class="exclude"><a href="#" id="addTime" aria-label="Add Time">Add Time</a></li>
<!--exclude is used in script.js in sidenbar animation to remove the animation time function-->
<li class="exclude" id="changeMusic">
<select id="musicDropdown" aria-label="Change Music">
<option value="select" disabled selected style="font-family: 'Playfair Display', serif;">Change Music
</option>
<option value="none">None</option>
<option value="disco">Disco</option>
<option value="fairies">Fairies</option>
<option value="funky">Funky</option>
<option value="upbeatdisco">Upbeatdisco</option>
<option value="vintage">Vintage</option>
<option value="whistle">Whistle</option>
<option value="snare">Snare</option>
</select>
</li>
</div>
<li><a href="pages/about.html">About</a></li>
<li><a href="pages/features.html">Features</a></li>
<li><a href="./Login/index1.html">Step In</a></li>
<li><a href="./pages/faq.html">FAQ</a></li>
<li><a href="pages/feedback.html">Feedback</a></li>
<li><a href="pages/contributors.html">Contributors</a></li>
<li><a href="./pages/privacy.html">Privacy Policy</a></li>
<li><a href="./pages/terms.html">Terms and Conditions</a></li>
<li><a href="#" id="google_translate_element"></a></li>
</ul>
<ul class="navMain">
<li id="sidebarLines" onclick="toggleSidebar()"><i title="Menu" class="fa-solid fa-bars"></i></li>
</ul>
</nav>
</div>
</div>
<!-- Main body that will display after loader -->
<div class="unload">
<div class="container">
<div class="box" id="box">
<h1 id="changingHeading">Random Disco <span id="changing">Light Simulator</span></h1>
<div class="form">
<div class="form-group">
<label for="color">1. Number of Colors: <span style="color:red">*</span></label>
<input type="number" min="0" oninput="validity.valid||(value='');" id="color" placeholder="Enter"
aria-label="Number of Colors" required>
</div>
<div class="form-group">
<label for="color1">2. Select your desired start & end colors for the gradient:</label>
<input type="color" id="color1" aria-label="Start Color" />
<label for="color2"></label>
<input type="color" id="color2" aria-label="End Color" />
</div>
<strong>[For Random color spectrum, don't select different colors]</strong>
<div class="form-group">
<label for="time">3. Time interval <i>(with which the color changes randomly)</i>: <span
style="color:red">*</span></label><br />
<input type="number" min="0" id="time" placeholder="Enter" aria-label="Time Interval" required />
<select id="unit" aria-label="Time Interval Unit">
<option value="unit" disabled selected>Select Unit</option>
<option value="milliseconds">Milliseconds</option>
<option value="seconds">Seconds</option>
</select>
</div>
<strong>[Negative interval or No input will be treated as 0 interval]</strong>
<div class="form-group">
<label for="view">4. View: <span style="color:red">*</span></label>
<select id="view" aria-label="Select View">
<option style="background-color: lightslategray; color: white" value="select" disabled selected>Select
</option>
<option value="conic">Conic</option>
<option value="linear">Linear</option>
<option value="radial">Radial</option>
<option value="custom">Custom Pattern</option>
</select>
</div>
<div class="form-group">
<label for="countdown">5. Countdown Timer (in seconds): <span style="color:red">*</span></label>
<input type="number" min="0" oninput="validity.valid||(value='');" id="countdown"
aria-label="Countdown Timer" placeholder="Enter time in seconds" required />
</div>
<div class="form-group">
<label for="sound">6. Select Music:</label>
<select id="sound" value="select" aria-label="Sound Effect">
<option value="none">None</option>
<option value="disco">Disco</option>
<option value="fairies">Fairies</option>
<option value="funky">Funky</option>
<option value="upbeatdisco">Upbeatdisco</option>
<option value="vintage">Vintage</option>
<option value="whistle">Whistle</option>
<option value="snare">Snare</option>
</select>
<button id="PreviewButton">Preview</button>
<span style="display: none; font-size: 24px; color: #f09819;">or</span>
<input type="url" style="display: none;" id="music-url" placeholder="Paste link here" /><br>
<span style="font-size: 24px; color: #f09819;">or</span>
<input type="file" id="music-file" accept="audio/*" class="file-input" />
<span style="font-size: 24px; color: #f09819; ">or</span>
<input type="url" id="youtubeUrlInput" placeholder="Paste YouTube URL">
</div>
</div>
<div id="error" aria-live="polite"></div>
<div style="display: flex; justify-content: center; align-items: center;">
<div id="randomize" aria-label="Randomize">
<a href="#">
<span></span>
<span></span>
<span></span>
<span></span>
Randomize
</a>
</div>
</div>
<div class="button">
<div id="submit" aria-label="Submit"><a href="#">
<span></span>
<span></span>
<span></span>
<span></span>
Submit
</a></div>
<div id="reset" aria-label="Reset"><a href="#">
<span></span>
<span></span>
<span></span>
<span></span>
Reset
</a></div>
</div>
<div id="preset">
<button id="savePresetButton">Save Preset</button> <!-- new function for loading preset -->
<button id="loadPresetButton">Load Preset</button>
</div>
</div>
</div>
<!-- Socials (right side of the page) -->
<footer class="footer" style="width: 100%;height: 2px; ">
<div class="socialIcons" style="z-index: 9999;">
<span class="icons">
<a href="" aria-label="Linkedin" title="linkedin"><i class="fab fa-linkedin ico"></i></a>
</span>
<span class="icons">
<a href="" aria-label="Instagram" title="instagram"><i class="fa-brands fa-instagram ico"></i></a>
</span>
<span class="icons">
<a href="https://github.com/sk66641/Random-Disco-Light-Simulator" title="github">
<i class="fab fa-github ico"></i>
</a>
</span>
<span class="icons">
<a href="" aria-label="X" title="Twitter"><i class="fa-brands fa-x-twitter ico"></i></a>
</span>
<span class="icons">
<a href="" aria-label="Discord" title="discord"><i class="fa-brands fa-discord ico"></i></a>
</span>
</div>
<div class="copyright">
<p class="copyright">©
<script>document.write(new Date().getFullYear())</script> Random-Disco-Light-Simulator. All rights reserved.
</p>
</div>
</footer>
<!-- Counter in simulation -->
<div id="timerDisplay" aria-label="Timer Display" style="display: none"></div>
<!-- audio files -->
<audio id="disco" src="assets/audios/disco.mp3"></audio>
<audio id="fairies" src="assets/audios/fairies.mp3"></audio>
<audio id="funky" src="assets/audios/funkydisco.mp3"></audio>
<audio id="upbeatdisco" src="assets/audios/upbeatdisco.mp3"></audio>
<audio id="upbeatdisco" src="assets/audios/upbeatdisco.mp3"></audio>
<audio id="snare" src="assets/audios/Snare.mp3"></audio>
<audio id="vintage" src="assets/audios/vintage.mp3"></audio>
<audio id="whistle" src="assets/audios/whistle.mp3"></audio>
<!-- Theme toggle -->
<span class="slider" style="width: 40px; height: 20px; display: none;"></span>
<div id="sun-moon-mode-toggler" class="toggle-container" >
<input type="checkbox" id="themeToggle" class="switch-checkbox" onclick="toggleTheme()">
<label id="themeChangeToggle" class="theme-switch" for="themeToggle">
<div class="toggle-button">
<span class="light-mode-icon"><img src="sun.svg" style = "display: block;"></span>
<span class="dark-mode-icon"><img src="moon.svg"style = "display: block;"></span>
</div>
</label>
</div>
<!-- Modal section -->
<!-- Modal background -->
<!-- <div id="modalBackground" style="color: #fff;">
<div class="login-box">
<form style="color: #fff;">
<div class="user-box" style="color: #fff;">
<input type="text" name="name" required="" onfocus="changeColor()" id="name" style="color: #fff;">
<label>Name</label>
</div>
<div class="user-box">
<input type="email" required onfocus="changeColor()" id="email">
<label>Mail</label>
</div>
<div class="user-box" style="text-align: right;">
<label for="feedbackType" style="display: block; text-align: left;">Feedback Type</label>
<select id="feedbackType" name="feedbackType" required onchange="toggleOtherInput()" style="font-size: 12px; padding: 5px; width: 150px;">
<option value="question">Question</option>
<option value="suggestion">Suggestion</option>
<option value="issue">Issue</option>
<option value="other">Other</option>
</select>
</div>
<div class="user-box" id="otherFeedbackBox" style="display: none;">
<input type="text" id="otherFeedback" name="otherFeedback" placeholder="Specify the subject">
</div>
<center>
<div class="rating">
<input type="radio" id="star5" name="rating" value="5" />
<label for="star5">5 stars</label>
<input type="radio" id="star4" name="rating" value="4" />
<label for="star4">4 stars</label>
<input type="radio" id="star3" name="rating" value="3" />
<label for="star3">3 stars</label>
<input type="radio" id="star2" name="rating" value="2" />
<label for="star2">2 stars</label>
<input type="radio" id="star1" name="rating" value="1" />
<label for="star1">1 star</label>
</div>
<div class="form-group">
<p>Feedback</p>
<textarea cols="30" rows="5" placeholder="Your Feedback" required id="feed"></textarea>
</div>
<button id="ll" class="btnna">Submit</button>
<span></span>
</center>
</form>
<center>
<div class="load" id="successMessage" class="success-message" style="height: 40px; width: 40px; display: none;">
<div data-glitch="Loading..." class="glitch">Submitting...</div>
</div>
</center>
</div>
</div> -->
<script src="../js/theme.js"></script>
<script>
function toggleOtherInput() {
var feedbackType = document.getElementById("feedbackType").value;
var otherFeedbackBox = document.getElementById("otherFeedbackBox");
if (feedbackType === "other") {
otherFeedbackBox.style.display = "block";
} else {
otherFeedbackBox.style.display = "none";
}
}
</script>
<style>
#feedbackType {
font-size: 12px;
padding: 5px;
width: 150px;
}
</style>
<div id="warningModal" class="modal">
<div class="modal-content">
<span class="close" id="closeModal">×</span>
<h2>Warning: Sensitivity to Flashing Lights</h2>
<p>
This site contains flashing lights that may cause discomfort or
trigger seizures for people with photosensitive epilepsy. Viewer
discretion is advised.
</p>
<button id="proceed" aria-label="Proceed">Proceed</button>
</div>
</div>
</div>
<div id="infomodal" class="modal">
<div class="modal-content">
<span class="close" id="closeModal1">×</span>
<h2>Important!!</h2>
<p>
<strong>Click the menu icon to use various functions:</strong>
</p>
<p>Reload: Refreshes the page.</p>
<p>Pause: Pauses the simulation.</p>
<p>Fullscreen: Toggles fullscreen mode.</p>
<p>Add Time: Allows to you add or subtract from the disco timer</p>
<p>Change Music: Allows you to change the background music.</p>
<p><strong><i>Double click on the screen to hide/show the icons</i></strong></p>
<button id="proceed1" aria-label="Proceed">Proceed</button>
</div>
</div>
<div id="addtimeModel" class="modal">
<div class="modal-content">
<span class="close" id="closeAddtimeModal">×</span>
<h2>Add time (in seconds)</h2>
<p>Enter a positive number to increase the time & negative to decrease the simulation time</p>
<input type="number" id="addtimeSeconds" placeholder="Enter time (in sec)"
style="background-color: rgb(237, 234, 228); color: black;">
<button id="timesubmitBtn" style="border: none;">Confirm</button>
</div>
</div>
<div id="addPresetModal" class="modal">
<div class="modal-content">
<span class="close" id="closeAddPresetModal">×</span>
<h2>Save Preset</h2>
<p>
Add a suitable name for your preset
</p>
<input id="presetNameInput" placeholder="Enter preset name"
style="background-color: rgb(237, 234, 228); color: black;" required>
<button id="namePresetButton" aria-label="Save preset">Save</button>
</div>
</div>
<div id="loadPresetModal" class="modal">
<div class="modal-content">
<span class="close" id="closeLoadPresetModal">×</span>
<h2>Load Preset</h2>
<p>
Enter the name of the preset you wish to play
</p>
<input id="presetNameLoadInput" placeholder="Enter preset name"
style="background-color: rgb(237, 234, 228); color: black;" required>
<button id="loadButton" aria-label="Load preset">Load</button>
</div>
</div>
<div id="replayModel" class="modal">
<div class="modal-content">
<h2>Wanna replay the disco..?</h2>
<p>
Press Yes to replay... Press No to Exit
</p>
<button id="replayModelBtn">Yes</button>
<button id="exitBtn">No</button>
</div>
</div>
<!-- Account Not Available Modal -->
<div id="accountNotAvailableModal" class="account-not-available-modal">
<div class="account-not-available-modal-content">
<span class="close" id="closeAccountNotAvailableModal">×</span>
<h2>Account Not Available</h2>
<p>We apologize for the inconvenience, but our social media accounts are currently unavailable. We are working
diligently to bring them online as soon as possible.</p>
<p>In the meantime, if you have any questions or need assistance, please feel free to reach out to us through our
website's feedback form. We appreciate your understanding and patience during this time.</p>
<p>Thank you for your continued support! </p>
</div>
</div>
<!-- Notifications -->
<button class="notification" id="failnotification" style="display:none;">
<span class="message" id="failmsg">Failed</span>
<span class="closenotif" id="closeFailNotification">✖</span>
<div class="timerline" id="timerline"></div>
</button>
<button class="notification" id="successnotification" style="display:none;">
<span class="message" id="successmsg">Success</span>
<span class="closenotif" id="closeSuccessNotification">✖</span>
<div class="timerline" id="timerline"></div>
</button>
<!-- Chatbot -->
<script src="//code.tidio.co/fdylvmddtyb7vzsk5frdt3ncrk6cwobs.js" async></script>
<script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
<script src="js/background.js"></script>
<script src="js/social.js"></script>
<script src="js/script.js"></script>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({ pageLanguage: 'en' }, 'google_translate_element');
}
</script>
<script type="text/javascript"
src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
</body>
</html>