-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathcomponent---src-templates-blog-posts-tsx-784bafd240d54c2faa26.js.map
1 lines (1 loc) · 9.22 KB
/
component---src-templates-blog-posts-tsx-784bafd240d54c2faa26.js.map
1
{"version":3,"sources":["webpack:///./src/templates/BlogPosts.tsx"],"names":["BlogPostsPage","props","pathContext","group","index","pageCount","previousUrl","toString","nextUrl","site","location","title","siteMetadata","description","gutter","className","xs","sm","md","lg","xl","xxl","id","map","node","fluid","featured_media","localFile","childImageSharp","categories","length","filter","category","name","Array","tags","key","slug","to","decodeHtmlCharCodes","categoryIndex","type","capitalizeFirstLetter","tag","tagIndex","author","modified","date","src","alt","dangerouslySetInnerHTML","__html","excerpt","allInstaNode","orientation","align"],"mappings":"0aA4BaA,G,UAAgB,SAACC,GAAiB,MACVA,EAAMC,YAAlCC,EADsC,EACtCA,MAAOC,EAD+B,EAC/BA,MAAOC,EADwB,EACxBA,UAChBC,EAAcF,EAAQ,GAAM,EAAI,IAAMA,EAAQ,GAAGG,WACjDC,GAAWJ,EAAQ,GAAGG,WACpBE,EAJsC,OAItCA,KAUR,OACC,kBAAC,IAAD,CAAQC,SAAUT,EAAMS,UACvB,kBAAC,IAAD,CAAKC,MAAUF,EAAKG,aAAaD,MAAvB,MAAkCF,EAAKG,aAAaC,YAAeA,YAAaJ,EAAKG,aAAaC,cAC5G,uBAAKC,OAAQ,GAAIC,UAAU,SAC1B,uBAAKC,GAAI,GAAIC,GAAI,GAAIC,GAAI,GAAIC,GAAI,GAAIC,GAAI,GAAIC,IAAK,GAAIC,GAAG,UAAUP,UAAU,6BAC3EZ,EAAMoB,KAAI,YAA8B,IAA3BC,EAA2B,EAA3BA,KACPC,EAA6BD,EAAKE,gBAAkBF,EAAKE,eAAeC,WAAaH,EAAKE,eAAeC,UAAUC,iBAAmBJ,EAAKE,eAAeC,UAAUC,gBAAgBH,MAASD,EAAKE,eAAeC,UAAUC,gBAAgBH,MAAQ,KACnPI,GAAiCL,EA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AEC,OAAQZ,YAAoBf,EAAK4B,YAC1F,yBAAKrC,UAAU,uBACd,kBAAC,OAAD,CAAMuB,GAAE,SAAWd,EAAKa,KAAQ1B,MAAOa,EAAKa,MAC3C,uBAAQI,KAAK,UAAU1B,UAAU,aAAjC,mBAML,yBAAKA,UAAU,oBACbX,EAAQ,GACR,yBAAKW,UAAU,iBACd,kBAAC,OAAD,CAAMuB,GAAE,UAAYhC,EAAeK,MAAK,UAAYL,GACnD,uBAAQmC,KAAK,WAAb,yBAIFrC,GAAUC,EAAY,GACtB,yBAAKU,UAAU,aACd,kBAAC,OAAD,CAAMuB,GAAE,UAAY9B,EAAWG,MAAK,UAAYH,GAC/C,uBAAQiC,KAAK,WAAb,uBAML,uBAAKzB,GAAI,EAAGC,GAAI,EAAGC,GAAI,EAAGC,GAAI,EAAGC,GAAI,EAAGC,IAAK,EAAGC,GAAG,YAAYP,UAAU,WACxE,kBAAC,IAAD,CAASJ,MAAO,wBAAII,UAAU,sBAAd,aAChB,kBAAC,IAAD,CAAUJ,MACT,wBAAII,UAAU,sCAAd,cAED,kBAAC,IAAD,CAAWsC,aAAcpD,EAAMC,YAAYmD,aAAcC,YAAY,WAAW3C,MAC/E,wBAAII,UAAU,sCAAd,iBAIH,uBAAK0B,KAAK,OAAOc,MAAM,SAASzC,OAAQ,IACvC,uBAAKE,GAAI,GAAIC,GAAI,GAAIC,GAAI,GAAIC,GAAI,EAAGC,GAAI,EAAGC,IAAK,EAAGN,UAAU,mDAC5D,kBAAC,IAAD,CAAWsC,aAAcpD,EAAMC,YAAYmD,aAAcC,YAAY,oBAO3DtD,a","file":"component---src-templates-blog-posts-tsx-784bafd240d54c2faa26.js","sourcesContent":["import React from 'react';\nimport { Link, useStaticQuery, graphql } from 'gatsby';\nimport Image, { FluidObject } from 'gatsby-image';\n\nimport { Button, Tag, Row, Col, Icon } from 'antd';\n\nimport Layout from '../components/Layout';\nimport SEO from '../components/SEO';\n\nimport Instagram from '../components/Instagram';\nimport Twitter from '../components/Twitter';\nimport Facebook from '../components/Facebook';\n\nimport { Post, CategoryTagInfo, InstagramFeed } from '../contracts/post';\nimport { decodeHtmlCharCodes, capitalizeFirstLetter } from '../utils';\n\nimport '../styles/blog.scss';\n\nexport interface Props {\n\tpathContext: {\n\t\tgroup: { node: Post }[];\n\t\tindex: number;\n\t\tpageCount: number;\n\t\tallInstaNode: InstagramFeed;\n\t};\n\tlocation: Location;\n}\n\nexport const BlogPostsPage = (props: Props) => {\n\tconst { group, index, pageCount } = props.pathContext;\n\tconst previousUrl = index - 1 === 1 ? '' : (index - 1).toString();\n\tconst nextUrl = (index + 1).toString();\n\tconst { site } = useStaticQuery(graphql`\n query {\n site {\n siteMetadata {\n title\n description\n }\n }\n }\n\t`);\n\treturn (\n\t\t<Layout location={props.location}>\n\t\t\t<SEO title={`${site.siteMetadata.title} | ${site.siteMetadata.description}`} description={site.siteMetadata.description} />\n\t\t\t<Row gutter={36} className=\"posts\">\n\t\t\t\t<Col xs={24} sm={24} md={24} lg={16} xl={18} xxl={18} id=\"primary\" className=\"content-area with-sidebar\">\n\t\t\t\t\t{group.map(({ node }: { node: Post }) => {\n\t\t\t\t\t\tconst fluid: FluidObject | null = (node.featured_media && node.featured_media.localFile && node.featured_media.localFile.childImageSharp && node.featured_media.localFile.childImageSharp.fluid) ? node.featured_media.localFile.childImageSharp.fluid : null;\n\t\t\t\t\t\tconst categories: CategoryTagInfo[] = (node.categories && node.categories.length) > 0 ? node.categories.filter((category) => category.name !== 'Uncategorized') : new Array<CategoryTagInfo>();\n\t\t\t\t\t\tconst tags: CategoryTagInfo[] = (node.tags && node.tags.length) > 0 ? node.tags : new Array<CategoryTagInfo>();\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<article className=\"post\" key={node.slug}>\n\t\t\t\t\t\t\t\t<Link to={`/post/${node.slug}`} title={node.slug}>\n\t\t\t\t\t\t\t\t\t<h1 className=\"black-color\">{decodeHtmlCharCodes(node.title)}</h1>\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t<div className=\"categories-container tags-container post-meta-container margin-bottom-24px\">\n\t\t\t\t\t\t\t\t\t{categories && categories.length > 0 && categories.map((category, categoryIndex) => {\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<Tag key={categoryIndex}>\n\t\t\t\t\t\t\t\t\t\t\t\t<Link to={`/category/${category.slug}`} title={category.name}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Icon type=\"folder\" />{capitalizeFirstLetter(category.name)}\n\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t</Tag>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t{tags && tags.length > 0 && tags.map((tag, tagIndex) => {\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<Tag key={tagIndex}>\n\t\t\t\t\t\t\t\t\t\t\t\t<Link to={`/tag/${tag.slug}`} title={tag.name}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Icon type=\"tag\" />{capitalizeFirstLetter(tag.name)}\n\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t</Tag>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t<span className=\"post-meta margin-left-2px\">\n\t\t\t\t\t\t\t\t\t\t<span className=\"author\">{capitalizeFirstLetter(node.author.name)}</span>\n\t\t\t\t\t\t\t\t\t\t<span className=\"separator\"></span>\n\t\t\t\t\t\t\t\t\t\t<span className=\"date\">{(node.modified && node.modified.length > 0) ? node.modified : node.date}</span>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{(fluid && fluid.src && fluid.src.length > 0) && (\n\t\t\t\t\t\t\t\t\t<Link to={`/post/${node.slug}`} title={node.slug}>\n\t\t\t\t\t\t\t\t\t\t<Image fluid={fluid} alt={node.title} title={node.title} />\n\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t<div className=\"post-excerpt\" dangerouslySetInnerHTML={{ __html: decodeHtmlCharCodes(node.excerpt) }} />\n\t\t\t\t\t\t\t\t<div className=\"read-more-container\">\n\t\t\t\t\t\t\t\t\t<Link to={`/post/${node.slug}`} title={node.slug}>\n\t\t\t\t\t\t\t\t\t\t<Button type=\"default\" className=\"read-more\">Read more</Button>\n\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</article>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t\t<div className=\"navigation-links\">\n\t\t\t\t\t\t{index > 1 && (\n\t\t\t\t\t\t\t<div className=\"previous-link\">\n\t\t\t\t\t\t\t\t<Link to={`/posts/${previousUrl}`} title={`/posts/${previousUrl}`}>\n\t\t\t\t\t\t\t\t\t<Button type=\"primary\">Go to Previous Page</Button>\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{index <= (pageCount - 1) && (\n\t\t\t\t\t\t\t<div className=\"next-link\">\n\t\t\t\t\t\t\t\t<Link to={`/posts/${nextUrl}`} title={`/posts/${nextUrl}`}>\n\t\t\t\t\t\t\t\t\t<Button type=\"primary\">Go to Next Page</Button>\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</Col>\n\t\t\t\t<Col xs={0} sm={0} md={0} lg={8} xl={6} xxl={6} id=\"secondary\" className=\"sidebar\">\n\t\t\t\t\t<Twitter title={<h3 className=\"margin-bottom-36px\">Twitter</h3>} />\n\t\t\t\t\t<Facebook title={\n\t\t\t\t\t\t<h3 className=\"margin-top-36px margin-bottom-36px\">Facebook</h3>\n\t\t\t\t\t} />\n\t\t\t\t\t<Instagram allInstaNode={props.pathContext.allInstaNode} orientation=\"vertical\" title={\n\t\t\t\t\t\t<h3 className=\"margin-top-36px margin-bottom-36px\">Instagram</h3>\n\t\t\t\t\t} />\n\t\t\t\t</Col>\n\t\t\t</Row>\n\t\t\t<Row type=\"flex\" align=\"middle\" gutter={36}>\n\t\t\t\t<Col xs={24} sm={24} md={24} lg={0} xl={0} xxl={0} className=\"align-center margin-top-36px margin-bottom-36px\">\n\t\t\t\t\t<Instagram allInstaNode={props.pathContext.allInstaNode} orientation=\"horizontal\" />\n\t\t\t\t</Col>\n\t\t\t</Row>\n\t\t</Layout>\n\t);\n};\n\nexport default BlogPostsPage;\n"],"sourceRoot":""}