98 lines
2.8 KiB
TypeScript
98 lines
2.8 KiB
TypeScript
import type { Metadata, Viewport } from "next";
|
|
import "./globals.css";
|
|
import CookieBanner from "@/components/CookieBanner";
|
|
|
|
export const metadata: Metadata = {
|
|
metadataBase: new URL("https://novarix.uk"),
|
|
title: {
|
|
default: "Novarix Networks",
|
|
template: "%s | Novarix Networks",
|
|
},
|
|
description:
|
|
"Novarix Networks provides network consulting, remote network support, and architecture services for organisations running production network infrastructure.",
|
|
applicationName: "Novarix Networks",
|
|
keywords: [
|
|
"Novarix Networks",
|
|
"ISP",
|
|
"Managed Service Provider",
|
|
"MSP",
|
|
"Network Consulting",
|
|
"Internet Connectivity",
|
|
"BGP",
|
|
"IXP",
|
|
"CDN Edge",
|
|
"Network Engineering",
|
|
],
|
|
authors: [{ name: "Novarix Networks" }],
|
|
creator: "Novarix Networks",
|
|
publisher: "Novarix Networks",
|
|
alternates: {
|
|
canonical: "/",
|
|
},
|
|
openGraph: {
|
|
type: "website",
|
|
url: "https://novarix.uk",
|
|
siteName: "Novarix Networks",
|
|
title: "Novarix Networks",
|
|
description:
|
|
"Engineering-led network consulting, remote support, and architecture for production networks.",
|
|
},
|
|
twitter: {
|
|
card: "summary_large_image",
|
|
title: "Novarix Networks",
|
|
description:
|
|
"Engineering-led network consulting, remote support, and architecture for production networks.",
|
|
},
|
|
robots: {
|
|
index: true,
|
|
follow: true,
|
|
},
|
|
};
|
|
|
|
export const viewport: Viewport = {
|
|
width: "device-width",
|
|
initialScale: 1,
|
|
themeColor: [
|
|
{ media: "(prefers-color-scheme: light)", color: "#ffffff" },
|
|
{ media: "(prefers-color-scheme: dark)", color: "#020617" },
|
|
],
|
|
};
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{ children: React.ReactNode }>) {
|
|
return (
|
|
<html lang="en-GB" suppressHydrationWarning data-ui-ready="0">
|
|
<head>
|
|
<script
|
|
dangerouslySetInnerHTML={{
|
|
__html: `
|
|
(function () {
|
|
var root = document.documentElement;
|
|
root.dataset.uiReady = "0";
|
|
try {
|
|
var consent = window.localStorage.getItem("novarix-cookie-consent");
|
|
var introSeen = window.sessionStorage.getItem("novarix-intro-seen");
|
|
var shouldShowBanner = consent !== "ack" && consent !== "rst";
|
|
var shouldPlayIntro = !shouldShowBanner && !introSeen;
|
|
|
|
root.dataset.showCookieBanner = shouldShowBanner ? "1" : "0";
|
|
root.dataset.showIntro = shouldPlayIntro ? "1" : "0";
|
|
} catch (error) {
|
|
root.dataset.showCookieBanner = "1";
|
|
root.dataset.showIntro = "0";
|
|
}
|
|
root.dataset.uiReady = "1";
|
|
})();
|
|
`,
|
|
}}
|
|
/>
|
|
</head>
|
|
<body>
|
|
{children}
|
|
<CookieBanner />
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|