1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2025-05-29 22:37:44 +02:00

feat: add blog (#320)

This commit is contained in:
Divlo
2021-11-08 15:10:26 +01:00
parent 1505b81233
commit bcb184e49c
19 changed files with 5002 additions and 256 deletions

View File

@ -4,7 +4,13 @@ import Image from 'next/image'
import { Language } from './Language'
import { SwitchTheme } from './SwitchTheme'
export const Header: React.FC = () => {
export interface HeaderProps {
showLanguage?: boolean
}
export const Header: React.FC<HeaderProps> = (props) => {
const { showLanguage = false } = props
return (
<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='/'>
@ -23,7 +29,17 @@ export const Header: React.FC = () => {
</a>
</Link>
<div className='flex justify-between'>
<Language />
<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 />}
<SwitchTheme />
</div>
</header>

View File

@ -22,6 +22,12 @@ export const Interests: React.FC = () => {
})}
<InterestsList />
</div>
<style jsx global>{`
#__next {
display: block;
}
`}</style>
</>
)
}