Skip to content

Commit

Permalink
#20 moving future of solar component to components folder
Browse files Browse the repository at this point in the history
  • Loading branch information
samgildea committed Apr 3, 2021
1 parent 1b2b055 commit c1b7f19
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 25 deletions.
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
77 changes: 73 additions & 4 deletions src/components/homepage/index-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,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 +43,74 @@ 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: #c4c4c4;
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: #a4a4a4;
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 #646464 1px;
font-size: 16px;
font-weight: bold;
text-decoration: none;
text-transform: uppercase;
color: #646464;
}
`

export const HomePageContainer = styled.div``
64 changes: 48 additions & 16 deletions src/components/homepage/index.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,61 @@
import React from "react"
import { H1, P } from "../../style/type-styles"
import { H1, P, H2 } from "../../style/type-styles"
import {
HeroContainer,
HeroTextSection,
HeroHeadline,
HeroDescription,
HeroCTA,
FutureSection,
FutureText,
FutureSolarIcon,
FutureHeader,
FutureDescription,
FutureCTA,
FutureImage,
HomePageContainer,
} from "./index-styles"

export default function HomePage({ data }) {
return (
<HeroContainer>
<HeroTextSection>
<HeroHeadline>
<H1>{data.hero_headline}</H1>
</HeroHeadline>
<HeroDescription>
<P>{data.hero_subtext}</P>
</HeroDescription>
<HeroCTA>
<a target="_blank" rel="noreferrer" href={data.hero_button_destination.text}>
{data.hero_cta_text}
</a>
</HeroCTA>
</HeroTextSection>
</HeroContainer>
<HomePageContainer>
<HeroContainer>
<HeroTextSection>
<HeroHeadline>
<H1>{data.hero_headline}</H1>
</HeroHeadline>
<HeroDescription>
<P>{data.hero_subtext}</P>
</HeroDescription>
<HeroCTA>
<a
target="_blank"
s
rel="noreferrer"
href={data.hero_button_destination.text}
>
{data.hero_cta_text}
</a>
</HeroCTA>
</HeroTextSection>
</HeroContainer>

<FutureSection>
<FutureText>
<FutureSolarIcon></FutureSolarIcon>
<FutureHeader>
<H2>{data.section_title}</H2>
</FutureHeader>
<FutureDescription>
<P>{data.section_description}</P>
</FutureDescription>

<FutureCTA>
<a href={data.button_destination}>{data.button_text}</a>
</FutureCTA>
</FutureText>
<FutureImage></FutureImage>
</FutureSection>
</HomePageContainer>
)
}
7 changes: 2 additions & 5 deletions src/components/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import dimensions from "../style/dimensions"
import { layoutPaddingDesktop, layoutPaddingMobile } from "../style/variables"
import Footer from "../components/footer/footer"

const LayoutContainer = styled.div`
`
const LayoutContainer = styled.div``
const LayoutBody = styled.div`
@media (min-width: ${dimensions.maxwidthTablet}px) {
padding: 0 ${layoutPaddingDesktop} ${layoutPaddingDesktop};s
Expand All @@ -23,10 +21,9 @@ const Layout = ({ children }) => {
return (
<LayoutContainer>
<LayoutBody>{children}</LayoutBody>

<Footer />
</LayoutContainer>
)
}

export default Layout
export default Layout

0 comments on commit c1b7f19

Please sign in to comment.