Skip to content

Commit

Permalink
Removed all the unnecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
anijit18 committed Jul 16, 2024
1 parent 597d95a commit f9a65ad
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 77 deletions.
21 changes: 0 additions & 21 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
transition: background-color 0.3s;
}

/* .button div a:hover {
background-color: #45a049;
} */

/* Style for the randomize button */
#randomize a {
background-color: #ff9800;
Expand Down Expand Up @@ -287,14 +283,11 @@ h1 {
}

label {
/* font-size: 22px; */
font-size: 20px;
/* font-weight: 300; */
font-family: system-ui;
}

input {
/* background-color: rgba(255, 255, 255, 0.07); */
background: #290a1d;
outline: none;
border: none;
Expand All @@ -312,7 +305,6 @@ input {

input:focus {
outline: none;
/* width: 4rem; */
border: none;
}

Expand Down Expand Up @@ -772,7 +764,6 @@ nav ul li a:hover {
font-size: 16px;
height: 30px;
padding-top: 0.3rem;
/* transition: 0.1s all; */
}
.editdropdown{
margin-top: -0.4rem;
Expand Down Expand Up @@ -1021,7 +1012,6 @@ nav ul li a:hover {
width: 14px;
left: 3px;
bottom: 3px;
/* background-image: linear-gradient(to bottom right, yellow, orange, red); */
background-image: linear-gradient(black, rgb(18, 18, 18));
box-shadow: inset -3px -1.4px #ffffff, inset -3.2px -1.4px 0.2px 0.1px rgb(58, 52, 58);
border-radius: 50%;
Expand Down Expand Up @@ -1154,8 +1144,6 @@ input:checked+.slider:before {
bottom: 0%;
width: 100%;
justify-content: center;


}
}

Expand Down Expand Up @@ -1285,7 +1273,6 @@ p {
color: #555;
}

/* josfoknfsonfonfsofnosfnsofnsofnsofj */
button {
padding: 10px 20px;
font-size: 16px;
Expand Down Expand Up @@ -1622,8 +1609,6 @@ button:hover {
}
}



/* #musicDropdown {
text-align: center;
border-radius: 10px;
Expand Down Expand Up @@ -1660,7 +1645,6 @@ button:hover {
transform: scale(1.17);
}


.dark-mode {
background-color: black;
color: white;
Expand All @@ -1680,7 +1664,6 @@ button:hover {
}

.light-mode .box {
/* min-height: 100vh; */
/*box was taking whole vh,20 margin from top and bottom, also became responsive through this, preventing them from overflowing */
max-width: calc(100% - 40px);
/*box was taking whole vw gave them 20 margin from top and bottom also making its resposive and preventing from overflowing */
Expand Down Expand Up @@ -1884,8 +1867,6 @@ button:hover {
}

.box span {
/* font-family: Arial, sans-serif;
font-size: 39px; */
font-family: sans-serif;
font-size: 30px;
font-weight: bold;
Expand Down Expand Up @@ -2120,7 +2101,6 @@ button:hover {
}

#music-file {
/* width: 260px; */
font-size: 20px;
font-family: 'Playfair Display', serif;
cursor: pointer;
Expand Down Expand Up @@ -2587,7 +2567,6 @@ button:active {
width: 300px;
position: fixed;
top: 65px;
/* margin-left: 90vw; */
right: 20px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
animation: fadeIn 0.5s ease-out;
Expand Down
40 changes: 1 addition & 39 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,31 +60,7 @@
</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>
Expand All @@ -103,23 +79,11 @@ <h2>Edit Options</h2>
<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>
Expand All @@ -142,8 +106,6 @@ <h1 id="changingHeading">Random Disco <span id="changing">Light Simulator</span>
<label for="time">3. Time interval
<i>(with which the color changes randomly)</i>:</label><br />
<input type="number" min="0" id="time" placeholder="Enter" aria-label="Time Interval" required />
<!-- <input type="number" min="0" oninput="this.value = Math.abs(this.value) >= 0 ? Math.abs(this.value) : null"
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>
Expand Down
17 changes: 0 additions & 17 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ document.addEventListener('DOMContentLoaded', () => {
}}

editBtn.addEventListener('click', function(event) {
// console.log("clikef") trial
toggleEditDropdown();
})

Expand All @@ -65,7 +64,6 @@ document.addEventListener('DOMContentLoaded', () => {
let rememberState =true;//Ensuring that if simulation was paused when addtime was clicked, the state is remembered after confirm is clicked

addTimeButton.addEventListener('click', () => {
// var time=0;
rememberState= isPaused//find what state is when we click add time
addtimePrompt.style.display = 'block';
pauseSimulation(); //so that timer stops for the time being. even if its already paused, no harm.
Expand Down Expand Up @@ -195,7 +193,6 @@ timesubmitBtn.addEventListener('click', () => {

function startCountdown(duration) {
countdownValue = duration;
// document.getElementById('musicDropdown').style.display = 'block';
pauseStartButton.style.display = 'inline-block'; // Show the pause button
document.querySelector("#reload").style.display = 'inline-block'; // Show the reload button
timerDisplay.style.display = 'block';
Expand Down Expand Up @@ -452,16 +449,6 @@ timesubmitBtn.addEventListener('click', () => {
const randomNumColors = Math.floor(Math.random() * 10) + 1;
colorInput.value = randomNumColors;

// comment !important
// Stopped the random selection for 2nd input for better view:
// const colorInput1 = document.getElementById('color1');
// const randomColor1 = "#000000".replace(/0/g,function(){return (~~(Math.random()*16)).toString(16);});
// colorInput1.value = randomColor1;

// const colorInput2 = document.getElementById('color2');
// const randomColor2 = "#000000".replace(/0/g,function(){return (~~(Math.random()*16)).toString(16);});
// colorInput2.value = randomColor2;

const timeInput = document.getElementById('time');

const unitSelect = document.getElementById('unit');
Expand Down Expand Up @@ -508,12 +495,10 @@ timesubmitBtn.addEventListener('click', () => {
document.getElementById('changeMusic').style.display = 'none';//to disable changing of music when simulation is paused.
pauseStartButton.textContent = 'Resume';
isPaused = true;
// console.log(musicAudio); testing
}

function resumeSimulation() {
startCountdown(countdownValue);
// if (!musicAudio) {
musicAudio.play();

document.getElementById('musicDropdown').style.display="block";
Expand All @@ -527,7 +512,6 @@ timesubmitBtn.addEventListener('click', () => {
document.getElementById('color1').value,
document.getElementById('color2').value
);
// console.log(musicAudio); testing

pauseStartButton.textContent = 'Pause';
isPaused = false;
Expand Down Expand Up @@ -728,7 +712,6 @@ document.getElementById('submit').addEventListener('click', function () {

if (selectedMusic !== 'none') {
const musicAud = document.getElementById(selectedMusic);
// musicAudio.loop = true;
musicAud.play();
musicAudio = musicAud; // Update currently playing audio reference

Expand Down

0 comments on commit f9a65ad

Please sign in to comment.