-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-pages-index-js-85f5bbb9ca374775fc34.js.map
1 lines (1 loc) · 16.3 KB
/
component---src-pages-index-js-85f5bbb9ca374775fc34.js.map
1
{"version":3,"sources":["webpack:///./src/components/Search.jsx","webpack:///./src/pages/index.js","webpack:///./.cache/gatsby-browser-entry.js","webpack:///./.cache/public-page-renderer.js","webpack:///./src/components/seo.js","webpack:///./.cache/public-page-renderer-prod.js","webpack:///./src/components/header.js","webpack:///./src/components/layout.js"],"names":["Search","props","_this","_Component","call","this","getOrCreateIndex","index","Index","load","searchIndex","search","evt","query","target","value","setState","results","map","_ref","ref","documentStore","getDoc","state","render","react_default","a","createElement","type","onChange","placeholder","aria-label","page","key","id","gatsby_browser_entry","to","path","title","keywords","join","Component","__webpack_require__","d","__webpack_exports__","IndexPage","data","layout","seo","style","margin","maxWidth","Search_Search","siteSearchIndex","allMarkdownRemark","edges","_ref2","node","className","fields","slug","textDecoration","color","frontmatter","date","timeToRead","excerpt","r","graphql","StaticQueryContext","StaticQuery","react__WEBPACK_IMPORTED_MODULE_0__","react__WEBPACK_IMPORTED_MODULE_0___default","n","prop_types__WEBPACK_IMPORTED_MODULE_1__","prop_types__WEBPACK_IMPORTED_MODULE_1___default","gatsby_link__WEBPACK_IMPORTED_MODULE_2__","gatsby_link__WEBPACK_IMPORTED_MODULE_2___default","_public_page_renderer__WEBPACK_IMPORTED_MODULE_3__","_public_page_renderer__WEBPACK_IMPORTED_MODULE_3___default","_parse_path__WEBPACK_IMPORTED_MODULE_4__","React","createContext","Consumer","staticQueryData","children","Error","propTypes","PropTypes","object","string","isRequired","func","m","module","exports","require","default","SEO","description","lang","meta","react__WEBPACK_IMPORTED_MODULE_1___default","gatsby__WEBPACK_IMPORTED_MODULE_4__","detailsQuery","metaDescription","site","siteMetadata","react_helmet__WEBPACK_IMPORTED_MODULE_3___default","htmlAttributes","titleTemplate","name","content","property","author","concat","length","_public_static_d_1025518380_json__WEBPACK_IMPORTED_MODULE_0__","defaultProps","array","arrayOf","ProdPageRenderer","location","pageResources","loader","getResourcesForPathnameSync","pathname","InternalPageRenderer","Object","assign","json","shape","Header","siteTitle","marginBottom","padding","Layout","Fragment","header","paddingTop","href","_755544856"],"mappings":"+JAKqBA,cACnB,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OACjBA,EAAAC,EAAAC,KAAAC,KAAMJ,IAANI,MA6BFC,iBAAmB,kBACjBJ,EAAKK,MACDL,EAAKK,MAELC,QAAMC,KAAKP,EAAKD,MAAMS,cAlCTR,EAoCnBS,OAAS,SAAAC,GACP,IAAMC,EAAQD,EAAIE,OAAOC,MACzBb,EAAKK,MAAQL,EAAKI,mBAClBJ,EAAKc,SAAS,CACZH,QAEAI,QAASf,EAAKK,MACXI,OAAOE,EAAO,IAEdK,IAAI,SAAAC,GAAA,IAAGC,EAAHD,EAAGC,IAAH,OAAalB,EAAKK,MAAMc,cAAcC,OAAOF,QA3CtDlB,EAAKqB,MAAQ,CACXV,MAAK,GACLI,QAAS,IAJMf,8BAQnBsB,OAAA,WACE,OACEC,EAAAC,EAAAC,cAAA,WACEF,EAAAC,EAAAC,cAAA,SACEC,KAAK,OACLb,MAAOV,KAAKkB,MAAMV,MAClBgB,SAAUxB,KAAKM,OACfmB,YAAY,YACZC,aAAW,WAEbN,EAAAC,EAAAC,cAAA,UACGtB,KAAKkB,MAAMN,QAAQC,IAAI,SAAAc,GAAI,OAC1BP,EAAAC,EAAAC,cAAA,MAAIM,IAAKD,EAAKE,IACZT,EAAAC,EAAAC,cAACQ,EAAA,KAAD,CAAMC,GAAIJ,EAAKK,MAAOL,EAAKM,OAD7B,IAC4C,IACzCN,EAAKO,SAASC,KAAd,cAvBqBC,+BCLpCC,EAAAC,EAAAC,EAAA,0BAAA/B,IAiCegC,UA1BG,SAAA1B,GAAc,IAAX2B,EAAW3B,EAAX2B,KACnB,OACErB,EAAAC,EAAAC,cAACoB,EAAA,EAAD,KACEtB,EAAAC,EAAAC,cAACqB,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A,KAAD,CACEC,GAAG,IACHa,MAAO,CACLa,MAAK,QACLD,eAAc,SAGfwE,OAOXD,EAAO7C,UAAY,CACjB8C,UAAW7C,IAAUE,QAGvB0C,EAAOd,aAAe,CACpBe,UAAS,IAGID,QCjCTI,UAAS,SAAArH,GAAA,IAAGkE,EAAHlE,EAAGkE,SAAH,OACb5D,EAAAC,EAAAC,cAACQ,EAAA,YAAD,CACEtB,MAAK,YASLW,OAAQ,SAAAsB,GAAI,OACVrB,EAAAC,EAAAC,cAAAF,EAAAC,EAAA+G,SAAA,KACEhH,EAAAC,EAAAC,cAAC+G,EAAD,CAAQL,UAAWvF,EAAK4D,KAAKC,aAAarE,QAC1Cb,EAAAC,EAAAC,cAAA,OACEsB,MAAO,CACLC,OAAM,SACNC,SAAU,IACVoF,QAAO,wBACPI,WAAY,IAGbtD,EACD5D,EAAAC,EAAAC,cAAA,oCACqBF,EAAAC,EAAAC,cAAA,KAAGiH,KAAK,4BAAR,cAvB7B9F,KAAA+F,MA+BFL,EAAOjD,UAAY,CACjBF,SAAUG,IAAU/B,KAAKkC,YAGZ6C","file":"component---src-pages-index-js-85f5bbb9ca374775fc34.js","sourcesContent":["import React, { Component } from \"react\";\nimport { Index } from \"elasticlunr\";\nimport { Link } from \"gatsby\";\n\n// Search component\nexport default class Search extends Component {\n constructor(props) {\n super(props);\n this.state = {\n query: ``,\n results: []\n };\n }\n\n render() {\n return (\n <div>\n <input\n type=\"text\"\n value={this.state.query}\n onChange={this.search}\n placeholder=\"Search...\"\n aria-label=\"Search\"\n />\n <ul>\n {this.state.results.map(page => (\n <li key={page.id}>\n <Link to={page.path}>{page.title}</Link>:{\" \"}\n {page.keywords.join(`,`)}\n </li>\n ))}\n </ul>\n </div>\n );\n }\n\n getOrCreateIndex = () =>\n this.index\n ? this.index\n : // Create an elastic lunr index and hydrate with graphql query results\n Index.load(this.props.searchIndex);\n\n search = evt => {\n const query = evt.target.value;\n this.index = this.getOrCreateIndex();\n this.setState({\n query,\n // Query the index with search string to get an [] of IDs\n results: this.index\n .search(query, {})\n // Map over each ID and return the full document\n .map(({ ref }) => this.index.documentStore.getDoc(ref))\n });\n };\n}\n","import React from \"react\";\nimport { graphql } from \"gatsby\";\nimport { Link } from \"gatsby\";\nimport Search from \"../components/Search\";\nimport Layout from \"../components/layout\";\nimport SEO from \"../components/seo\";\n\nconst IndexPage = ({ data }) => {\n return (\n <Layout>\n <SEO title=\"Home\" keywords={[`jmn`, `blog`, `react`]} />\n <div style={{ margin: `1rem auto`, maxWidth: 600 }}>\n <Search searchIndex={data.siteSearchIndex.index} />\n {data.allMarkdownRemark.edges.map(({ node }) => (\n <div key={node.id} className=\"article-box\">\n <Link\n to={node.fields.slug}\n style={{ textDecoration: \"none\", color: \"inherit\" }}\n >\n <h3 className=\"title\">{node.frontmatter.title}</h3>\n </Link>\n <p className=\"date\">\n {node.fields.date}, {node.timeToRead} min read\n </p>\n <p className=\"excerpt\">{node.excerpt}</p>\n <hr />\n </div>\n ))}\n </div>\n </Layout>\n );\n};\n\nexport default IndexPage;\n\nexport const query = graphql`\n query IndexQuery {\n allMarkdownRemark(sort: { order: DESC, fields: [fields___date] }) {\n edges {\n node {\n id\n frontmatter {\n title\n }\n fields {\n slug\n date\n }\n excerpt\n timeToRead\n }\n }\n }\n siteSearchIndex {\n index\n }\n }\n`;\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport Link, {\n withPrefix,\n navigate,\n push,\n replace,\n navigateTo,\n} from \"gatsby-link\"\nimport PageRenderer from \"./public-page-renderer\"\nimport parsePath from \"./parse-path\"\n\nconst StaticQueryContext = React.createContext({})\n\nconst StaticQuery = props => (\n <StaticQueryContext.Consumer>\n {staticQueryData => {\n if (\n props.data ||\n (staticQueryData[props.query] && staticQueryData[props.query].data)\n ) {\n return (props.render || props.children)(\n props.data ? props.data.data : staticQueryData[props.query].data\n )\n } else {\n return <div>Loading (StaticQuery)</div>\n }\n }}\n </StaticQueryContext.Consumer>\n)\n\nStaticQuery.propTypes = {\n data: PropTypes.object,\n query: PropTypes.string.isRequired,\n render: PropTypes.func,\n children: PropTypes.func,\n}\n\nfunction graphql() {\n throw new Error(\n `It appears like Gatsby is misconfigured. Gatsby related \\`graphql\\` calls ` +\n `are supposed to only be evaluated at compile time, and then compiled away,. ` +\n `Unfortunately, something went wrong and the query was left in the compiled code.\\n\\n.` +\n `Unless your site has a complex or custom babel/Gatsby configuration this is likely a bug in Gatsby.`\n )\n}\n\nexport {\n Link,\n withPrefix,\n graphql,\n parsePath,\n navigate,\n push, // TODO replace for v3\n replace, // TODO remove replace for v3\n navigateTo, // TODO: remove navigateTo for v3\n StaticQueryContext,\n StaticQuery,\n PageRenderer,\n}\n","const preferDefault = m => (m && m.default) || m\n\nif (process.env.BUILD_STAGE === `develop`) {\n module.exports = preferDefault(require(`./public-page-renderer-dev`))\n} else if (process.env.BUILD_STAGE === `build-javascript`) {\n module.exports = preferDefault(require(`./public-page-renderer-prod`))\n} else {\n module.exports = () => null\n}\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport Helmet from 'react-helmet'\nimport { StaticQuery, graphql } from 'gatsby'\n\nfunction SEO({ description, lang, meta, keywords, title }) {\n return (\n <StaticQuery\n query={detailsQuery}\n render={data => {\n const metaDescription =\n description || data.site.siteMetadata.description\n return (\n <Helmet\n htmlAttributes={{\n lang,\n }}\n title={title}\n titleTemplate={`%s | ${data.site.siteMetadata.title}`}\n meta={[\n {\n name: `description`,\n content: metaDescription,\n },\n {\n property: `og:title`,\n content: title,\n },\n {\n property: `og:description`,\n content: metaDescription,\n },\n {\n property: `og:type`,\n content: `website`,\n },\n {\n name: `twitter:card`,\n content: `summary`,\n },\n {\n name: `twitter:creator`,\n content: data.site.siteMetadata.author,\n },\n {\n name: `twitter:title`,\n content: title,\n },\n {\n name: `twitter:description`,\n content: metaDescription,\n },\n ]\n .concat(\n keywords.length > 0\n ? {\n name: `keywords`,\n content: keywords.join(`, `),\n }\n : []\n )\n .concat(meta)}\n />\n )\n }}\n />\n )\n}\n\nSEO.defaultProps = {\n lang: `en`,\n meta: [],\n keywords: [],\n}\n\nSEO.propTypes = {\n description: PropTypes.string,\n lang: PropTypes.string,\n meta: PropTypes.array,\n keywords: PropTypes.arrayOf(PropTypes.string),\n title: PropTypes.string.isRequired,\n}\n\nexport default SEO\n\nconst detailsQuery = graphql`\n query DefaultSEOQuery {\n site {\n siteMetadata {\n title\n description\n author\n }\n }\n }\n`\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\n\nimport InternalPageRenderer from \"./page-renderer\"\nimport loader from \"./loader\"\n\nconst ProdPageRenderer = ({ location }) => {\n const pageResources = loader.getResourcesForPathnameSync(location.pathname)\n return React.createElement(InternalPageRenderer, {\n location,\n pageResources,\n ...pageResources.json,\n })\n}\n\nProdPageRenderer.propTypes = {\n location: PropTypes.shape({\n pathname: PropTypes.string.isRequired,\n }).isRequired,\n}\n\nexport default ProdPageRenderer\n","import { Link } from \"gatsby\";\nimport PropTypes from \"prop-types\";\nimport React from \"react\";\n\nconst Header = ({ siteTitle }) => (\n <div\n style={{\n marginBottom: `0rem`\n }}\n >\n <div\n style={{\n margin: `0 auto`,\n maxWidth: 600,\n padding: `1rem 0rem`\n }}\n >\n <h1 style={{ margin: 0 }}>\n <Link\n to=\"/\"\n style={{\n color: `white`,\n textDecoration: `none`\n }}\n >\n {siteTitle}\n </Link>\n </h1>\n </div>\n </div>\n);\n\nHeader.propTypes = {\n siteTitle: PropTypes.string\n};\n\nHeader.defaultProps = {\n siteTitle: ``\n};\n\nexport default Header;\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { StaticQuery, graphql } from 'gatsby'\n\nimport Header from './header'\nimport './layout.css'\n\nconst Layout = ({ children }) => (\n <StaticQuery\n query={graphql`\n query SiteTitleQuery {\n site {\n siteMetadata {\n title\n }\n }\n }\n `}\n render={data => (\n <>\n <Header siteTitle={data.site.siteMetadata.title} />\n <div\n style={{\n margin: `0 auto`,\n maxWidth: 960,\n padding: `0px 1.0875rem 1.45rem`,\n paddingTop: 0,\n }}\n >\n {children}\n <footer>\n © 2018, Built with <a href=\"https://www.gatsbyjs.org\">Gatsby</a>\n </footer>\n </div>\n </>\n )}\n />\n)\n\nLayout.propTypes = {\n children: PropTypes.node.isRequired,\n}\n\nexport default Layout\n"],"sourceRoot":""}