feat(интерфейс): светлая тема при первом визите, тёмная — по выбору
Первый визит больше не уходит в тёмную тему из-за системной настройки: без сохранённого выбора страница светлая. Переключатель по-прежнему главнее системы, выбор остаётся после перезагрузки. Проверка на первую страницу смотрит системную тёмную настройку и повторный визит. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@ html { color-scheme: light; }
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
(function(){try{var t=localStorage.getItem('theme');if(t!=='dark'&&t!=='light'){t=(window.matchMedia&&matchMedia('(prefers-color-scheme: dark)').matches)?'dark':'light';}document.documentElement.setAttribute('data-theme',t);}catch(e){}})();
|
||||
(function(){try{var t=localStorage.getItem('theme');if(t!=='dark'&&t!=='light'){t='light';}document.documentElement.setAttribute('data-theme',t);}catch(e){}})();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user