-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-pages-index-js-925d55dac8fe78d3012e.js.map
1 lines (1 loc) · 6.12 KB
/
component---src-pages-index-js-925d55dac8fe78d3012e.js.map
1
{"version":3,"sources":["webpack:///./src/utils/helpers.js","webpack:///./src/pages/index.js","webpack:///./src/components/PostFrontmatter.js","webpack:///./src/components/PostListTitle.js"],"names":["formatReadingTime","minutes","cups","Math","round","Array","E","fill","join","BlogIndex","data","location","siteTitle","site","siteMetadata","title","posts","allMarkdownRemark","edges","map","node","frontmatter","fields","slug","key","style","marginBottom","rhythm","boxShadow","to","itemProp","date","timeToRead","category","dangerouslySetInnerHTML","__html","description","excerpt","pageQuery","CategoryLink","styled","Link","PostFrontmatter","isInPost","Container","children","scale","display","PostListTitle","textTransform","borderBottom"],"mappings":"2FAAO,SAASA,EAAkBC,GAChC,IAAIC,EAAOC,KAAKC,MAAMH,EAAU,GAChC,OAAIC,EAAO,EACC,IAAIG,MAAMF,KAAKC,MAAMF,EAAOC,KAAKG,IACxCC,KAAK,MACLC,KAAK,IAFR,IAEeP,EAFf,YAIU,IAAII,MAAMH,GAAQ,GAAGK,KAAK,MAAMC,KAAK,IAA/C,IAAsDP,EAAtD,YAPJ,mC,kCCAA,kJAoDeQ,UA3CG,SAAC,GAAwB,IAAtBC,EAAqB,EAArBA,KAAMC,EAAe,EAAfA,SACnBC,EAAYF,EAAKG,KAAKC,aAAaC,MACnCC,EAAQN,EAAKO,kBAAkBC,MAErC,OACE,kBAAC,IAAD,CAAQP,SAAUA,EAAUI,MAAOH,GACjC,kBAAC,IAAD,CAAKG,MAAM,cACX,kBAAC,IAAD,CAAeA,MAAM,cACpBC,EAAMG,KAAI,YAAe,IAAZC,EAAW,EAAXA,KACNL,EAAQK,EAAKC,YAAYN,OAASK,EAAKE,OAAOC,KACpD,OACE,6BAASC,IAAKJ,EAAKE,OAAOC,MACxB,gCACE,wBAAIE,MAAO,CAAEC,aAAcC,YAAO,EAAI,KACpC,kBAAC,OAAD,CACEF,MAAO,CAAEG,UAAU,QACnBC,GAAIT,EAAKE,OAAOC,KAChBO,SAAS,OAET,0BAAMA,SAAS,YAAYf,KAG/B,kBAAC,IAAD,CACEgB,KAAMX,EAAKC,YAAYU,KACvBC,WAAYZ,EAAKY,WACjBC,SAAUb,EAAKC,YAAYY,YAG/B,iCACE,uBACEC,wBAAyB,CACvBC,OAAQf,EAAKC,YAAYe,aAAehB,EAAKiB,SAE/CP,SAAS,uBAYlB,IAAMQ,EAAS,c,kCCtDtB,yEAOMC,EAAeC,YAAOC,QAAV,oFAAGD,CAAH,2IAkDHE,IAhCS,SAAC,GAA8C,IAA5CX,EAA2C,EAA3CA,KAAMC,EAAqC,EAArCA,WAAYC,EAAyB,EAAzBA,SAAUU,EAAe,EAAfA,SAC/CC,EAAY,SAAC,GAAD,IAAGC,EAAH,EAAGA,SAAH,OAAkBF,EAGhC,uBACElB,MAAK,iBACAqB,aAAM,IADN,CAEHC,QAAQ,QACRrB,aAAcC,YAAO,MAJzB,IAMGkB,GAIH,+BAAQA,IAGZ,OACE,kBAACD,EAAD,KACGb,EACAC,GAAU,MAAUhC,YAAkBgC,GAErCC,GACA,kBAACM,EAAD,CAAcV,GAAE,IAAMI,GACpB,6BACCA,M,kCClDX,yBAaee,IAXO,SAAC,GAAe,IAAbjC,EAAY,EAAZA,MACvB,OACE,wBAAIU,MAAO,CACTwB,cAAc,YACdC,aAAa,MAEZnC","file":"component---src-pages-index-js-925d55dac8fe78d3012e.js","sourcesContent":["export function formatReadingTime(minutes) {\n let cups = Math.round(minutes / 5);\n if (cups > 5) {\n return `${new Array(Math.round(cups / Math.E))\n .fill('🍱')\n .join('')} ${minutes} min read`;\n } else {\n return `${new Array(cups || 1).fill('☕️').join('')} ${minutes} min read`;\n }\n}","import React from \"react\"\nimport { Link, graphql } from \"gatsby\"\n\nimport Layout from \"../components/Layout\"\nimport SEO from \"../components/Seo\"\nimport PostListTitle from \"../components/PostListTitle\"\nimport PostFrontmatter from \"../components/PostFrontmatter\"\nimport { rhythm } from \"../utils/typography\"\n\nconst BlogIndex = ({ data, location }) => {\n const siteTitle = data.site.siteMetadata.title\n const posts = data.allMarkdownRemark.edges\n\n return (\n <Layout location={location} title={siteTitle}>\n <SEO title=\"All posts\" />\n <PostListTitle title=\"All Posts\" />\n {posts.map(({ node }) => {\n const title = node.frontmatter.title || node.fields.slug\n return (\n <article key={node.fields.slug}>\n <header>\n <h3 style={{ marginBottom: rhythm(1 / 4) }}>\n <Link\n style={{ boxShadow: `none` }}\n to={node.fields.slug}\n itemProp=\"url\"\n >\n <span itemProp=\"headline\">{title}</span>\n </Link>\n </h3>\n <PostFrontmatter\n date={node.frontmatter.date}\n timeToRead={node.timeToRead}\n category={node.frontmatter.category}\n />\n </header>\n <section>\n <p\n dangerouslySetInnerHTML={{\n __html: node.frontmatter.description || node.excerpt,\n }}\n itemProp=\"description\"\n />\n </section>\n </article>\n )\n })}\n </Layout>\n )\n}\n\nexport default BlogIndex\n\nexport const pageQuery = graphql`\nquery {\n site {\n siteMetadata {\n title\n }\n }\n allMarkdownRemark(\n sort: { fields: [frontmatter___date], order: DESC }\n filter: {frontmatter: {category: {regex: \"/^(?!algorithm|report)/\" }}}\n ) {\n edges {\n node {\n excerpt\n fields {\n slug\n }\n timeToRead\n frontmatter {\n date(formatString: \"MMMM DD, YYYY\")\n title\n description\n category\n }\n }\n }\n }\n }\n`\n","import React from \"react\"\nimport { Link } from \"gatsby\"\nimport styled from \"styled-components\"\nimport { rhythm, scale } from \"../utils/typography\"\n\nimport { formatReadingTime } from \"../utils/helpers\"\n\nconst CategoryLink = styled(Link)`\n opacity: 0.75;\n ::before {\n content: \" • \";\n }\n br {\n display: none;\n }\n @media screen and (max-width: 768px) {\n ::before {\n display: none;\n }\n br {\n display: inline;\n }\n }\n`\n\nconst PostFrontmatter = ({ date, timeToRead, category, isInPost }) => {\n const Container = ({ children }) => isInPost\n ?\n (\n <p\n style={{\n ...scale(-1 / 5),\n display: `block`,\n marginBottom: rhythm(1),\n }}\n > {children}</p>\n )\n :\n (\n <small>{children}</small>\n )\n\n return (\n <Container>\n {date}\n {timeToRead && ` • ${formatReadingTime(timeToRead)}`}\n {\n category &&\n <CategoryLink to={`/${category}`}>\n <br />\n {category}\n </CategoryLink>\n }\n </Container>\n )\n}\n\nexport default PostFrontmatter","import React from \"react\";\n\nconst PostListTitle = ({ title }) => {\n return (\n <h2 style={{\n textTransform: `uppercase`,\n borderBottom: `0`,\n }}>\n {title}\n </h2>\n )\n}\n\nexport default PostListTitle\n"],"sourceRoot":""}