2017-03-30 18:21:13 +00:00
|
|
|
import Link from 'next/link'
|
|
|
|
|
|
|
|
export default ({ pathname }) => (
|
|
|
|
<header>
|
|
|
|
<Link prefetch href='/'>
|
|
|
|
<a className={pathname === '/' && 'is-active'}>Home</a>
|
|
|
|
</Link>
|
|
|
|
|
|
|
|
<Link prefetch href='/about'>
|
|
|
|
<a className={pathname === '/about' && 'is-active'}>About</a>
|
|
|
|
</Link>
|
|
|
|
|
2017-11-23 13:05:51 +00:00
|
|
|
<Link prefetch href='/blog'>
|
|
|
|
<a className={pathname === '/blog' && 'is-active'}>Blog</a>
|
|
|
|
</Link>
|
|
|
|
|
2017-03-30 18:21:13 +00:00
|
|
|
<style jsx>{`
|
|
|
|
header {
|
|
|
|
margin-bottom: 25px;
|
|
|
|
}
|
|
|
|
a {
|
|
|
|
font-size: 14px;
|
|
|
|
margin-right: 15px;
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
.is-active {
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
|
|
|
`}</style>
|
|
|
|
</header>
|
|
|
|
)
|