Nye-TeeOff/frontend/src/app/layout.tsx

99 lines
2.3 KiB
TypeScript
Raw Normal View History

2026-02-26 09:20:51 +01:00
import type { Metadata } from "next";
2026-04-12 10:11:23 +02:00
import { Mulish, Oswald } from "next/font/google";
2026-02-26 09:20:51 +01:00
import "./globals.css";
2026-02-27 08:53:14 +01:00
import Header from "@/components/Header";
2026-04-12 22:07:51 +02:00
import {
DEFAULT_DESCRIPTION,
DEFAULT_OG_IMAGE,
SITE_URL,
createOrganizationJsonLd,
createWebsiteJsonLd,
} from "@/app/seo";
2026-02-26 09:20:51 +01:00
2026-04-12 10:11:23 +02:00
const uiFont = Mulish({
subsets: ["latin"],
variable: "--font-ui",
display: "swap",
});
const displayFont = Oswald({
subsets: ["latin"],
variable: "--font-display",
display: "swap",
});
2026-02-26 09:20:51 +01:00
export const metadata: Metadata = {
2026-04-12 22:07:51 +02:00
metadataBase: new URL(SITE_URL),
title: {
default: "TeeOff.no - Din guide til norske golfbaner",
template: "%s | TeeOff.no",
},
description: DEFAULT_DESCRIPTION,
applicationName: "TeeOff",
alternates: {
canonical: "/",
},
openGraph: {
type: "website",
locale: "nb_NO",
siteName: "TeeOff",
title: "TeeOff.no - Din guide til norske golfbaner",
description: DEFAULT_DESCRIPTION,
url: SITE_URL,
images: [
{
url: DEFAULT_OG_IMAGE,
width: 1600,
height: 900,
alt: "TeeOff.no",
},
],
},
twitter: {
card: "summary_large_image",
site: "@TeeOffno",
creator: "@TeeOffno",
title: "TeeOff.no - Din guide til norske golfbaner",
description: DEFAULT_DESCRIPTION,
images: [DEFAULT_OG_IMAGE],
},
robots: {
index: true,
follow: true,
googleBot: {
index: true,
follow: true,
maxSnippet: -1,
maxImagePreview: "large",
maxVideoPreview: -1,
},
},
2026-04-12 21:53:54 +02:00
icons: {
icon: "/icons/cropped-siteicon-1.png",
shortcut: "/icons/cropped-siteicon-1.png",
apple: "/icons/cropped-siteicon-1.png",
},
2026-02-26 09:20:51 +01:00
};
2026-02-27 08:53:14 +01:00
export default function RootLayout({ children }: { children: React.ReactNode }) {
2026-04-12 22:07:51 +02:00
const organizationJsonLd = createOrganizationJsonLd();
const websiteJsonLd = createWebsiteJsonLd();
2026-02-26 09:20:51 +01:00
return (
2026-02-27 08:53:14 +01:00
<html lang="nb">
2026-04-12 10:11:23 +02:00
<body className={`${uiFont.variable} ${displayFont.variable} antialiased`}>
2026-04-12 22:07:51 +02:00
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(organizationJsonLd) }}
/>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(websiteJsonLd) }}
/>
2026-02-27 08:53:14 +01:00
<Header />
2026-02-26 09:20:51 +01:00
{children}
</body>
</html>
);
2026-04-12 10:11:23 +02:00
}