-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-pages-pensieve-tags-js-5a34e7bd8461bcd36d54.js.map
1 lines (1 loc) · 3.69 KB
/
component---src-pages-pensieve-tags-js-5a34e7bd8461bcd36d54.js.map
1
{"version":3,"sources":["webpack:///./src/pages/pensieve/tags.js"],"names":["colors","theme","fontSizes","fonts","StyledTagsContainer","styled","Main","lightSlate","xxl","mixins","inlineLink","slate","SFMono","md","TagsPage","data","group","allMarkdownRemark","title","site","siteMetadata","location","className","to","map","tag","key","fieldValue","kebabCase","totalCount","pageQuery"],"mappings":"6FAAA,2JAQQA,EAA6BC,IAA7BD,OAAQE,EAAqBD,IAArBC,UAAWC,EAAUF,IAAVE,MAErBC,EAAsBC,YAAOC,KAAV,gFAAGD,CAAH,8IAOZL,EAAOO,WAEDL,EAAUM,IAGnBC,IAAOC,WACAV,EAAOO,WAELP,EAAOW,MACDR,EAAMS,OACRV,EAAUW,IA0DlBC,UAnDE,SAAC,GAAD,QACfC,KACuBC,EAFR,EAEbC,kBAAqBD,MAEHE,EAJL,EAGbC,KACEC,aAAgBF,MAGpBG,EAPe,EAOfA,SAPe,OASf,kBAAC,IAAD,CAAQA,SAAUA,GAChB,kBAAC,SAAD,CAAQH,MAAOA,IAEf,kBAACd,EAAD,KACE,0BAAMkB,UAAU,cACd,0BAAMA,UAAU,SAAhB,KACA,kBAAC,OAAD,CAAMC,GAAG,aAAT,iBAGF,oCACA,wBAAID,UAAU,cACXN,EAAMQ,KAAI,SAAAC,GAAG,OACZ,wBAAIC,IAAKD,EAAIE,YACX,kBAAC,OAAD,CAAMJ,GAAE,kBAAoBK,IAAUH,EAAIE,YAAlC,KACLF,EAAIE,WADP,IACmB,0BAAML,UAAU,SAAhB,IAA0BG,EAAII,WAA9B,cA8BxB,IAAMC,EAAS","file":"component---src-pages-pensieve-tags-js-5a34e7bd8461bcd36d54.js","sourcesContent":["import React from 'react';\r\nimport { Helmet } from 'react-helmet';\r\nimport { Link, graphql } from 'gatsby';\r\nimport kebabCase from 'lodash/kebabCase';\r\nimport PropTypes from 'prop-types';\r\nimport { Layout } from '@components';\r\nimport styled from 'styled-components';\r\nimport { theme, mixins, Main } from '@styles';\r\nconst { colors, fontSizes, fonts } = theme;\r\n\r\nconst StyledTagsContainer = styled(Main)`\r\n max-width: 1000px;\r\n\r\n h1 {\r\n margin-bottom: 50px;\r\n }\r\n ul {\r\n color: ${colors.lightSlate};\r\n li {\r\n font-size: ${fontSizes.xxl};\r\n\r\n a {\r\n ${mixins.inlineLink};\r\n color: ${colors.lightSlate};\r\n .count {\r\n color: ${colors.slate};\r\n font-family: ${fonts.SFMono};\r\n font-size: ${fontSizes.md};\r\n }\r\n }\r\n }\r\n }\r\n`;\r\n\r\nconst TagsPage = ({\r\n data: {\r\n allMarkdownRemark: { group },\r\n site: {\r\n siteMetadata: { title },\r\n },\r\n },\r\n location,\r\n}) => (\r\n <Layout location={location}>\r\n <Helmet title={title} />\r\n\r\n <StyledTagsContainer>\r\n <span className=\"breadcrumb\">\r\n <span className=\"arrow\">←</span>\r\n <Link to=\"/pensieve\">All memories</Link>\r\n </span>\r\n\r\n <h1>Tags</h1>\r\n <ul className=\"fancy-list\">\r\n {group.map(tag => (\r\n <li key={tag.fieldValue}>\r\n <Link to={`/pensieve/tags/${kebabCase(tag.fieldValue)}/`}>\r\n {tag.fieldValue} <span className=\"count\">({tag.totalCount})</span>\r\n </Link>\r\n </li>\r\n ))}\r\n </ul>\r\n </StyledTagsContainer>\r\n </Layout>\r\n);\r\n\r\nTagsPage.propTypes = {\r\n data: PropTypes.shape({\r\n allMarkdownRemark: PropTypes.shape({\r\n group: PropTypes.arrayOf(\r\n PropTypes.shape({\r\n fieldValue: PropTypes.string.isRequired,\r\n totalCount: PropTypes.number.isRequired,\r\n }).isRequired,\r\n ),\r\n }),\r\n site: PropTypes.shape({\r\n siteMetadata: PropTypes.shape({\r\n title: PropTypes.string.isRequired,\r\n }),\r\n }),\r\n }),\r\n location: PropTypes.object,\r\n};\r\n\r\nexport default TagsPage;\r\n\r\nexport const pageQuery = graphql`\r\n query {\r\n site {\r\n siteMetadata {\r\n title\r\n }\r\n }\r\n allMarkdownRemark(limit: 2000, filter: { frontmatter: { draft: { ne: true } } }) {\r\n group(field: frontmatter___tags) {\r\n fieldValue\r\n totalCount\r\n }\r\n }\r\n }\r\n`;\r\n"],"sourceRoot":""}