-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomponent---src-templates-tags-index-jsx-5a348e02c4681fadb344.js.map
1 lines (1 loc) · 5.46 KB
/
component---src-templates-tags-index-jsx-5a348e02c4681fadb344.js.map
1
{"version":3,"sources":["webpack:///./src/templates/tags/index.jsx","webpack:///./src/templates/tags/tags.module.less"],"names":["TagPage","data","tag","pageContext","tagName","Config","tags","name","Utils","capitalize","tagPagePath","pages","tagImage","allFile","edges","find","edge","node","childImageSharp","fluid","posts","allMarkdownRemark","className","title","description","path","resolvePageUrl","keywords","style","tagsList","bannerImgContainer","bannerImg","alt","gutter","map","post","key","xs","sm","md","lg","module","exports"],"mappings":"wUAgIeA,UA9GC,SAAC,GAA2B,IAAzBC,EAAwB,EAAxBA,KACTC,EADiC,EAAlBC,YACfD,IACFE,EAAUC,IAAOC,KAAKJ,GAAKK,MAAQC,IAAMC,WAAWP,GACpDQ,EAAcL,IAAOM,MAAMT,IAC3BU,EAAWX,EAAKY,QAAQC,MAAMC,MAAK,SAACC,GAAD,OAAUA,EAAKC,KAAKV,OAASL,KAAKe,KACxEC,gBAAgBC,MACbC,EAAQnB,EAAKoB,kBAAkBP,MACrC,OACE,uBAAQQ,UAAU,gBAChB,uBAAQA,UAAU,aAChB,kBAAC,IAAD,MACA,kBAAC,IAAD,CACEC,MAAOnB,EACPoB,YAAW,kBAAoBpB,EAApB,KAAgCC,IAAOC,KAAKJ,GAAKsB,YAAjD,IACXC,KAAMjB,IAAMkB,eAAehB,EAAaR,GACxCyB,SAAU,CAACvB,KAEb,kBAAC,IAAD,KACE,yBAAKkB,UAAS,kBAAoBM,IAAMC,UACtC,gCAEGzB,GAEH,yBAAKkB,UAAWM,IAAME,oBACpB,kBAAC,IAAD,CAAKR,UAAWM,IAAMG,UAAWZ,MAAOP,EAAUoB,IAAK5B,KAEzD,wBAAIkB,UAAU,cACXjB,IAAOC,KAAKJ,GAAKsB,cAGtB,uBAAKS,OAAQ,CAAC,GAAI,KACfb,EAAMc,KAAI,SAACC,EAAMC,GAAP,OAET,uBAAKA,IAAKA,EAAKC,GAAI,GAAIC,GAAI,GAAIC,GAAI,GAAIC,GAAI,GACzC,kBAAC,IAAD,CAAUvC,KAAMkC,c,qBCnDhCM,EAAOC,QAAU,CAAC,SAAW,+BAA+B,mBAAqB,yCAAyC,UAAY","file":"component---src-templates-tags-index-jsx-5a348e02c4681fadb344.js","sourcesContent":["/* eslint-disable react/forbid-prop-types */\n/* Vendor imports */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { graphql } from 'gatsby';\nimport Img from 'gatsby-image';\nimport {\n Layout, Row, Col,\n} from 'antd';\n/* App imports */\nimport SEO from '../../components/Seo';\nimport Header from '../../components/PageLayout/Header';\nimport PostCard from '../../components/PostCard';\nimport SidebarWrapper from '../../components/PageLayout/Sidebar';\nimport Config from '../../../config';\nimport Utils from '../../utils/pageUtils';\nimport style from './tags.module.less';\n\nconst TagPage = ({ data, pageContext }) => {\n const { tag } = pageContext;\n const tagName = Config.tags[tag].name || Utils.capitalize(tag);\n const tagPagePath = Config.pages.tag;\n const tagImage = data.allFile.edges.find((edge) => edge.node.name === tag).node\n .childImageSharp.fluid;\n const posts = data.allMarkdownRemark.edges;\n return (\n <Layout className=\"outerPadding\">\n <Layout className=\"container\">\n <Header />\n <SEO\n title={tagName}\n description={`All post about ${tagName}. ${Config.tags[tag].description} `}\n path={Utils.resolvePageUrl(tagPagePath, tag)}\n keywords={[tagName]}\n />\n <SidebarWrapper>\n <div className={`marginTopTitle ${style.tagsList}`}>\n <h1>\n #\n {tagName}\n </h1>\n <div className={style.bannerImgContainer}>\n <Img className={style.bannerImg} fluid={tagImage} alt={tagName} />\n </div>\n <h4 className=\"textCenter\">\n {Config.tags[tag].description}\n </h4>\n </div>\n <Row gutter={[20, 20]}>\n {posts.map((post, key) => (\n // eslint-disable-next-line react/no-array-index-key\n <Col key={key} xs={24} sm={24} md={12} lg={8}>\n <PostCard data={post} />\n </Col>\n ))}\n </Row>\n </SidebarWrapper>\n </Layout>\n </Layout>\n );\n};\n\nTagPage.propTypes = {\n data: PropTypes.shape({\n allMarkdownRemark: PropTypes.shape({\n edges: PropTypes.arrayOf(PropTypes.object).isRequired,\n }).isRequired,\n allFile: PropTypes.shape({\n edges: PropTypes.arrayOf(\n PropTypes.shape({\n node: PropTypes.shape({\n name: PropTypes.string.isRequired,\n childImageSharp: PropTypes.shape({\n fluid: PropTypes.object.isRequired,\n }).isRequired,\n }).isRequired,\n }),\n ).isRequired,\n }).isRequired,\n }).isRequired,\n pageContext: PropTypes.shape({\n tag: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nexport const pageQuery = graphql`\n query($tag: String!) {\n allMarkdownRemark(\n filter: {\n frontmatter: { tags: { in: [$tag] } }\n fileAbsolutePath: { regex: \"/index.md$/\" }\n }\n sort: { fields: [frontmatter___date], order: DESC }\n ) {\n edges {\n node {\n frontmatter {\n title\n date(formatString: \"MMMM DD, YYYY\")\n path\n tags\n excerpt\n cover {\n childImageSharp {\n fluid(maxWidth: 600) {\n ...GatsbyImageSharpFluid_tracedSVG\n }\n }\n }\n }\n }\n }\n }\n allFile(filter: { name: { eq: $tag }, dir: { regex: \"/tags$/\" } }) {\n edges {\n node {\n name\n childImageSharp {\n fluid(maxHeight: 600) {\n ...GatsbyImageSharpFluid_tracedSVG\n }\n }\n }\n }\n }\n }\n`;\n\nexport default TagPage;\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"tagsList\":\"tags-module--tagsList--39vLn\",\"bannerImgContainer\":\"tags-module--bannerImgContainer--24LjU\",\"bannerImg\":\"tags-module--bannerImg--xzH6c\"};"],"sourceRoot":""}