Skip to content

EQ-96: Landing/Create better understand section #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions components/index/better-understand.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import styled from 'styled-components'

const SectionStyled = styled.section`
margin: 0 auto;
max-width: ${({ theme }) => theme.width.page};
@media ${({ theme }) => theme.breakpoint.md} {
padding: ${({ theme }) => theme.spacing[5]}px 0;
}
.image-bar {
background-color: ${({ theme }) => theme.color.greyMedium};
height: 200px;
@media ${({ theme }) => theme.breakpoint.md} {
display: none;
}
}
.content {
@media ${({ theme }) => theme.breakpoint.md} {
display: flex;
}
.left {
display: none;
padding: 0 ${({ theme }) => theme.spacing[4]}px;
width: 50%;
@media ${({ theme }) => theme.breakpoint.md} {
display: block;
}
@media ${({ theme }) => theme.breakpoint.lg} {
padding: 0 ${({ theme }) => theme.spacing[5]}px;
}
.image {
background-color: ${({ theme }) => theme.color.greyMedium};
height: 100%;
width: 100%;
}
}
.right {
padding: ${({ theme }) => theme.spacing[5]}px
${({ theme }) => theme.spacing[3]}px;
text-align: center;
@media ${({ theme }) => theme.breakpoint.md} {
padding: ${({ theme }) => theme.spacing[5]}px
${({ theme }) => theme.spacing[3]}px
${({ theme }) => theme.spacing[5]}px 0;
text-align: left;
}
h2 {
margin: 0 auto ${({ theme }) => theme.spacing[3]}px auto;
text-transform: uppercase;
@media ${({ theme }) => theme.breakpoint.md} {
margin: 0 0 ${({ theme }) => theme.spacing[3]}px 0;
max-width: 400px;
}
}
p {
margin: 0 auto;
max-width: 450px;
@media ${({ theme }) => theme.breakpoint.md} {
margin: 0;
}
}
.divider {
background-color: ${({ theme }) => theme.color.blue};
height: 5px;
margin: 0 auto ${({ theme }) => theme.spacing[3]}px auto;
width: 100px;
@media ${({ theme }) => theme.breakpoint.md} {
margin: 0 0 ${({ theme }) => theme.spacing[3]}px 0;
}
}
.paragraph-1 {
margin: 0 auto ${({ theme }) => theme.spacing[3]}px auto;
@media ${({ theme }) => theme.breakpoint.md} {
margin: 0 0 ${({ theme }) => theme.spacing[3]}px 0;
}
}
}
}
`

export default function BetterUnderstand() {
return (
<SectionStyled>
<div className='image-bar' />
<div className='content'>
<div className='left'>
<div className='image' />
</div>
<div className='right'>
<h2>
Better <span className='color-blue'>Understand</span> Your Consumers
</h2>
<div className='divider' />
<p className='paragraph-1'>
Where consumers are and where they’ve been not only reveal their day
to day habits in the physical world, but also their values and who
they aspire to&nbsp;be.
</p>
<p className='font-weight-bold'>
99% of consumers shop in store with their mobile&nbsp;device.
</p>
</div>
</div>
</SectionStyled>
)
}
1 change: 0 additions & 1 deletion components/index/hero.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const SectionStyled = styled.section`
z-index: ${({ theme }) => theme.zIndex.pageContent};
h1 {
font-size: 2em;
font-weight: ${({ theme }) => theme.font.regular};
margin: 0 0 ${({ theme }) => theme.spacing[4]}px 0;
text-transform: uppercase;
@media ${({ theme }) => theme.breakpoint.xs} {
Expand Down
1 change: 1 addition & 0 deletions package-lock.json

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

6 changes: 4 additions & 2 deletions pages/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import dynamic from 'next/dynamic'

const Hero = dynamic(() => import('../components/index/hero'))
const Video = dynamic(() => import('../components/index/video'))
const BetterUnderstand = dynamic(() =>
import('../components/index/better-understand')
)
const WhyClientsUseUs = dynamic(() =>
import('../components/index/why-clients-use-us')
)
Expand All @@ -21,7 +23,7 @@ export default function Index() {
return (
<>
<Hero />
<Video />
<BetterUnderstand />
<WhyClientsUseUs />
<LocationBehaviour />
<ConnectedDevices />
Expand Down
8 changes: 6 additions & 2 deletions styles/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ const GlobalStyle = createGlobalStyle`

h1 {
font-family: ${({ theme }) => theme.font.name}, sans-serif;
font-weight: ${({ theme }) => theme.font.bold};
font-weight: ${({ theme }) => theme.font.regular};
line-height: 1.25em;
margin: 0;
padding: 0;
}

h2 {
font-family: ${({ theme }) => theme.font.name}, sans-serif;
font-weight: ${({ theme }) => theme.font.bold};
font-weight: ${({ theme }) => theme.font.regular};
font-size: 2em;
margin: 0;
padding: 0;
Expand Down Expand Up @@ -49,6 +49,10 @@ const GlobalStyle = createGlobalStyle`
flex-direction: column;
}

.color-blue {
color: ${({ theme }) => theme.color.blue};
}

.font-weight-bold {
font-weight: ${({ theme }) => theme.font.bold};
}
Expand Down