mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
parent
c8089f54a5
commit
52c954a27a
@ -18,7 +18,6 @@ export function resolvePageHead(page: Page, localeOptions: PlumeThemeLocaleOptio
|
||||
const sm = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
const isDark = um === 'dark' || (um !== 'light' && sm);
|
||||
document.documentElement.dataset.theme = isDark ? 'dark' : 'light';
|
||||
}
|
||||
})();`.replace(/^\s+|\s+$/gm, '').replace(/\n/g, ''),
|
||||
])
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user