summaryrefslogtreecommitdiffstats
path: root/stepped-solutions/09
diff options
context:
space:
mode:
authorWes Bos <wesbos@gmail.com>2018-06-22 14:23:49 -0400
committerWes Bos <wesbos@gmail.com>2018-06-22 14:23:49 -0400
commit5f2d4ba39a19e2900192a69a58ee211f4eda9a98 (patch)
tree87392a1849f3535b2603acd30eee2e1f9305ff57 /stepped-solutions/09
parent8d4dffa6f01487be0cf5546653803d32282992eb (diff)
stepped solutions
Diffstat (limited to 'stepped-solutions/09')
-rwxr-xr-xstepped-solutions/09/frontend/components/Header.js60
1 files changed, 60 insertions, 0 deletions
diff --git a/stepped-solutions/09/frontend/components/Header.js b/stepped-solutions/09/frontend/components/Header.js
new file mode 100755
index 0000000..b75fbc1
--- /dev/null
+++ b/stepped-solutions/09/frontend/components/Header.js
@@ -0,0 +1,60 @@
+import Nav from './Nav';
+import Link from 'next/link';
+import styled from 'styled-components';
+
+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 = () => (
+ <StyledHeader>
+ <div className="bar">
+ <Logo>
+ <Link href="/">
+ <a>Sick Fits</a>
+ </Link>
+ </Logo>
+ <Nav />
+ </div>
+ <div className="sub-bar">
+ <p>Search</p>
+ </div>
+ <div>Cart</div>
+ </StyledHeader>
+);
+
+export default Header;