Skip to content

Commit

Permalink
Revert "BACKGROUND THEME CHANGE"
Browse files Browse the repository at this point in the history
  • Loading branch information
imsuryya authored Jun 17, 2024
1 parent d441fec commit 06dadfa
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 74 deletions.
13 changes: 0 additions & 13 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,6 @@ <h1 class="text text--title">
</div>
</div>

<div class="theme-selector">
<label for="theme">Choose Theme:</label>
<select id="theme">
<option value="default">Default</option>
<option value="dark">Dark</option>
<option value="light">Light</option>
<option value="colorful">Colorful</option>
</select>
</div>
<div id="rubiks-cube">
<!-- Your Rubik's Cube game code -->
</div>

<div class="ui__buttons">
<button class="btn btn--bl btn--stats">
<icon trophy></icon>
Expand Down
26 changes: 0 additions & 26 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,32 +175,6 @@ class World extends Animation {

}

// script.js

document.addEventListener('DOMContentLoaded', () => {
const themeSelector = document.getElementById('theme');

// Load saved theme from localStorage if it exists
const savedTheme = localStorage.getItem('theme');
if (savedTheme) {
document.body.classList.add(`${savedTheme}-theme`);
themeSelector.value = savedTheme;
} else {
document.body.classList.add('default-theme');
}

// Change theme when the user selects a different option
themeSelector.addEventListener('change', (event) => {
document.body.className = ''; // Remove all existing classes
const selectedTheme = event.target.value;
document.body.classList.add(`${selectedTheme}-theme`);

// Save selected theme to localStorage
localStorage.setItem('theme', selectedTheme);
});
});


function RoundedBoxGeometry( size, radius, radiusSegments ) {

THREE.BufferGeometry.call( this );
Expand Down
35 changes: 0 additions & 35 deletions style.css
Original file line number Diff line number Diff line change
@@ -1,38 +1,3 @@
/* styles.css */

/* Default theme */
body.default-theme {
background-color: white;
color: black;
}

/* Dark theme */
body.dark-theme {
background-color: #333;
color: white;
}

/* Light theme */
body.light-theme {
background-color: #f9f9f9;
color: #333;
}

/* Colorful theme */
body.colorful-theme {
background: linear-gradient(45deg, #ff6f69, #ffcc5c, #ffeead, #88d8b0, #96ceb4);
color: #333;
}

/* Style for the theme selector */
.theme-selector {
position: fixed;
top: 10px;
right: 10px;
z-index: 1000;
}


@font-face {
font-family: "BungeeFont";
font-weight: normal;
Expand Down

0 comments on commit 06dadfa

Please sign in to comment.