forked from sk66641/Random-Disco-Light-Simulator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
528 lines (471 loc) · 22.2 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<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" />
<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>
<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 */
}
</style>
</head>
<body>
<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>
<button id="backToTopBtn" title="Back to Top" aria-label="Back to Top"><i class="fas fa-arrow-up"></i></button>
<!-- Generate snowflakes dynamically with JavaScript -->
<div class="snowflakes">
<div id="particles-js"></div>
</div>
<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>
<!-- Add this inside your existing HTML structure, preferably at the end of <body> -->
<!-- <div id="editPopup" class="edit-popup">
<div class="edit-popup-content">
<h2>Edit Options</h2>
<ul>
<li><a href="#" id="addTimeOption">Add Time</a></li>
<li><a href="#"</a>
<select id="musicDropdown" style="display: none;">
<option value="select" disabled selected>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>
</a>
</li>
Add more options as needed
</ul>
<button id="closeEditPopup">Close</button>
</div>
</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/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>
<div class="unload">
<div class="cursor"></div>
<div class="container">
<!-- <div class="background">
<div class="shape"></div>
<div class="shape"></div>
</div> -->
<div class="box" id="box">
<h1 id="changingHeading">Random Disco <span id="changing">Light Simulator</span></h1>
<!-- Random Disco
<span id="changing"
style="font-family: Arial, sans-serif; font-size: 30px; font-weight: bold; color: #ff7f50;">
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>
<footer class="footer" style="width: 100%;height: 2px; ">
<div class="socialIcons">
<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>
<div id="timerDisplay" aria-label="Timer Display" style="display: none"></div>
<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>
<!-- <div id="message" aria-live="polite">The timer has ended. The page will reload.</div> -->
<label id="themeChangeToggle" class="theme-toggle" for="themeToggle" style="position: fixed;
top: 30px;
right: 30px;
z-index: 100;
display: flex;
align-items: center;
border: none;
background-color: transparent;">
<input type="checkbox" id="themeToggle" onclick="toggleTheme()" checked aria-label="Switch theme mode">
<span class="slider" style="width: 40px; height: 20px;"></span>
</label>
<!-- 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>
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>
<button class="notification" id="failnotification" style="display:none;">
<span class="message">Please enter a valid number</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">Added Successfully!</span>
<span class="closenotif" id="closeSuccessNotification">✖</span>
<div class="timerline" id="timerline"></div>
</button>
<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>
<script src="//code.tidio.co/fdylvmddtyb7vzsk5frdt3ncrk6cwobs.js" async></script>
<!-- <div id="aboutPopup" class="popup">
<div class="popup-content">
<span class="close" onclick="closeAboutPopup()" aria-label="Close">×</span>
<h2><strong class="nameAbout">About</strong></h2>
<p>
<strong>The Random Disco Light Simulator</strong> is a fun and interactive project that
brings the excitement of a disco dance floor to your screen whether
you're a developer, a party enthusiast, or just curious.
</p>
<p>
<strong>Inputs:</strong>
- How many random colors you want to be shown?
<br />
- With how much time interval (in milliseconds) you want to change the
colors randomly?
<br />
- What type of view you want to choose (conic, linear, or radial)?
<br />
- Countdown timer (in seconds)
<br />
- Sound Effect
</p>
<p>
<strong> Output:</strong>
On the basis of these inputs, it simulates the selected view.
</p>
<p>Try these inputs and have fun! 😄</p>
<p>1000 1 milliseconds conic 60</p>
<p>1000 1 milliseconds radial 60</p>
<p>1000 1 milliseconds linear 60</p>
</div>
</div>
<div id="featuresPopup" class="popup">
<div class="popup-content">
<span class="close" onclick="closeFeaturesPopup()" aria-label="Close">×</span>
<h2><strong class="nameAbout">Features</strong></h2>
<p><strong>Conic Mode</strong>
Imagine a spotlight sweeping across the room, creating vibrant cones
of light. The colors change dynamically as the spotlight moves, adding
an electrifying effect.
</p>
<img src="assets/images/learn/Conic_1.jpg" alt="Conic Mode Example 1" style="width: 180px; height: 180px">
<img src="assets/images/learn/Conic_2.jpg" alt="Conic Mode Example 2" style="width: 180px; height: 180px;">
<p><strong>Radial Mode</strong>
Picture a pulsating ring of light expanding and contracting. The
radial pattern syncs perfectly with the beat, making you feel the
rhythm.
</p>
<img src="assets/images/learn/Radial_01.jpg" alt="Radial Mode Example 1" style="width:180px; height: 180px;">
<img src="assets/images/learn/Radial_02.jpg" alt="Radial Mode Example 2" style="width:180px; height: 180px;">
<p><strong>Linear Mode</strong>
Visualize colorful streaks of light moving in straight lines. These
streaks crisscross, intersect, and dance across the floor,
transforming your space into a dynamic disco.
</p>
<img src="assets/images/learn/Linear_01.jpg" alt="Linear Mode Example 1" style="width:180px; height: 180px;">
<img src="assets/images/learn/Linear_02.jpg" alt="Linear Mode Example 2" style="width:180px; height: 180px;">
</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>
<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>