-
Notifications
You must be signed in to change notification settings - Fork 0
/
Header.jsx
85 lines (70 loc) · 1.71 KB
/
Header.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import React from 'react'
import Headroom from 'react-headroom'
import styled from 'styled-components'
import { Link } from 'react-router'
import constants from 'styles/constants'
import colors from 'styles/constants/colors'
import StyledLink from 'components/StyledLink'
import Logo from '../Logo'
const HeaderContent = styled.header`
background-color: white;
opacity: 0.95;
box-shadow: 0 2px 2px -2px rgba(0,0,0,.8);
height: ${constants.headerHeight}px;
padding: 0 20px;
overflow: hidden;
text-align: center;
`
const StyledLogo = styled(Logo)`
display: inline-block;
height: ${constants.logoHeight}px;
line-height: ${constants.headerHeight}px;
vertical-align: middle;
padding: ${(constants.headerHeight - constants.logoHeight) / 2}px 0;
@media (min-width: ${constants.mobileMediaQuery}px) {
margin-top: -8px;
}
`
const Title = styled.h1`
margin: 0;
margin-left: 15px;
font-size: 1.5em;
line-height: ${constants.headerHeight}px;
display: none;
@media (min-width: ${constants.mobileMediaQuery}px) {
display: inline-block;
}
`
const StyledHeaderLink = styled(Link)`
color: ${colors.black222};
margin-right: 30px;
&:hover {
color: ${colors.black222};
}
&:visited {
color: ${colors.black222};
}
`
const NavLink = styled(StyledLink())`
margin-left: 15px;
line-height: ${constants.headerHeight}px;
`
const Header = () => (
<Headroom>
<HeaderContent>
<StyledHeaderLink to="/">
<StyledLogo />
<Title>
SPACE EXPERIENCE
</Title>
</StyledHeaderLink>
<NavLink to="/">
FEED
</NavLink>
<NavLink to="/about">
ABOUT
</NavLink>
</HeaderContent>
</Headroom>
)
export default Header