mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
7d719ff75d
* create initial docs site * change copy for title and header to say Astro Docs * create initial docs site * remove text merge changes * change workspaceRoot and remove yarn.lock from docs-www * add docs-www to workspace Co-authored-by: Kitto Khrangtong <kitto@queensboro.com>
8 lines
282 B
JavaScript
8 lines
282 B
JavaScript
(() => {
|
|
const root = document.documentElement;
|
|
if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
|
|
root.classList.add('theme-dark');
|
|
} else {
|
|
root.classList.remove('theme-dark');
|
|
}
|
|
})();
|