-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-pages-index-js-97f22cc067830817265b.js.map
1 lines (1 loc) · 10.2 KB
/
component---src-pages-index-js-97f22cc067830817265b.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:///./.cache/public-page-renderer-prod.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","page","key","id","gatsby_browser_entry","to","path","title","keywords","join","Component","__webpack_require__","d","__webpack_exports__","IndexPage","data","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","ProdPageRenderer","location","pageResources","loader","getResourcesForPathnameSync","pathname","InternalPageRenderer","Object","assign","json","shape"],"mappings":"+JAKqBA,cACnB,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OACjBA,EAAAC,EAAAC,KAAAC,KAAMJ,IAANI,MA4BFC,iBAAmB,kBACjBJ,EAAKK,MACDL,EAAKK,MAELC,QAAMC,KAAKP,EAAKD,MAAMS,cAjCTR,EAmCnBS,OAAS,SA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,EAAMiF,UAC5BjF,EAAM4C,KAAO5C,EAAM4C,KAAKA,KAAOoC,EAAgBhF,EAAMY,OAAOgC,MAGvDwB,EAAA3C,EAAAC,cAAA,uCAaf,SAASsC,IACP,MAAM,IAAIkB,MACR,gVATJhB,EAAYiB,UAAY,CACtBvC,KAAMwC,IAAUC,OAChBzE,MAAOwE,IAAUE,OAAOC,WACxBhE,OAAQ6D,IAAUI,KAClBP,SAAUG,IAAUI,2BCnCtB,IAAsBC,EAKpBC,EAAOC,SALaF,EAKWG,EAAQ,OALRH,EAAEI,SAAYJ,oGCMzCK,EAAmB,SAAA5E,GAAkB,IAAf6E,EAAe7E,EAAf6E,SACpBC,EAAgBC,UAAOC,4BAA4BH,EAASI,UAClE,OAAOtB,IAAMnD,cAAc0E,IAApBC,OAAAC,OAAA,CACLP,WACAC,iBACGA,EAAcO,QAIrBT,EAAiBX,UAAY,CAC3BY,SAAUX,IAAUoB,MAAM,CACxBL,SAAUf,IAAUE,OAAOC,aAC1BA,YAGUO","file":"component---src-pages-index-js-97f22cc067830817265b.js","sourcesContent":["import React, { Component } from \"react\";\nimport { Index } from \"elasticlunr\";\nimport { graphql, 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 />\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\";\n\n/*\nimport Layout from '../components/layout'\nimport Image from '../components/image'\nimport SEO from '../components/seo' */\n\n/* const IndexPage = () => (\n <Layout>\n <SEO title=\"Home\" keywords={[`gatsby`, `application`, `react`]} />\n <h1>Hi people</h1>\n <p>Welcome to your new Gatsby site.</p>\n <p>Now go build something great.</p>\n <div style={{ maxWidth: `300px`, marginBottom: `1.45rem` }}>\n <Image />\n </div>\n <Link to=\"/page-2/\">Go to page 2</Link>\n </Layout>\n)\n */\nconst IndexPage = ({ data }) => {\n return (\n <div style={{ margin: `3rem auto`, maxWidth: 600 }}>\n <h1>jmn's blog</h1>\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 );\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\"\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"],"sourceRoot":""}