feat(loading): preload portfolio assets before reveal
Some checks failed
Test and deploy / Verify production build (push) Has been cancelled
Test and deploy / Deploy production (push) Has been cancelled

This commit is contained in:
2026-09-07 00:20:06 +03:30
parent b0c9ad1296
commit 7fb58ff718
6 changed files with 434 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ export const metadata: Metadata = {
};
const themeScript = `
document.documentElement.dataset.siteLoading = 'true';
try {
const savedTheme = localStorage.getItem('portfolio-theme');
const systemTheme = matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
@@ -35,6 +36,9 @@ export default function RootLayout({
</head>
<body>
<ThemeProvider>{children}</ThemeProvider>
<noscript>
<style>{`#site-loader { display: none !important; }`}</style>
</noscript>
</body>
</html>
);