-
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.
Merge branch 'master' into #36-singular-product-page-image-highlight-…
…section
- Loading branch information
Showing
11 changed files
with
344 additions
and
26 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import styled from "styled-components" | ||
import dimensions from "../../style/dimensions" | ||
import colors from "../../style/colors" | ||
|
||
export const NavContainer = styled.div` | ||
z-index: 1; | ||
background-color: ${colors.gray_image}; | ||
padding-bottom: 32px; | ||
&.colorChange { | ||
background-color: ${colors.gray_CTA}; | ||
} | ||
position: fixed; | ||
width: 100%; | ||
transition: 0.5s all ease; | ||
` | ||
|
||
export const Logo = styled.div` | ||
font-weight: bold; | ||
font-size: 24px; | ||
padding-top: 32px; | ||
padding-left: 80px; | ||
@media (max-width: ${dimensions.maxwidthTablet}px) { | ||
text-align: center; | ||
font-size: 20px; | ||
padding-top: 24px; | ||
padding-left: 0px; | ||
} | ||
` | ||
|
||
export const NavLinks = styled.div` | ||
position: absolute; | ||
right: 80px; | ||
top: 40px; | ||
display: flex; | ||
@media (max-width: ${dimensions.maxwidthTablet}px) { | ||
display: none; | ||
} | ||
` | ||
|
||
export const NavLink = styled.div` | ||
font-weight: bold; | ||
padding-left: 100px; | ||
text-decoration: none; | ||
color: ${colors.black900}; | ||
` | ||
|
||
export const MobileIcon = styled.div` | ||
@media (min-width: ${dimensions.maxwidthTablet}px) { | ||
display: none; | ||
} | ||
@media (max-width: ${dimensions.maxwidthTablet}px) { | ||
left: 24px; | ||
top: 32px; | ||
position: absolute; | ||
} | ||
` |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import React, { useState } from "react" | ||
import Hamburger from "../../vectors/hamburger.svg" | ||
import { | ||
NavContainer, | ||
Logo, | ||
MobileIcon, | ||
NavLinks, | ||
NavLink, | ||
} from "./header-styles" | ||
|
||
import { NavText } from "../../style/type-styles" | ||
|
||
export const Header = () => { | ||
const [open, setOpen] = useState(false) | ||
const [colorChange, setColorchange] = useState(false) | ||
const changeNavbarColor = () => { | ||
if (typeof window !== "undefined" && window.scrollY >= 80) { | ||
setColorchange(true) | ||
} else { | ||
setColorchange(false) | ||
} | ||
} | ||
typeof window !== "undefined" && | ||
window.addEventListener("scroll", changeNavbarColor) | ||
|
||
return ( | ||
<NavContainer className={colorChange ? "navbar colorChange" : "navbar"}> | ||
<Logo>PowerHouse</Logo> | ||
|
||
<MobileIcon onClick={() => setOpen(!open)} className={open ? "open" : ""}> | ||
<Hamburger /> | ||
</MobileIcon> | ||
<NavLinks> | ||
<NavLink href="/about"> | ||
<NavText>ABOUT</NavText> | ||
</NavLink> | ||
<NavLink href="/process"> | ||
<NavText>PROCESS</NavText> | ||
</NavLink> | ||
<NavLink href="/products"> | ||
<NavText>PRODUCTS</NavText> | ||
</NavLink> | ||
<NavLink href="/solutions"> | ||
<NavText>SOLUTIONS</NavText> | ||
</NavLink> | ||
</NavLinks> | ||
</NavContainer> | ||
) | ||
} | ||
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
Oops, something went wrong.