-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomponent---src-pages-page-2-js-4f7d45b46081f8b0f464.js.map
1 lines (1 loc) · 18.5 KB
/
component---src-pages-page-2-js-4f7d45b46081f8b0f464.js.map
1
{"version":3,"sources":["webpack:///./src/pages/page-2.js","webpack:///./.cache/gatsby-browser-entry.js","webpack:///./.cache/public-page-renderer.js","webpack:///./.cache/public-page-renderer-prod.js","webpack:///./src/components/nav-link.js","webpack:///./src/components/header.js","webpack:///./src/components/social-media-link.js","webpack:///./src/components/footer.js","webpack:///./src/components/layout.js","webpack:///./src/components/seo.js"],"names":["__webpack_require__","r","__webpack_exports__","react__WEBPACK_IMPORTED_MODULE_0__","react__WEBPACK_IMPORTED_MODULE_0___default","n","gatsby__WEBPACK_IMPORTED_MODULE_1__","_components_layout__WEBPACK_IMPORTED_MODULE_2__","_components_seo__WEBPACK_IMPORTED_MODULE_3__","SecondPage","a","createElement","title","to","d","StaticQuery","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","StaticQueryContext","React","createContext","props","Consumer","staticQueryData","data","query","render","children","propTypes","PropTypes","object","string","isRequired","func","m","module","exports","require","default","ProdPageRenderer","_ref","location","pageResources","loader","getResourcesForPathnameSync","pathname","InternalPageRenderer","Object","assign","json","shape","linkStyles","color","display","margin","padding","textDecoration","NavLink","react_default","gatsby_browser_entry","style","Header","siteTitle","background","textAlign","dist_default","pinStart","webkitTransition","mozTransition","oTransition","transition","marginBottom","nav_link","index_esm","defaultProps","SocialMediaLink","href","target","rel","Footer","siteAuthor","marginTop","maxWidth","social_media_link","size","Date","getFullYear","Layout","react__WEBPACK_IMPORTED_MODULE_1___default","gatsby__WEBPACK_IMPORTED_MODULE_3__","Fragment","_header__WEBPACK_IMPORTED_MODULE_4__","site","siteMetadata","paddingTop","className","centerStyles","center","_footer__WEBPACK_IMPORTED_MODULE_5__","author","_public_static_d_4293929885_json__WEBPACK_IMPORTED_MODULE_0__","node","SEO","description","lang","meta","keywords","_public_static_d_2417117884_json__WEBPACK_IMPORTED_MODULE_0__","metaDescription","react_helmet__WEBPACK_IMPORTED_MODULE_3___default","htmlAttributes","titleTemplate","name","content","property","concat","length","join","arrayOf"],"mappings":"0FAAAA,EAAAC,EAAAC,GAAA,IAAAC,EAAAH,EAAA,GAAAI,EAAAJ,EAAAK,EAAAF,GAAAG,EAAAN,EAAA,KAAAO,EAAAP,EAAA,KAAAQ,EAAAR,EAAA,KAeeS,UATI,kBACjBL,EAAAM,EAAAC,cAACJ,EAAA,EAAD,KACEH,EAAAM,EAAAC,cAACH,EAAA,EAAD,CAAKI,MAAM,aACXR,EAAAM,EAAAC,cAAA,qCACAP,EAAAM,EAAAC,cAAA,8BACAP,EAAAM,EAAAC,cAACL,EAAA,EAAD,CAAMO,GAAG,KAAT,+DCXJb,EAAAc,EAAAZ,EAAA,sBAAAa,IAAA,IAAAZ,EAAAH,EAAA,GAAAI,EAAAJ,EAAAK,EAAAF,GAAAa,EAAAhB,EAAA,GAAAiB,EAAAjB,EAAAK,EAAAW,GAAAE,EAAAlB,EAAA,IAAAmB,EAAAnB,EAAAK,EAAAa,GAAAlB,EAAAc,EAAAZ,EAAA,sBAAAiB,EAAAT,IAAAV,EAAA,SAaMoB,EAAqBC,IAAMC,cAAc,IAEzCP,EAAc,SAAAQ,GAAK,OACvBnB,EAAAM,EAAAC,cAACS,EAAmBI,SAApB,KACG,SAAAC,GACC,OACEF,EAAMG,MACLD,EAAgBF,EAAMI,QAAUF,EAAgBF,EAAMI,OAAOD,MAEtDH,EAAMK,QAAUL,EAAMM,UAC5BN,EAAMG,KAAOH,EAAMG,KAAKA,KAAOD,EAAgBF,EAAMI,OAAOD,MAGvDtB,EAAAM,EAAAC,cAAA,uCA4BfI,EAAYe,UAAY,CACtBJ,KAAMK,IAAUC,OAChBL,MAAOI,IAAUE,OA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AAzBiE,KAAMC,EAAmBlE,EAAnBkE,SAAUhG,EAAS8B,EAAT9B,MACxCkF,EADiDe,EAAAnF,KACjDoE,KAcFgB,EAAkBL,GAAeX,EAAKC,aAAaU,YAEzD,OACEf,EAAAhF,EAAAC,cAACoG,EAAArG,EAAD,CACEsG,eAAgB,CACdN,QAEF9F,MAAOA,EACPqG,cAAa,QAAUnB,EAAKC,aAAanF,MACzC+F,KAAM,CACJ,CACEO,KAAI,cACJC,QAASL,GAEX,CACEM,SAAQ,WACRD,QAASvG,GAEX,CACEwG,SAAQ,iBACRD,QAASL,GAEX,CACEM,SAAQ,UACRD,QAAO,WAET,CACED,KAAI,eACJC,QAAO,WAET,CACED,KAAI,kBACJC,QAASrB,EAAKC,aAAaM,QAE7B,CACEa,KAAI,gBACJC,QAASvG,GAEX,CACEsG,KAAI,sBACJC,QAASL,IAGVO,OACCT,EAASU,OAAS,EACd,CACEJ,KAAI,WACJC,QAASP,EAASW,KAAT,OAEX,IAELF,OAAOV,KAKhBH,EAAI5B,aAAe,CACjB8B,KAAI,KACJC,KAAM,GACNC,SAAU,GACVH,YAAW,IAGbD,EAAI1E,UAAY,CACd2E,YAAa1E,IAAUE,OACvByE,KAAM3E,IAAUE,OAChB0E,KAAM5E,IAAUyF,QAAQzF,IAAUC,QAClC4E,SAAU7E,IAAUyF,QAAQzF,IAAUE,QACtCrB,MAAOmB,IAAUE,OAAOC,YAGXsE","file":"component---src-pages-page-2-js-4f7d45b46081f8b0f464.js","sourcesContent":["import React from \"react\"\r\nimport { Link } from \"gatsby\"\r\n\r\nimport Layout from \"../components/layout\"\r\nimport SEO from \"../components/seo\"\r\n\r\nconst SecondPage = () => (\r\n <Layout>\r\n <SEO title=\"Page two\" />\r\n <h1>Hi from the second page</h1>\r\n <p>Welcome to page 2</p>\r\n <Link to=\"/\">Go back to the homepage</Link>\r\n </Layout>\r\n)\r\n\r\nexport default SecondPage\r\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport Link, {\n withPrefix,\n withAssetPrefix,\n navigate,\n push,\n replace,\n navigateTo,\n parsePath,\n} from \"gatsby-link\"\nimport PageRenderer from \"./public-page-renderer\"\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\nconst useStaticQuery = query => {\n if (\n typeof React.useContext !== `function` &&\n process.env.NODE_ENV === `development`\n ) {\n throw new Error(\n `You're likely using a version of React that doesn't support Hooks\\n` +\n `Please update React and ReactDOM to 16.8.0 or later to use the useStaticQuery hook.`\n )\n }\n const context = React.useContext(StaticQueryContext)\n if (context[query] && context[query].data) {\n return context[query].data\n } else {\n throw new Error(\n `The result of this StaticQuery could not be fetched.\\n\\n` +\n `This is likely a bug in Gatsby and if refreshing the page does not fix it, ` +\n `please open an issue in https://github.com/gatsbyjs/gatsby/issues`\n )\n }\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 withAssetPrefix,\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 useStaticQuery,\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 if (!pageResources) {\n return null\n }\n\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 React from 'react';\r\nimport { Link } from 'gatsby';\r\n\r\nconst linkStyles = {\r\n color: 'white',\r\n display: 'inline-block',\r\n margin: '0 0.5rem',\r\n padding: '0.25rem',\r\n textDecoration:'none'\r\n};\r\n\r\nconst NavLink = ({ children, to }) => (\r\n <Link to={to} style={linkStyles}>\r\n {children}\r\n </Link>\r\n);\r\n\r\nexport default NavLink;","import { Link } from \"gatsby\";\r\nimport PropTypes from \"prop-types\";\r\nimport React from \"react\";\r\nimport Headroom from \"react-headroom\"\r\nimport NavLink from \"./nav-link\";\r\nimport { FaPollH, FaIdCard, FaLaptopCode, FaGamepad, FaFileAlt } from \"react-icons/fa\";\r\n\r\nconst Header = ({ siteTitle }) => (\r\n <header\r\n style={{\r\n background: `#333`,\r\n textAlign: `center`\r\n }}\r\n >\r\n <div\r\n style={{\r\n margin: `0 auto`,\r\n padding: `1.45rem 1.0875rem`,\r\n }}\r\n >\r\n <h1>\r\n <Link\r\n to=\"/\"\r\n style={{\r\n color: `white`,\r\n textDecoration: `none`\r\n }}\r\n >\r\n {siteTitle}\r\n </Link>\r\n </h1>\r\n <Headroom\r\n pinStart={90}\r\n style={{\r\n webkitTransition: 'all .5s ease-in-out',\r\n mozTransition: 'all .5s ease-in-out',\r\n oTransition: 'all .5s ease-in-out',\r\n transition: 'all .5s ease-in-out',\r\n background: `#333`,\r\n marginBottom: `1.45rem`,\r\n textAlign: `center`\r\n }}\r\n >\r\n <NavLink to=\"/about-me/\"><FaIdCard /> ABOUT ME</NavLink>\r\n <NavLink to=\"/blog/\"><FaPollH /> BLOG</NavLink>\r\n <NavLink to=\"/projects/\"><FaLaptopCode /> PROJECTS</NavLink>\r\n \t\t <NavLink to=\"/hobbies/\"><FaGamepad /> HOBBIES</NavLink>\r\n \t\t <NavLink to=\"/resume/\"><FaFileAlt /> RESUME</NavLink>\r\n </Headroom>\r\n </div>\r\n </header>\r\n)\r\n\r\nHeader.propTypes = {\r\n siteTitle: PropTypes.string,\r\n}\r\n\r\nHeader.defaultProps = {\r\n siteTitle: ``,\r\n}\r\n\r\nexport default Header\r\n","import React from 'react';\r\n\r\nconst linkStyles = {\r\n color: 'white',\r\n display: 'inline-block',\r\n margin: '0 0.5rem',\r\n padding: '0.25rem',\r\n textDecoration:'none',\r\n textAlign: `center`\r\n};\r\n\r\nconst SocialMediaLink = ({ children, href, title }) => (\r\n <a href={href} style={linkStyles} title={title} target=\"_blank\" rel=\"noopener noreferrer\">\r\n {children}\r\n </a>\r\n);\r\n\r\nexport default SocialMediaLink;","import React from \"react\";\r\nimport SocialMediaLink from \"./social-media-link\";\r\nimport { FaLinkedinIn, FaGithubAlt} from \"react-icons/fa\";\r\n\r\nconst Footer = ({ siteAuthor }) => (\r\n <footer\r\n style={{\r\n textAlign: `center`\r\n }}\r\n >\r\n <div\r\n style={{\r\n background: `#333`,\r\n marginTop: `1.45rem`,\r\n marginBottom: `1.45rem`,\r\n margin: `0 auto`,\r\n maxWidth: 2000,\r\n padding: `1.45rem 1.0875rem`,\r\n }}\r\n >\r\n <SocialMediaLink href=\"https://www.linkedin.com/in/rickytham\" title=\"LinkedIn\">\r\n\t <FaLinkedinIn size={28}/>\r\n </SocialMediaLink>\r\n <SocialMediaLink href=\"https://github.com/TheRamik/\" title=\"Github\">\r\n\t <FaGithubAlt size={28}/>\r\n </SocialMediaLink>\r\n </div>\r\n <div\r\n style={{\r\n marginTop: `1.45rem`,\r\n marginBottom: `1.45rem`,\r\n }}\r\n >\r\n Built with\r\n {` `}\r\n <a href=\"https://www.gatsbyjs.org\" \r\n title=\"GatsbyJS\" target=\"_blank\" rel=\"noopener noreferrer\">Gatsby</a>\r\n <p>Created by {siteAuthor} © {new Date().getFullYear()} </p>\r\n </div>\r\n </footer>\r\n)\r\n\r\nexport default Footer","/**\r\n * Layout component that queries for data\r\n * with Gatsby's StaticQuery component\r\n *\r\n * See: https://www.gatsbyjs.org/docs/static-query/\r\n */\r\n\r\nimport React from \"react\"\r\nimport PropTypes from \"prop-types\"\r\nimport { StaticQuery, graphql, Link } from \"gatsby\"\r\n\r\nimport Header from \"./header\"\r\nimport Footer from \"./footer\"\r\nimport \"./layout.css\"\r\nimport centerStyles from './center.module.scss'\r\n\r\n\r\nconst Layout = ({ children }) => (\r\n <StaticQuery\r\n query={graphql`\r\n query SiteTitleQuery {\r\n site {\r\n siteMetadata {\r\n title\r\n author\r\n }\r\n }\r\n }\r\n `}\r\n render={data => (\r\n <>\r\n <Header siteTitle={data.site.siteMetadata.title} />\r\n <div\r\n style={{\r\n margin: `0 auto`,\r\n maxWidth: 960,\r\n padding: `0px 1.0875rem 1.45rem`,\r\n paddingTop: '1.45rem',\r\n marginBottom: `1.45rem`,\r\n }}\r\n >\r\n <main>{children}</main>\r\n </div>\r\n <br/><br/>\r\n <div className={centerStyles.center}>\r\n <Link to=\"/\">Go back to the homepage</Link>\r\n </div>\r\n <br/><br/>\r\n <Footer siteAuthor={data.site.siteMetadata.author}/>\r\n </>\r\n )}\r\n />\r\n)\r\n\r\nLayout.propTypes = {\r\n children: PropTypes.node.isRequired,\r\n}\r\n\r\nexport default Layout\r\n","/**\r\n * SEO component that queries for data with\r\n * Gatsby's useStaticQuery React hook\r\n *\r\n * See: https://www.gatsbyjs.org/docs/use-static-query/\r\n */\r\n\r\nimport React from \"react\"\r\nimport PropTypes from \"prop-types\"\r\nimport Helmet from \"react-helmet\"\r\nimport { useStaticQuery, graphql } from \"gatsby\"\r\n\r\nfunction SEO({ description, lang, meta, keywords, title }) {\r\n const { site } = useStaticQuery(\r\n graphql`\r\n query {\r\n site {\r\n siteMetadata {\r\n title\r\n description\r\n author\r\n }\r\n }\r\n }\r\n `\r\n )\r\n\r\n const metaDescription = description || site.siteMetadata.description\r\n\r\n return (\r\n <Helmet\r\n htmlAttributes={{\r\n lang,\r\n }}\r\n title={title}\r\n titleTemplate={`%s | ${site.siteMetadata.title}`}\r\n meta={[\r\n {\r\n name: `description`,\r\n content: metaDescription,\r\n },\r\n {\r\n property: `og:title`,\r\n content: title,\r\n },\r\n {\r\n property: `og:description`,\r\n content: metaDescription,\r\n },\r\n {\r\n property: `og:type`,\r\n content: `website`,\r\n },\r\n {\r\n name: `twitter:card`,\r\n content: `summary`,\r\n },\r\n {\r\n name: `twitter:creator`,\r\n content: site.siteMetadata.author,\r\n },\r\n {\r\n name: `twitter:title`,\r\n content: title,\r\n },\r\n {\r\n name: `twitter:description`,\r\n content: metaDescription,\r\n },\r\n ]\r\n .concat(\r\n keywords.length > 0\r\n ? {\r\n name: `keywords`,\r\n content: keywords.join(`, `),\r\n }\r\n : []\r\n )\r\n .concat(meta)}\r\n />\r\n )\r\n}\r\n\r\nSEO.defaultProps = {\r\n lang: `en`,\r\n meta: [],\r\n keywords: [],\r\n description: ``,\r\n}\r\n\r\nSEO.propTypes = {\r\n description: PropTypes.string,\r\n lang: PropTypes.string,\r\n meta: PropTypes.arrayOf(PropTypes.object),\r\n keywords: PropTypes.arrayOf(PropTypes.string),\r\n title: PropTypes.string.isRequired,\r\n}\r\n\r\nexport default SEO\r\n"],"sourceRoot":""}