clean up styling, redo navbar, redo settings
All checks were successful
/ build (push) Successful in 6m53s

This commit is contained in:
Ruben 2025-10-18 03:45:31 -05:00
commit 9b38e4bf15
Signed by: sneexy
GPG key ID: 8ECFA045E63BC583
15 changed files with 624 additions and 869 deletions

View file

@ -9,7 +9,6 @@ document.addEventListener("DOMContentLoaded", function() {
// load saved settings
loadSettings();
applyTheme();
// event listeners on all inputs
fontInputs.forEach(input => {
@ -19,7 +18,6 @@ document.addEventListener("DOMContentLoaded", function() {
themeInputs.forEach(input => {
input.addEventListener('change', function() {
saveSettings();
applyTheme();
});
});
@ -78,20 +76,4 @@ document.addEventListener("DOMContentLoaded", function() {
disableAlttextCheckbox.checked = true;
}
}
// apply the theme based on user preference
function applyTheme() {
const selectedTheme = document.querySelector('input[name="theme-setting"]:checked').value;
// remove any existing theme
document.documentElement.removeAttribute('data-theme');
// apply the selected theme
if (selectedTheme === 'light') {
document.documentElement.setAttribute('data-theme', 'light');
} else if (selectedTheme === 'dark') {
document.documentElement.setAttribute('data-theme', 'dark');
}
// if auto, don't set a data-theme attribute, let the media query handle it
}
});