don't let typekit css block rendering

This commit is contained in:
2026-06-01 04:09:41 +02:00
parent dcb1a59777
commit 8ad7df30d7
+16 -1
View File
@@ -35,7 +35,22 @@ export default function RootLayout({
<html lang="no"> <html lang="no">
<head> <head>
<link rel="preconnect" href="https://use.typekit.net" crossOrigin="anonymous" /> <link rel="preconnect" href="https://use.typekit.net" crossOrigin="anonymous" />
<link rel="stylesheet" href="https://use.typekit.net/spa5smt.css" /> <link rel="preconnect" href="https://p.typekit.net" crossOrigin="anonymous" />
{/*
Load Adobe Fonts without blocking render: the stylesheet is requested
with media="print" (fetched but not applied), then the inline script
below swaps it to media="all" once it has loaded.
*/}
<link
id="typekit-css"
rel="stylesheet"
href="https://use.typekit.net/spa5smt.css"
media="print"
suppressHydrationWarning
/>
<script>
{`(function(){var l=document.getElementById('typekit-css');if(!l)return;function s(){l.media='all'}if(l.sheet){s()}else{l.addEventListener('load',s)}})();`}
</script>
{process.env.UMAMI_SCRIPT_URL && process.env.UMAMI_WEBSITE_ID && ( {process.env.UMAMI_SCRIPT_URL && process.env.UMAMI_WEBSITE_ID && (
<script <script
defer defer