forked from wesbos/Advanced-React
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
76 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,60 @@ | ||
import Link from 'next/link'; | ||
import styled from 'styled-components'; | ||
import Nav from './Nav'; | ||
|
||
const Logo = styled.h1` | ||
font-size: 4rem; | ||
margin-left: 2rem; | ||
position: relative; | ||
z-index: 2; | ||
transform: skew(-7deg); | ||
a { | ||
padding: 0.5rem 1rem; | ||
background: ${props => props.theme.red}; | ||
color: white; | ||
text-transform: uppercase; | ||
text-decoration: none; | ||
} | ||
@media (max-width: 1300px) { | ||
margin: 0; | ||
text-align: center; | ||
} | ||
`; | ||
|
||
const StyledHeader = styled.header` | ||
.bar { | ||
border-bottom: 10px solid ${props => props.theme.black}; | ||
display: grid; | ||
grid-template-columns: auto 1fr; | ||
justify-content: space-between; | ||
align-items: stretch; | ||
@media (max-width: 1300px) { | ||
grid-template-columns: 1fr; | ||
justify-content: center; | ||
} | ||
} | ||
.sub-bar { | ||
display: grid; | ||
grid-template-columns: 1fr auto; | ||
border-bottom: 1px solid ${props => props.theme.lightgrey}; | ||
} | ||
`; | ||
|
||
const Header = () => ( | ||
<div> | ||
<StyledHeader> | ||
<div className="bar"> | ||
<a href="">Sick Fits</a> | ||
<Logo> | ||
<Link href="/"> | ||
<a>Sick Fits</a> | ||
</Link> | ||
</Logo> | ||
<Nav /> | ||
</div> | ||
<div className="sub-bar"> | ||
<p>Search</p> | ||
</div> | ||
<div>Cart</div> | ||
</div> | ||
</StyledHeader> | ||
); | ||
|
||
export default Header; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters