themes lol
This commit is contained in:
@@ -203,7 +203,17 @@ function RootDocument({ children }: { children: React.ReactNode }) {
|
||||
media="(prefers-color-scheme: dark)"
|
||||
content={CHROME_COLORS.dark.base}
|
||||
/>
|
||||
<ColorSchemeScript />
|
||||
<ColorSchemeScript defaultColorScheme="auto" />
|
||||
{/* Pre-hydration theme restore from ThemeProvider's localStorage
|
||||
mirrors: data-theme (so exotic themes don't flash default),
|
||||
forced color scheme (dark-only themes must not paint light),
|
||||
and the theme's font stylesheets (avoid FOUT until hydration). */}
|
||||
<script
|
||||
dangerouslySetInnerHTML={{
|
||||
__html:
|
||||
'try{var d=document.documentElement,t=localStorage.getItem("flxn-theme");if(t&&t!=="default"){d.setAttribute("data-theme",t);}var s=localStorage.getItem("flxn-theme-scheme");if(s){d.setAttribute("data-mantine-color-scheme",s);}var f=JSON.parse(localStorage.getItem("flxn-theme-fonts")||"[]");for(var i=0;i<f.length;i++){var l=document.createElement("link");l.rel="stylesheet";l.href=f[i];l.setAttribute("data-flxn-theme-font",t||"default");document.head.appendChild(l);}}catch(e){}',
|
||||
}}
|
||||
/>
|
||||
<link rel="stylesheet" href="/styles.css" />
|
||||
</head>
|
||||
<body
|
||||
|
||||
Reference in New Issue
Block a user