2023-10-23 23:11:59 +02:00
|
|
|
import type { Metadata } from "next"
|
|
|
|
import classNames from "clsx"
|
2023-07-31 19:06:46 +02:00
|
|
|
|
2023-10-23 23:11:59 +02:00
|
|
|
import "@fontsource/montserrat/400.css"
|
|
|
|
import "@fontsource/montserrat/600.css"
|
|
|
|
import "./globals.css"
|
2023-07-31 19:06:46 +02:00
|
|
|
|
2023-10-23 23:11:59 +02:00
|
|
|
import { Header } from "@/components/Header"
|
|
|
|
import { Footer } from "@/components/Footer"
|
|
|
|
import { getI18n } from "@/i18n/i18n.server"
|
|
|
|
import { getTheme } from "@/theme/theme.server"
|
2023-07-31 19:06:46 +02:00
|
|
|
|
2023-10-23 23:11:59 +02:00
|
|
|
const title = "Théo LUDWIG"
|
2023-07-31 19:06:46 +02:00
|
|
|
const description =
|
2024-01-23 23:59:10 +01:00
|
|
|
"Théo LUDWIG - Developer Full Stack • Open-Source Enthusiast"
|
2024-01-28 01:56:47 +01:00
|
|
|
const image = "/images/logo.png"
|
2023-10-23 23:11:59 +02:00
|
|
|
const url = new URL("https://theoludwig.fr")
|
|
|
|
const locale = "fr-FR, en-US"
|
2023-07-31 19:06:46 +02:00
|
|
|
|
|
|
|
export const metadata: Metadata = {
|
|
|
|
title,
|
|
|
|
description,
|
|
|
|
metadataBase: url,
|
|
|
|
openGraph: {
|
|
|
|
title,
|
|
|
|
description,
|
|
|
|
url,
|
|
|
|
siteName: title,
|
|
|
|
images: [
|
|
|
|
{
|
|
|
|
url: image,
|
|
|
|
width: 96,
|
2023-10-23 23:11:59 +02:00
|
|
|
height: 96,
|
|
|
|
},
|
2023-07-31 19:06:46 +02:00
|
|
|
],
|
|
|
|
locale,
|
2023-10-23 23:11:59 +02:00
|
|
|
type: "website",
|
2023-07-31 19:06:46 +02:00
|
|
|
},
|
|
|
|
twitter: {
|
2023-10-23 23:11:59 +02:00
|
|
|
card: "summary",
|
2023-07-31 19:06:46 +02:00
|
|
|
title,
|
|
|
|
description,
|
2023-10-23 23:11:59 +02:00
|
|
|
images: [image],
|
|
|
|
},
|
2023-07-31 19:06:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
interface RootLayoutProps {
|
|
|
|
children: React.ReactNode
|
|
|
|
}
|
|
|
|
|
|
|
|
const RootLayout = (props: RootLayoutProps): JSX.Element => {
|
|
|
|
const { children } = props
|
|
|
|
|
|
|
|
const i18n = getI18n()
|
2023-08-01 14:11:46 +02:00
|
|
|
const theme = getTheme()
|
2023-07-31 19:06:46 +02:00
|
|
|
|
|
|
|
return (
|
2023-08-01 14:11:46 +02:00
|
|
|
<html
|
|
|
|
lang={i18n.locale}
|
2024-05-16 09:32:20 +02:00
|
|
|
className={classNames(
|
|
|
|
{
|
|
|
|
dark: theme === "dark",
|
|
|
|
light: theme === "light",
|
|
|
|
},
|
|
|
|
"scroll-smooth",
|
|
|
|
)}
|
2023-08-01 14:11:46 +02:00
|
|
|
style={{
|
2023-10-23 23:11:59 +02:00
|
|
|
colorScheme: theme,
|
2023-08-01 14:11:46 +02:00
|
|
|
}}
|
|
|
|
>
|
2024-01-28 03:21:11 +01:00
|
|
|
<body className="flex min-h-screen flex-col bg-white font-headline text-black dark:bg-black dark:text-white">
|
2023-08-01 17:07:19 +02:00
|
|
|
<Header />
|
2023-08-01 14:11:46 +02:00
|
|
|
{children}
|
|
|
|
<Footer />
|
2023-07-31 19:06:46 +02:00
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default RootLayout
|