2023-07-31 19:06:46 +02:00
|
|
|
import type { Metadata } from 'next'
|
2023-08-01 14:11:46 +02:00
|
|
|
import classNames from 'clsx'
|
2023-07-31 19:06:46 +02:00
|
|
|
|
|
|
|
import '@fontsource/montserrat/400.css'
|
|
|
|
import '@fontsource/montserrat/600.css'
|
|
|
|
import './globals.css'
|
|
|
|
|
|
|
|
import { Header } from '@/components/Header'
|
|
|
|
import { Footer } from '@/components/Footer'
|
|
|
|
import { getI18n } from '@/i18n/i18n.server'
|
2023-08-01 14:11:46 +02:00
|
|
|
import { getTheme } from '@/theme/theme.server'
|
2023-07-31 19:06:46 +02:00
|
|
|
|
|
|
|
const title = 'Théo LUDWIG'
|
|
|
|
const description =
|
|
|
|
'Théo LUDWIG - Developer Full Stack • Open-Source enthusiast'
|
|
|
|
const image = '/images/icon-96x96.png'
|
|
|
|
const url = new URL('https://theoludwig.fr')
|
|
|
|
const locale = 'fr-FR, en-US'
|
|
|
|
|
|
|
|
export const metadata: Metadata = {
|
|
|
|
title,
|
|
|
|
description,
|
|
|
|
metadataBase: url,
|
|
|
|
openGraph: {
|
|
|
|
title,
|
|
|
|
description,
|
|
|
|
url,
|
|
|
|
siteName: title,
|
|
|
|
images: [
|
|
|
|
{
|
|
|
|
url: image,
|
|
|
|
width: 96,
|
|
|
|
height: 96
|
|
|
|
}
|
|
|
|
],
|
|
|
|
locale,
|
|
|
|
type: 'website'
|
|
|
|
},
|
|
|
|
icons: {
|
|
|
|
icon: '/images/icon-96x96.png'
|
|
|
|
},
|
|
|
|
twitter: {
|
|
|
|
card: 'summary',
|
|
|
|
title,
|
|
|
|
description,
|
|
|
|
images: [image]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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}
|
|
|
|
className={classNames({
|
|
|
|
dark: theme === 'dark',
|
|
|
|
light: theme === 'light'
|
|
|
|
})}
|
|
|
|
style={{
|
|
|
|
colorScheme: theme
|
|
|
|
}}
|
|
|
|
>
|
2023-07-31 19:06:46 +02:00
|
|
|
<body className='bg-white font-headline text-black dark:bg-black dark:text-white'>
|
2023-08-01 14:11:46 +02:00
|
|
|
<Header showLocale />
|
|
|
|
{children}
|
|
|
|
<Footer />
|
2023-07-31 19:06:46 +02:00
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default RootLayout
|