102 lines
2.7 KiB
TypeScript
102 lines
2.7 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>
|
|
<head>
|
|
<script
|
|
dangerouslySetInnerHTML={{
|
|
__html: `
|
|
(function () {
|
|
var key = "novarix-theme";
|
|
var root = document.documentElement;
|
|
var theme = "light";
|
|
|
|
try {
|
|
var saved = window.localStorage.getItem(key);
|
|
if (saved === "light" || saved === "dark") {
|
|
theme = saved;
|
|
} else if (window.matchMedia("(prefers-color-scheme: dark)").matches) {
|
|
theme = "dark";
|
|
}
|
|
} catch (error) {
|
|
if (window.matchMedia("(prefers-color-scheme: dark)").matches) {
|
|
theme = "dark";
|
|
}
|
|
}
|
|
|
|
root.dataset.theme = theme;
|
|
root.style.colorScheme = theme;
|
|
})();
|
|
`,
|
|
}}
|
|
/>
|
|
</head>
|
|
<body>
|
|
{children}
|
|
<CookieBanner />
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|