{"version":3,"sources":["webpack:///./src/pages/index.js"],"names":["PostTitle","styled","h3","rhythm","PostTitleLink","Link","PostDate","time","scale","BlogIndex","renderExcerpt","node","frontmatter","excerpt","dangerouslySetInnerHTML","__html","render","this","props","data","siteTitle","site","siteMetadata","title","posts","allMarkdownRemark","edges","map","fields","slug","key","to","dateTime","date","React","Component","pageQuery"],"mappings":"iOAUA,IAAMA,EAAYC,IAAOC,GAAV,oCAAGD,CAAH,uBACIE,YAAO,MAGpBC,EAAgBH,YAAOI,KAAV,oCAAGJ,CAAH,0FAWbK,EAAWL,IAAOM,KAAV,oCAAGN,CAAH,wDAEVO,aAAM,KACML,aAAO,KACJA,YAAO,MAGpBM,E,4JA4BJC,cAAgB,SAACC,GACf,OAAIA,EAAKC,YAAYC,QAEjB,2BACGF,EAAKC,YAAYC,SAIjB,uBAAGC,wBAAyB,CAAEC,OAAQJ,EAAKE,Y,4GAGpDG,OAAA,WAAU,IAAD,SAQHC,KAAKC,MANPC,KAE2BC,EAJtB,EAGHC,KACEC,aAAgBC,MAEUC,EANzB,EAMHC,kBAAqBC,MAIzB,OACE,kBAAC,IAAD,KACE,6BACE,kBAAC,IAAD,CAAQH,MAAOH,IACdI,EAAMG,KAAI,YAAe,IAAZhB,EAAW,EAAXA,KACNY,EAAQZ,EAAKC,YAAYW,OAASZ,EAAKiB,OAAOC,KACpD,OACE,yBAAKC,IAAKnB,EAAKiB,OAAOC,MACpB,kBAAC7B,EAAD,KACE,kBAACI,EAAD,CAAe2B,GAAIpB,EAAKiB,OAAOC,MAC5BN,IAGL,kBAACjB,EAAD,CAAU0B,SAAUrB,EAAKC,YAAYqB,MAClCtB,EAAKC,YAAYqB,MAEnB,EAAKvB,cAAcC,U,GAjEZuB,IAAMC,WA2Ef1B,YAER,IAAM2B,EAAS","file":"component---src-pages-index-js-5ceddad1d678030a674c.js","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link, graphql } from 'gatsby';\nimport Helmet from 'react-helmet';\nimport styled from 'styled-components';\n\nimport Layout from '../components/layout';\n\nimport { rhythm, scale } from '../utils/typography';\n\nconst PostTitle = styled.h3`\n margin-bottom: ${rhythm(1 / 4)};\n`;\n\nconst PostTitleLink = styled(Link)`\n box-shadow: none;\n text-decoration: none;\n color: inherit;\n\n &:hover,\n &:visited {\n color: inherit;\n }\n`;\n\nconst PostDate = styled.time`\n display: block;\n ${scale(-1 / 4)};\n margin-top: ${rhythm(-1 / 4)};\n margin-bottom: ${rhythm(1 / 4)};\n`;\n\nclass BlogIndex extends React.Component {\n static propTypes = {\n data: PropTypes.shape({\n site: PropTypes.shape({\n siteMetadata: PropTypes.shape({\n title: PropTypes.string.isRequired,\n }).isRequired,\n }).isRequired,\n allMarkdownRemark: PropTypes.shape({\n edges: PropTypes.arrayOf([\n PropTypes.shape({\n node: PropTypes.shape({\n frontmatter: PropTypes.shape({\n title: PropTypes.string.isRequired,\n date: PropTypes.string.isRequired,\n excerpt: PropTypes.string,\n }).isRequired,\n fields: PropTypes.shape({\n slug: PropTypes.string.isRequired,\n }).isRequired,\n excerpt: PropTypes.node.isRequired,\n }),\n }).isRequired,\n ]).isRequired,\n }).isRequired,\n }).isRequired,\n };\n\n renderExcerpt = (node) => {\n if (node.frontmatter.excerpt) {\n return (\n

\n {node.frontmatter.excerpt}\n

\n );\n }\n return

;\n };\n\n render() {\n const {\n data: {\n site: {\n siteMetadata: { title: siteTitle },\n },\n allMarkdownRemark: { edges: posts },\n },\n } = this.props;\n\n return (\n \n

\n \n {posts.map(({ node }) => {\n const title = node.frontmatter.title || node.fields.slug;\n return (\n
\n \n \n {title}\n \n \n \n {node.frontmatter.date}\n \n {this.renderExcerpt(node)}\n
\n );\n })}\n
\n \n );\n }\n}\n\nexport default BlogIndex;\n\nexport const pageQuery = graphql`\n query IndexQuery {\n site {\n siteMetadata {\n title\n }\n }\n allMarkdownRemark(sort: { fields: [frontmatter___date], order: DESC }) {\n edges {\n node {\n excerpt\n fields {\n slug\n }\n frontmatter {\n date(formatString: \"D MMMM, YYYY\")\n title\n excerpt\n }\n }\n }\n }\n }\n`;\n"],"sourceRoot":""}