2023-10-23 23:11:59 +02:00
|
|
|
import { cookies } from "next/headers"
|
|
|
|
import Link from "next/link"
|
|
|
|
import Image from "next/image"
|
2021-04-18 01:56:23 +02:00
|
|
|
|
2024-01-28 01:56:47 +01:00
|
|
|
import Logo from "@/public/images/logo.png"
|
2023-10-23 23:11:59 +02:00
|
|
|
import { getI18n } from "@/i18n/i18n.server"
|
2023-07-31 19:06:46 +02:00
|
|
|
|
2023-10-23 23:11:59 +02:00
|
|
|
import { Locales } from "./Locales"
|
|
|
|
import { SwitchTheme } from "./SwitchTheme"
|
2021-04-18 01:56:23 +02:00
|
|
|
|
2023-08-01 17:07:19 +02:00
|
|
|
export const Header = (): JSX.Element => {
|
2023-07-31 19:06:46 +02:00
|
|
|
const cookiesStore = cookies()
|
|
|
|
const i18n = getI18n()
|
2022-07-28 23:01:19 +02:00
|
|
|
|
2021-04-18 01:56:23 +02:00
|
|
|
return (
|
2023-10-23 23:11:59 +02:00
|
|
|
<header className="sticky top-0 z-50 flex w-full justify-between border-b-2 border-gray-600 bg-white px-6 py-2 dark:border-gray-400 dark:bg-black">
|
|
|
|
<Link href="/">
|
|
|
|
<div className="flex items-center justify-center">
|
2022-10-27 19:13:29 +02:00
|
|
|
<Image
|
|
|
|
quality={100}
|
2024-01-28 03:21:11 +01:00
|
|
|
className="size-16"
|
2024-01-28 01:56:47 +01:00
|
|
|
src={Logo}
|
2023-10-23 23:11:59 +02:00
|
|
|
alt="Théo LUDWIG"
|
2023-05-21 18:21:46 +02:00
|
|
|
priority
|
2022-10-27 19:13:29 +02:00
|
|
|
/>
|
2024-01-28 01:56:47 +01:00
|
|
|
<strong className="ml-1 hidden font-headline font-semibold text-yellow dark:text-yellow-dark xs:block sm:text-xl">
|
2023-05-30 21:51:27 +02:00
|
|
|
Théo LUDWIG
|
2022-10-27 19:13:29 +02:00
|
|
|
</strong>
|
|
|
|
</div>
|
2021-05-08 19:52:04 +02:00
|
|
|
</Link>
|
2023-10-23 23:11:59 +02:00
|
|
|
<div className="flex justify-between">
|
|
|
|
<div className="flex flex-col items-center justify-center px-6">
|
2022-10-27 19:13:29 +02:00
|
|
|
<Link
|
2023-10-23 23:11:59 +02:00
|
|
|
href="/blog"
|
|
|
|
data-cy="header-blog-link"
|
2024-01-28 01:56:47 +01:00
|
|
|
className="font-semibold text-yellow hover:underline dark:text-yellow-dark"
|
2022-10-27 19:13:29 +02:00
|
|
|
>
|
|
|
|
Blog
|
2021-11-08 15:10:26 +01:00
|
|
|
</Link>
|
|
|
|
</div>
|
2023-08-01 17:07:19 +02:00
|
|
|
<Locales
|
|
|
|
currentLocale={i18n.locale}
|
|
|
|
cookiesStore={cookiesStore.toString()}
|
|
|
|
/>
|
2023-08-01 14:11:46 +02:00
|
|
|
<SwitchTheme cookiesStore={cookiesStore.toString()} />
|
2021-05-08 19:52:04 +02:00
|
|
|
</div>
|
|
|
|
</header>
|
2021-04-18 01:56:23 +02:00
|
|
|
)
|
|
|
|
}
|