fix css and fonts

This commit is contained in:
2026-08-24 10:56:12 +01:00
parent 8b947d28c3
commit c25e6f70be
3 changed files with 47 additions and 46 deletions
+2 -2
View File
@@ -1,13 +1,13 @@
(function () {
function currentSystemTheme() {
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'tokyo' : 'light';
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'macchiato' : 'light';
}
var btn = document.getElementById('theme-toggle');
if (btn) {
btn.addEventListener('click', function () {
var current = document.documentElement.getAttribute('data-theme') || 'light';
var next = current === 'light' ? 'tokyo' : 'light';
var next = current === 'light' ? 'macchiato' : 'light';
document.documentElement.setAttribute('data-theme', next);
localStorage.setItem('poc-theme', next);
window.dispatchEvent(new Event('theme-change'));