2021-04-18 18:02:55 +02:00
|
|
|
import Link from 'next/link'
|
|
|
|
import Image from 'next/image'
|
2021-04-18 01:56:23 +02:00
|
|
|
|
2021-04-18 18:02:55 +02:00
|
|
|
import { Language } from './Language'
|
2021-05-08 19:52:04 +02:00
|
|
|
import { SwitchTheme } from './SwitchTheme'
|
2021-04-18 01:56:23 +02:00
|
|
|
|
2021-11-08 15:10:26 +01: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-05-08 19:52:04 +02:00
|
|
|
<header className='bg-white sticky top-0 z-50 flex w-full justify-between px-6 py-2 border-b-2 border-gray-600 dark:border-gray-400 dark:bg-black'>
|
|
|
|
<Link href='/'>
|
|
|
|
<a>
|
|
|
|
<div className='flex items-center justify-center'>
|
|
|
|
<Image
|
|
|
|
width={60}
|
|
|
|
height={60}
|
|
|
|
src='/images/divlo_icon_small.png'
|
|
|
|
alt='Divlo'
|
|
|
|
/>
|
2021-06-24 18:39:08 +02:00
|
|
|
<strong className='ml-1 font-headline font-semibold hidden xs:block text-yellow dark:text-yellow-dark'>
|
2021-05-08 19:52:04 +02:00
|
|
|
Divlo
|
|
|
|
</strong>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</Link>
|
|
|
|
<div className='flex justify-between'>
|
2021-11-08 15:10:26 +01:00
|
|
|
<div className='flex flex-col justify-center items-center px-6'>
|
|
|
|
<Link href='/blog'>
|
|
|
|
<a
|
|
|
|
data-cy='header-blog-link'
|
|
|
|
className='text-yellow dark:text-yellow-dark hover:underline'
|
|
|
|
>
|
|
|
|
Blog
|
|
|
|
</a>
|
|
|
|
</Link>
|
|
|
|
</div>
|
|
|
|
{showLanguage && <Language />}
|
2021-05-08 19:52:04 +02:00
|
|
|
<SwitchTheme />
|
|
|
|
</div>
|
|
|
|
</header>
|
2021-04-18 01:56:23 +02:00
|
|
|
)
|
|
|
|
}
|