1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-09-19 22:15:53 +02:00
.profile/components/Header/index.tsx

89 lines
2.3 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'
2021-04-18 01:56:23 +02:00
export const Header: React.FC = () => {
return (
<>
<header className='header'>
2021-04-18 01:56:23 +02:00
<div className='container'>
<nav className='navbar navbar-fixed-top'>
<Link href='/'>
<a className='navbar__brand-link'>
<div className='navbar__brand'>
<Image
width={60}
height={60}
src='/images/divlo_icon_small.png'
alt='Divlo'
/>
<strong className='navbar__brand-title'>Divlo</strong>
</div>
</a>
</Link>
<div className='navbar__buttons'>
<Language />
</div>
</nav>
2021-04-18 01:56:23 +02:00
</div>
</header>
<style jsx>
{`
.header {
background-color: var(--color-background);
border-bottom: var(--border-header-footer);
padding: 0.5rem 1rem;
2021-04-18 01:56:23 +02:00
position: fixed;
width: 100%;
top: 0;
left: 0;
right: 0;
z-index: 100;
height: var(--header-height);
}
.container {
max-width: 1280px;
width: 100%;
margin: auto;
}
.navbar {
2021-04-18 01:56:23 +02:00
display: flex;
justify-content: space-between;
align-items: center;
2021-04-18 01:56:23 +02:00
}
.navbar-fixed-top {
position: sticky;
top: 0;
z-index: 200;
2021-04-18 01:56:23 +02:00
}
.navbar__brand-link {
color: var(--color-text-1);
text-decoration: none;
font-size: 16px;
}
.navbar__brand {
2021-04-18 01:56:23 +02:00
display: flex;
align-items: center;
justify-content: space-between;
}
.navbar__brand-title {
font-weight: 600;
margin-left: 10px;
}
.navbar__buttons {
display: flex;
justify-content: space-between;
}
@media (max-width: 320px) {
.navbar__brand-title {
display: none;
2021-04-18 01:56:23 +02:00
}
}
`}
</style>
</>
)
}