-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
Left sidebar navigation and modal forms inputs and buttons enhanced
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
document.addEventListener('DOMContentLoaded', function () { | ||
|
||
const themeSwitcher = document.getElementById('theme-switcher'); | ||
const themeStylesheet = document.getElementById('theme-stylesheet'); | ||
|
||
// Load saved theme from local storage | ||
const savedTheme = localStorage.getItem('theme'); | ||
if (savedTheme) { | ||
themeStylesheet.href = `styles/themes/${savedTheme}/bootstrap.min.css`; | ||
themeSwitcher.value = savedTheme; | ||
} | ||
|
||
// Change theme on selection | ||
themeSwitcher.addEventListener('change', function () { | ||
const selectedTheme = themeSwitcher.value; | ||
themeStylesheet.href = `styles/themes/${selectedTheme}/bootstrap.min.css`; | ||
// Save selected theme to local storage | ||
localStorage.setItem('theme', selectedTheme); | ||
}); | ||
}); |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.