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
import React from 'react' | |
import { graphql } from 'gatsby' | |
import { Helmet } from 'react-helmet' | |
import React from "react"; | |
import { graphql } from "gatsby"; | |
import { Helmet } from "react-helmet"; | |
import get from "lodash/get"; | |
import Img from "gatsby-image"; | |
import Layout from "../components/layout"; | |
import QuoteComponent, { |
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
import React from "react"; | |
import { graphql } from "gatsby"; | |
const QuoteComponent = ({ quote, author, theme }) => ( | |
<div | |
style={{ | |
backgroundColor: theme, | |
padding: "30px", | |
width: "80%", | |
margin: "0 0 auto", |
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
import React from "react" | |
import { graphql } from "gatsby" | |
import RichText from '@madebyconnor/rich-text-to-jsx'; | |
const WallOfTextComponent = ({text}) => <RichText richText={text.json} /> | |
export default WallOfTextComponent | |
export const modelName = 'ContentfulWallOfTextComponent'; | |
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
import React from "react"; | |
import { graphql } from "gatsby"; | |
import Gist from "super-react-gist"; | |
const CodeComponent = ({ url }) => <Gist url={url} />; | |
export default CodeComponent; | |
export const modelName = "ContentfulCodeComponent"; | |
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
const content = () => { | |
if(post.contentReferences) { | |
return(post.contentReferences.map(reference => { | |
switch(reference.__typename) { | |
case 'ContentfulCodeComponent': { | |
return <CodeComponent {...reference} /> | |
} | |
default: | |
return null | |
} |
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
export const pageQuery = graphql` | |
query BlogPostBySlug($slug: String!) { | |
contentfulBlogPost(slug: { eq: $slug }) { | |
title | |
publishDate(formatString: "MMMM Do, YYYY") | |
heroImage { | |
fluid(maxWidth: 1180, background: "rgb:000000") { | |
...GatsbyContentfulFluid_tracedSVG | |
} | |
} |
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
export const pageQuery = graphql` | |
query BlogPostBySlug($slug: String!) { | |
contentfulBlogPost(slug: { eq: $slug }) { | |
title | |
publishDate(formatString: "MMMM Do, YYYY") | |
heroImage { | |
fluid(maxWidth: 1180, background: "rgb:000000") { | |
...GatsbyContentfulFluid_tracedSVG | |
} | |
} |
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
import React from "react" | |
import { graphql } from "gatsby" | |
const CodeComponent = () => <div><span></span></div> | |
export default CodeComponent | |
export const query = graphql` | |
fragment CodeComponentFragment on ContentfulCodeComponent { | |
url |
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
query BlogPostBySlug($slug: String!) { | |
contentfulBlogPost(slug: { eq: $slug }) { | |
contentReferences { | |
... on ContentfulCodeComponent { | |
url | |
__typename | |
} | |
} | |
} | |
} |
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
export const pageQuery = graphql` | |
query BlogPostBySlug($slug: String!) { | |
contentfulBlogPost(slug: { eq: $slug }) { | |
title | |
publishDate(formatString: "MMMM Do, YYYY") | |
heroImage { | |
fluid(maxWidth: 1180, background: "rgb:000000") { | |
...GatsbyContentfulFluid_tracedSVG | |
} | |
} |
NewerOlder