mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 05:41:31 +00:00
Normalized attribute name in HTML
Add prefix `data-` for following attributes: - `topbar-visible` - `mode` - `label-text` - `title-succeed`
This commit is contained in:
@@ -33,8 +33,8 @@
|
||||
|
||||
let initTheme = "default";
|
||||
|
||||
if ($("html[mode=dark]").length > 0
|
||||
|| ($("html[mode]").length == 0
|
||||
if ($("html[data-mode=dark]").length > 0
|
||||
|| ($("html[data-mode]").length == 0
|
||||
&& window.matchMedia("(prefers-color-scheme: dark)").matches ) ) {
|
||||
initTheme = "dark";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user