summaryrefslogtreecommitdiff
path: root/web/js/themes.js
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-17 15:25:52 +0300
committerPaul Buetow <paul@buetow.org>2026-05-17 15:25:52 +0300
commit914bd7cd6aa14e839332a98d91c30b19865b0cf2 (patch)
tree02b11537237a204048589e14ed24938b805e42f7 /web/js/themes.js
parent3b24f0e1be832584d6550e8cc3e5d24329f66f90 (diff)
Restructure repo: move Go server into player-server/
Diffstat (limited to 'web/js/themes.js')
-rw-r--r--web/js/themes.js20
1 files changed, 0 insertions, 20 deletions
diff --git a/web/js/themes.js b/web/js/themes.js
deleted file mode 100644
index e952140..0000000
--- a/web/js/themes.js
+++ /dev/null
@@ -1,20 +0,0 @@
-const STORAGE_KEY = 'kiss-theme';
-
-export function initThemes() {
- const saved = localStorage.getItem(STORAGE_KEY) || 'dark';
- apply(saved);
- const btn = document.getElementById('theme-toggle');
- if (btn) btn.addEventListener('click', toggle);
-}
-
-export function apply(theme) {
- document.documentElement.setAttribute('data-theme', theme);
- localStorage.setItem(STORAGE_KEY, theme);
- const btn = document.getElementById('theme-toggle');
- if (btn) btn.textContent = theme === 'dark' ? '☀' : '🌙';
-}
-
-export function toggle() {
- const current = document.documentElement.getAttribute('data-theme') || 'dark';
- apply(current === 'dark' ? 'light' : 'dark');
-}