summaryrefslogtreecommitdiff
path: root/layouts/_partials/scripts.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/_partials/scripts.html')
-rw-r--r--layouts/_partials/scripts.html9
1 files changed, 9 insertions, 0 deletions
diff --git a/layouts/_partials/scripts.html b/layouts/_partials/scripts.html
index 6ad03632..f7e9c36b 100644
--- a/layouts/_partials/scripts.html
+++ b/layouts/_partials/scripts.html
@@ -1,3 +1,12 @@
+<!-- Theme Switch -->
+<script>
+document.addEventListener("DOMContentLoaded", () => {
+ const themeSelect = document.getElementById('theme-select')
+ themeSelect.value = localStorage.getItem('geedeapro.theme')
+ themeSelect.onchange = () => switchTheme(themeSelect.value, true)
+})
+</script>
+
<!-- global JS -->
{{ $commonJS := slice
(resources.Get "js/tooltip.js")