This commit is contained in:
2026-11-02 17:48:52 +08:00
parent 9ed39b51f7
commit 7d5c445c72
4 changed files with 59 additions and 87 deletions

View File

@@ -54,7 +54,7 @@
}
/* ==========================================================================
主题切换:默认跟随系统,用户点一次就固定下来
主题切换:默认暗色,用户点一次就固定下来
========================================================================== */
(function theme() {
@@ -64,7 +64,7 @@
function current() {
var explicit = root.getAttribute("data-theme");
if (explicit === "light" || explicit === "dark") return explicit;
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
return "dark";
}
function apply(mode) {