Skip to content
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

grab first paragraph from Contentful for canon case study (instead of intro sentence) #74

Merged
merged 2 commits into from Jan 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 17 additions & 14 deletions src/pages/case-study/canon-giving-stories-a-new-form.js
Expand Up @@ -52,7 +52,7 @@ const PaddedParagraph = styled(Paragraph)`
padding: ${remcalc(12)} 0;
`

const IntroSentenceCol = styled(Col)`
const FirstParagraphCol = styled(Col)`
margin-left: auto;
${breakpoint('smallTablet')`
padding-left: 0;
Expand Down Expand Up @@ -133,11 +133,13 @@ const IndexPage = ({
<CaseStudyTop caseStudy={caseStudy} />
<Padding top={{ smallPhone: 3.5, tablet: 5 }} />
<Row>
<IntroSentenceCol width={[1, 1, 1, 1, 1 / 2]}>
<Paragraph fullWidth>
{caseStudy.introSentence.introSentence}
</Paragraph>
</IntroSentenceCol>
<FirstParagraphCol width={[1, 1, 1, 1, 1 / 2]}>
{makeText(caseStudy.genericText1.genericText1).map((p, i) => (
<Paragraph fullWidth key={i}>
{p}
</Paragraph>
))}
</FirstParagraphCol>
</Row>
<Padding bottom={{ smallPhone: 3.5, tablet: 5 }} />
</Grid>
Expand All @@ -162,7 +164,7 @@ const IndexPage = ({
<Row>
<RightAlignedCol width={[1, 1, 1, 1 / 2]}>
<Margin top={3}>
{makeText(caseStudy.genericText1.genericText1).map((p, i) => (
{makeText(caseStudy.genericText2.genericText2).map((p, i) => (
<Paragraph padded fullWidth key={i}>
{p}
</Paragraph>
Expand All @@ -176,7 +178,7 @@ const IndexPage = ({
<NoMobile tablet>
<GradientGrid>
<GradientContent
text={caseStudy.genericText2.genericText2}
text={caseStudy.genericText3.genericText3}
image={travel.childImageSharp}
/>
</GradientGrid>
Expand All @@ -187,7 +189,7 @@ const IndexPage = ({
<GradientBackground>
<Grid>
<GradientContent
text={caseStudy.genericText2.genericText2}
text={caseStudy.genericText3.genericText3}
image={travel.childImageSharp}
/>
</Grid>
Expand All @@ -201,7 +203,7 @@ const IndexPage = ({
<H2>Exploring the story</H2>
</Col>
<Col width={[1, 1, 1, 1 / 2]}>
{makeText(caseStudy.genericText3.genericText3).map((p, i) => (
{makeText(caseStudy.genericText4.genericText4).map((p, i) => (
<PaddedParagraph key={i}>{p}</PaddedParagraph>
))}
</Col>
Expand Down Expand Up @@ -235,7 +237,7 @@ const IndexPage = ({
<H2>Out in the wild</H2>
</Col>
<Col width={[1, 1, 1, 1 / 2]}>
{makeText(caseStudy.genericText4.genericText4).map((p, i) => (
{makeText(caseStudy.genericText5.genericText5).map((p, i) => (
<Paragraph padded key={i}>
{p}
</Paragraph>
Expand Down Expand Up @@ -310,9 +312,6 @@ export const query = graphql`
url
}
}
introSentence {
introSentence
}
genericText1 {
id
genericText1
Expand All @@ -329,6 +328,10 @@ export const query = graphql`
id
genericText4
}
genericText5 {
id
genericText5
}
services {
... on ContentfulService {
title
Expand Down