fix: theme

This commit is contained in:
2026-08-21 10:18:18 +03:30
parent b4d8e32fdd
commit faf95327f1
4 changed files with 94 additions and 31 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ export const metadata: Metadata = {
// Runs before paint to set the `.dark` class from saved preference / system,
// avoiding a light flash on load. Kept inline + minimal on purpose.
const noFlashTheme = `(function(){try{var t=localStorage.getItem('aram_theme');if(!t){t=window.matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light';}if(t==='dark'){document.documentElement.classList.add('dark');}}catch(e){}})();`;
const noFlashTheme = `(function(){try{var t=localStorage.getItem('aram_theme');if(t==='dark'||(t!=='light'&&(t='system',window.matchMedia('(prefers-color-scheme: dark)').matches))){document.documentElement.classList.add('dark');}}catch(e){}})();`;
export default function RootLayout({
children,