feat: dark and light mdoe

This commit is contained in:
2026-06-06 15:33:01 +03:30
27 changed files with 594 additions and 451 deletions
+7 -1
View File
@@ -21,8 +21,14 @@ export default function RootLayout({
children: React.ReactNode;
}) {
return (
<html lang="fa" dir="rtl">
<html lang="fa" dir="rtl" suppressHydrationWarning>
<head>
{/* Apply the saved/system theme before paint to avoid a flash of the wrong theme */}
<script
dangerouslySetInnerHTML={{
__html: `(function(){try{var t=localStorage.getItem('theme');var d=t?t==='dark':window.matchMedia('(prefers-color-scheme: dark)').matches;if(d)document.documentElement.classList.add('dark');}catch(e){}})();`,
}}
/>
<meta
name="google-site-verification"
content="HIKgdf_siYdPxbJ2P1792opMprpxci_QjE-quk9kyi8"