css themes fixed

This commit is contained in:
2026-08-23 21:02:38 +01:00
parent e95a5b1a9f
commit 7cb28861e5
3 changed files with 58 additions and 37 deletions
+3 -3
View File
@@ -28,7 +28,7 @@ function formatDKKShort(value) {
function getThemeColors() {
const theme = document.documentElement.getAttribute('data-theme');
const isDark = theme === 'tokyo';
const isDark = theme === 'macchiato';
return {
isDark,
textColor: isDark ? '#e8f4ff' : '#1a1d22',
@@ -663,7 +663,7 @@ document.addEventListener('click', (e) => {
(() => {
function currentSystemTheme() {
return window.matchMedia('(prefers-color-scheme: dark)').matches
? 'tokyo'
? 'macchiato'
: 'light';
}
const btn = document.getElementById('theme-toggle');
@@ -671,7 +671,7 @@ document.addEventListener('click', (e) => {
btn.addEventListener('click', () => {
const current =
document.documentElement.getAttribute('data-theme') || 'light';
const next = current === 'light' ? 'tokyo' : 'light';
const next = current === 'light' ? 'macchiato' : 'light';
document.documentElement.setAttribute('data-theme', next);
localStorage.setItem('poc-theme', next);