Remove decorative icons and update CORS configuration

This commit is contained in:
DaX
2025-06-20 13:05:36 +02:00
parent 18110ab159
commit 62a4891112
51 changed files with 4284 additions and 2385 deletions

View File

@@ -12,8 +12,37 @@ export default function RootLayout({
children: React.ReactNode
}) {
return (
<html lang="sr">
<body>{children}</body>
<html lang="sr" suppressHydrationWarning>
<head>
<script
dangerouslySetInnerHTML={{
__html: `
(function() {
document.documentElement.classList.add('no-transitions');
// Apply dark mode immediately for admin pages
if (window.location.pathname.startsWith('/upadaj')) {
document.documentElement.classList.add('dark');
} else {
// For non-admin pages, check localStorage
try {
const darkMode = localStorage.getItem('darkMode');
if (darkMode === 'true') {
document.documentElement.classList.add('dark');
}
} catch (e) {}
}
// Remove no-transitions class after a short delay
window.addEventListener('load', function() {
setTimeout(function() {
document.documentElement.classList.remove('no-transitions');
}, 100);
});
})();
`,
}}
/>
</head>
<body suppressHydrationWarning>{children}</body>
</html>
)
}