Update background color to use CSS variable and remove unused theme initialization code
This commit is contained in:
parent
e95abfb4dd
commit
661edc27c6
|
@ -75,7 +75,7 @@
|
||||||
height: 100vh; // Full viewport height
|
height: 100vh; // Full viewport height
|
||||||
width: 100vw; // Full viewport width
|
width: 100vw; // Full viewport width
|
||||||
overflow: hidden; // Prevent scrollbars
|
overflow: hidden; // Prevent scrollbars
|
||||||
background-color: #232323;
|
background-color: var(--background-color-gray);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Root overlay styles
|
// Root overlay styles
|
||||||
|
|
|
@ -17,15 +17,3 @@ export function toggleTheme() {
|
||||||
document.documentElement.setAttribute('data-theme', newTheme);
|
document.documentElement.setAttribute('data-theme', newTheme);
|
||||||
localStorage.setItem('theme', newTheme);
|
localStorage.setItem('theme', newTheme);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize theme on page load
|
|
||||||
setTheme();
|
|
||||||
|
|
||||||
// Example: Call toggleTheme() when a button is clicked
|
|
||||||
const toggleSwitch: Element | null = document.querySelector('#theme-switch');
|
|
||||||
|
|
||||||
if (toggleSwitch) {
|
|
||||||
toggleSwitch.addEventListener('click', toggleTheme);
|
|
||||||
} else {
|
|
||||||
console.warn("Theme switch button not found!");
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue