mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-06-08 00:27:58 +00:00
fix: recognize global theme mode (#2357)
This commit is contained in:
parent
167c98c781
commit
7708adbf30
@ -39,7 +39,10 @@ class Theme {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static get #mode() {
|
static get #mode() {
|
||||||
return sessionStorage.getItem(this.#modeKey);
|
return (
|
||||||
|
sessionStorage.getItem(this.#modeKey) ||
|
||||||
|
document.documentElement.getAttribute(this.#modeAttr)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static get #isDarkMode() {
|
static get #isDarkMode() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user