Skip to content

Commit

Permalink
Merge branch 'master' into #36-singular-product-page-image-highlight-…
Browse files Browse the repository at this point in the history
…section
  • Loading branch information
samgildea committed Apr 9, 2021
2 parents 5a681f4 + 80696ce commit c7e7215
Show file tree
Hide file tree
Showing 11 changed files with 344 additions and 26 deletions.
8 changes: 8 additions & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,13 @@ module.exports = {
typePathsFilenamePrefix: "prismic-typepaths---powerhouse-site",
},
},
{
resolve: "gatsby-plugin-react-svg",
options: {
rule: {
include: /vectors/ // See below to configure properly
}
}
}
],
}
80 changes: 80 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"gatsby": "^2.26.1",
"gatsby-plugin-exclude": "^1.0.2",
"gatsby-plugin-netlify-headers": "^1.0.1",
"gatsby-plugin-react-svg": "^3.0.0",
"gatsby-plugin-sass": "^4.0.2",
"gatsby-source-prismic": "^3.3.3",
"node-sass": "^5.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/components/footer/footer-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const FooterContainer = styled.div`
background-color: #848484;
width: 100%;
color: #ffffff;
position: relative;
`

export const FooterMainContent = styled.div`
Expand Down
60 changes: 60 additions & 0 deletions src/components/header/header-styles.js
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;
}
`
50 changes: 50 additions & 0 deletions src/components/header/header.jsx
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
82 changes: 78 additions & 4 deletions src/components/homepage/index-styles.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import styled from "styled-components"
import dimensions from "../../style/dimensions"

import {
layoutPaddingDesktop,
layoutPaddingMobile,
Expand All @@ -26,11 +27,9 @@ export const HeroTextSection = styled.div`
}
`

export const HeroHeadline = styled.div`
`
export const HeroHeadline = styled.div``

export const HeroDescription = styled.div`
`
export const HeroDescription = styled.div``

export const HeroCTA = styled.div`
margin-top: 64px;
Expand All @@ -45,3 +44,78 @@ export const HeroCTA = styled.div`
padding-bottom: 16px;
}
`

export const FutureSection = styled.div`
height: 100vh;
position: relative;
padding-top: 64px;
@media (min-width: ${dimensions.maxwidthTablet}px) {
display: flex;
align-items: center;
padding-top: 0px;
}
`

export const FutureText = styled.div``

export const FutureImage = styled.div`
background-color: ${colors.gray_icon};
width: 100%;
height: 450px;
margin-top: 80px;
@media (min-width: ${dimensions.maxwidthTablet}px) {
position: absolute;
right: 0;
width: 42vw;
height: 768px;
}
`

export const FutureHeader = styled.div`
font-weight: bold;
@media (min-width: ${dimensions.maxwidthTablet}px) {
}
`

export const FutureSolarIcon = styled.div`
width: 64px;
height: 64px;
border-radius: 8px;
background-color: ${colors.gray_icon};
margin-bottom: 48px;
`

export const FutureDescription = styled.div`
margin-top: 32px;
font-size: 18px;
@media (max-width: ${dimensions.maxwidthTablet}px) {
font-size: 16px;
}
`
export const FutureCTA = styled.div`
margin-top: 64px;
a {
padding-right: 60px;
padding-left: 60px;
padding-top: 16px;
padding-bottom: 16px;
border: solid ${colors.gray_CTA}; 1px;
font-size: 16px;
font-weight: bold;
text-decoration: none;
text-transform: uppercase;
color: ${colors.gray_CTA};
}
`

export const HomePageContainer = styled.div`
position: relative;
z-index: 0;
`
Loading

0 comments on commit c7e7215

Please sign in to comment.