1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-12-08 00:44:30 +01:00
.profile/components/Header/index.tsx

49 lines
1.4 KiB
TypeScript
Raw Normal View History

import Link from 'next/link'
import Image from 'next/image'
2021-04-18 01:56:23 +02:00
import { Language } from './Language'
import { SwitchTheme } from './SwitchTheme'
2021-04-18 01:56:23 +02:00
2022-07-28 23:01:19 +02:00
export interface HeaderProps {
showLanguage?: boolean
}
export const Header: React.FC<HeaderProps> = (props) => {
const { showLanguage = false } = props
2021-04-18 01:56:23 +02:00
return (
2021-12-04 15:52:51 +01: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='/'>
<a>
<div className='flex items-center justify-center'>
<Image
2022-02-22 21:19:42 +01:00
quality={100}
width={60}
height={60}
src='/images/divlo_icon_small.png'
alt='Divlo'
/>
2021-12-04 15:52:51 +01:00
<strong className='ml-1 hidden font-headline font-semibold text-yellow dark:text-yellow-dark xs:block'>
Divlo
</strong>
</div>
</a>
</Link>
<div className='flex justify-between'>
2021-12-04 15:52:51 +01:00
<div className='flex flex-col items-center justify-center px-6'>
2021-11-08 15:10:26 +01:00
<Link href='/blog'>
<a
data-cy='header-blog-link'
2021-12-04 15:52:51 +01:00
className='text-yellow hover:underline dark:text-yellow-dark'
2021-11-08 15:10:26 +01:00
>
Blog
</a>
</Link>
</div>
2022-07-28 23:01:19 +02:00
{showLanguage && <Language />}
<SwitchTheme />
</div>
</header>
2021-04-18 01:56:23 +02:00
)
}