added lazy loading for best-efficiency

This commit is contained in:
2026-04-09 15:14:13 +02:00
parent 30c6ff7285
commit 37d27e0bdb
12 changed files with 1228 additions and 278 deletions
+24
View File
@@ -37,10 +37,34 @@ export default function RootLayout({
return (
<html lang="it" className={`${inter.variable} scroll-smooth`}>
<head>
{/* Preconnect to Google Fonts for faster loading */}
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link
rel="preconnect"
href="https://fonts.gstatic.com"
crossOrigin="anonymous"
/>
{/* DNS prefetch for third-party domains */}
<link rel="dns-prefetch" href="https://fonts.googleapis.com" />
{/* Material Symbols with swap for faster first paint */}
<link
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap"
rel="stylesheet"
/>
{/* Preload critical fonts */}
<link
rel="preload"
as="font"
href="https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHAPMtMT7kjjj0P.woff2"
type="font/woff2"
crossOrigin="anonymous"
/>
{/* Optimize LCP by reducing render-blocking resources */}
<meta name="viewport" content="viewport-fit=cover" />
</head>
<body className="min-h-screen flex flex-col">
<Navbar />