1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

fix: recognize global theme mode (#2357)

This commit is contained in:
Cotes Chung
2025-04-16 18:08:43 +08:00
committed by GitHub
parent 167c98c781
commit 7708adbf30

View File

@@ -39,7 +39,10 @@ class Theme {
}
static get #mode() {
return sessionStorage.getItem(this.#modeKey);
return (
sessionStorage.getItem(this.#modeKey) ||
document.documentElement.getAttribute(this.#modeAttr)
);
}
static get #isDarkMode() {