feat(loading): preload portfolio assets before reveal
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user