Huge update.

This commit is contained in:
2025-06-11 03:31:59 +12:00
parent 699b829696
commit d1390bd770
14 changed files with 429 additions and 148 deletions

View File

@@ -0,0 +1,32 @@
const darkToggle = document.getElementById('dark-mode-toggle');
const notificationDropDown = document.getElementById('notification-setting');
const savedSettingNotif = localStorage.getItem('notification-setting');
if (savedSettingNotif) {
notificationDropDown.value = savedSettingNotif;
}
const savedSettingDark = localStorage.getItem('dark-mode-toggle');
if (savedSettingDark === 'true') {
darkToggle.checked = true;
document.body.classList.add('dark');
} else {
darkToggle.checked = false;
document.body.classList.remove('dark');
}
darkToggle.addEventListener('change', () => {
if (darkToggle.checked) {
document.body.classList.add('transition');
document.body.classList.add('dark');
localStorage.setItem('dark-mode-toggle', 'true');
} else {
document.body.classList.add('transition');
document.body.classList.remove('dark');
localStorage.setItem('dark-mode-toggle', 'false');
}
});
notificationDropDown.addEventListener('change', () => {
localStorage.setItem('notification-setting', notificationDropDown.value);
});