mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-06-27 17:25:43 -04:00
86 lines
3.0 KiB
TypeScript
86 lines
3.0 KiB
TypeScript
import { env } from "@/lib/env";
|
|
import { JsonLd } from "react-schemaorg";
|
|
import { Analytics } from "@vercel/analytics/next";
|
|
import { ThemeProvider, ThemeScript } from "@/components/layout/theme-context";
|
|
import Header from "@/components/layout/header";
|
|
import Footer from "@/components/layout/footer";
|
|
import { SkipNavLink, SkipNavTarget } from "@/components/layout/skip-nav";
|
|
import { defaultMetadata } from "@/lib/metadata";
|
|
import { GeistMono, GeistSans } from "@/lib/fonts";
|
|
import siteConfig from "@/lib/config/site";
|
|
import authorConfig from "@/lib/config/author";
|
|
import type { Person, WebSite } from "schema-dts";
|
|
|
|
import "./globals.css";
|
|
|
|
export const metadata = defaultMetadata;
|
|
|
|
const RootLayout = ({ children }: Readonly<{ children: React.ReactNode }>) => {
|
|
return (
|
|
<html lang={env.NEXT_PUBLIC_SITE_LOCALE} suppressHydrationWarning>
|
|
<head>
|
|
<ThemeScript />
|
|
|
|
<style id="geist-font">{`:root{--font-geist-sans:${GeistSans.style.fontFamily};--font-geist-mono:${GeistMono.style.fontFamily};}`}</style>
|
|
|
|
<JsonLd<Person>
|
|
item={{
|
|
"@context": "https://schema.org",
|
|
"@type": "Person",
|
|
"@id": `${env.NEXT_PUBLIC_BASE_URL}/#person`,
|
|
name: authorConfig.name,
|
|
url: env.NEXT_PUBLIC_BASE_URL,
|
|
image: [`${env.NEXT_PUBLIC_BASE_URL}/opengraph-image.jpg`],
|
|
sameAs: [
|
|
env.NEXT_PUBLIC_BASE_URL,
|
|
`https://${authorConfig.social?.mastodon}`,
|
|
`https://github.com/${authorConfig.social?.github}`,
|
|
`https://bsky.app/profile/${authorConfig.social?.bluesky}`,
|
|
`https://twitter.com/${authorConfig.social?.twitter}`,
|
|
`https://medium.com/@${authorConfig.social?.medium}`,
|
|
`https://www.linkedin.com/in/${authorConfig.social?.linkedin}/`,
|
|
`https://www.facebook.com/${authorConfig.social?.facebook}`,
|
|
`https://www.instagram.com/${authorConfig.social?.instagram}/`,
|
|
],
|
|
}}
|
|
/>
|
|
|
|
<JsonLd<WebSite>
|
|
item={{
|
|
"@context": "https://schema.org",
|
|
"@type": "WebSite",
|
|
"@id": `${env.NEXT_PUBLIC_BASE_URL}/#website`,
|
|
name: siteConfig.name,
|
|
url: env.NEXT_PUBLIC_BASE_URL,
|
|
author: authorConfig.name,
|
|
description: siteConfig.description,
|
|
inLanguage: env.NEXT_PUBLIC_SITE_LOCALE,
|
|
license: `https://spdx.org/licenses/${siteConfig.license}.html`,
|
|
}}
|
|
/>
|
|
</head>
|
|
|
|
<body className="bg-background text-foreground font-sans antialiased">
|
|
<ThemeProvider>
|
|
<SkipNavLink />
|
|
|
|
<div className="mx-auto w-full max-w-4xl px-5">
|
|
<Header className="mt-4 mb-6 w-full" />
|
|
|
|
<main>
|
|
<SkipNavTarget />
|
|
{children}
|
|
</main>
|
|
|
|
<Footer className="my-6 w-full" />
|
|
</div>
|
|
</ThemeProvider>
|
|
|
|
<Analytics />
|
|
</body>
|
|
</html>
|
|
);
|
|
};
|
|
|
|
export default RootLayout;
|