Files
homeschool/public/js/themes.js
T
2025-07-03 09:42:40 -04:00

14 lines
445 B
JavaScript

// 🎨 Apply saved theme on load
function applySavedTheme() {
const savedTheme = localStorage.getItem('theme') || 'playground';
document.body.className = savedTheme;
const themeSelector = document.getElementById('themeSelect');
if (themeSelector) themeSelector.value = savedTheme;
}
// 🎨 Change theme dynamically
function changeTheme(themeName) {
document.body.className = themeName;
localStorage.setItem('theme', themeName);
}