|
|
|
|
@ -1,6 +1,13 @@
|
|
|
|
|
(function () { |
|
|
|
|
function applyTheme(theme) { |
|
|
|
|
document.documentElement.setAttribute("data-theme", theme); |
|
|
|
|
|
|
|
|
|
if (theme === "dark") { |
|
|
|
|
document.body.classList.add("otb-dark"); |
|
|
|
|
} else { |
|
|
|
|
document.body.classList.remove("otb-dark"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const toggle = document.getElementById("otbThemeToggle"); |
|
|
|
|
if (toggle) toggle.checked = theme === "light"; |
|
|
|
|
} |
|
|
|
|
|