{"version":3,"sources":["webpack:///./src/components/blog-container/container.tsx","webpack:///./src/pages/blog.tsx"],"names":["useStyles","makeStyles","theme","createStyles","root","padding","spacing","backgroundColor","palette","background","paper","grid","margin","props","children","title","cards","Card","Card3","classes","Paper","elevation","square","className","Typography","variant","Divider","Grid","container","justify","alignItems","map","card","item","key","xs","sm","md","height","kebabCase","v","toLowerCase","replace","list","data","allMarkdownRemark","edges","e","node","p","filter","l","fields","type","forEach","frontmatter","category","push","thumbnail","description","link","author","config","showDescription","showBottom","showAuthor","timeToRead","Object","keys","product","getCards","categories","slug","getCategories","rel","href","path","SEO","pageTitle","postPath"],"mappings":"iRAUMA,EAAYC,aAAW,SAACC,GAAD,OAC3BC,YAAa,CACXC,KAAM,CACFC,QAASH,EAAMI,QAAQ,EAAG,EAAG,EAAG,GAChCC,gBAAiBL,EAAMM,QAAQC,WAAWC,OAE9CC,KAAM,CACFC,OAAQV,EAAMI,QAAQ,EAAG,EAAG,EAAG,SAKxB,WAACO,GACqCA,EAAzCC,SADmB,IACTC,EAA+BF,EAA/BE,MAAOC,EAAwBH,EAAxBG,MADE,EACsBH,EAAjBI,YADL,MACYC,IADZ,EAErBC,EAAUnB,EAAUa,GAC1B,OACI,gBAACO,EAAA,EAAD,CAAOC,UAAW,EAAIC,QAAQ,EAAMC,UAAWJ,EAAQf,MACnD,gBAACoB,EAAA,EAAD,CAAYC,QAAQ,aACfV,GAEL,gBAACW,EAAA,EAAD,MACA,gBAACC,EAAA,EAAD,CAAMC,WAAS,GACX,gBAACD,EAAA,EAAD,CAAMJ,UAAWJ,EAAQR,KAAMiB,WAAS,EAACtB,QAAS,EAAGuB,QAAQ,aAAaC,WAAW,YAChFd,EAAMe,KAAI,SAACC,GAAD,OACP,gBAACL,EAAA,EAAD,CAAMM,MAAI,EAACC,IAAKF,EAAKjB,MAAOoB,GAAI,GAAIC,GAAI,EAAGC,GAAI,GAC3C,gBAACpB,EAAD,eAAMqB,OAAQ,KAASN,Y,6CC1B7CO,EAA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,OAGdI,OAAOC,KAAKnB,GAAGlB,KAAI,SAACsC,GAAD,MAAc,CAACtD,MAAOsD,EAAST,KAAM,WAAWrB,EAAU8B,GAAYvD,SAAUmC,EAAEoB,OAOzFI,CAAc9B,GAC3B5B,EAAQ,UAAU+C,YACxB,OACE,gCACE,gBAAC,IAAD,CAAYS,WAAYA,GACpB,gBAAC,IAAD,KACE,6BAAQxD,GACR,wBAAM2D,IAAI,YAAYC,KAAI,GAAKb,UAAiBjD,EAAM+D,QAExD,gBAACC,EAAA,EAAD,CAAMC,UAAW/D,EAAOgE,SAAUlE,EAAM+D,OAC1C,2BAAK,2BACF5D,EAAMe,KAAI,SAACC,GAAD,OAAW,gBAAC,EAAD,eAAeE,IAAKF,EAAKjB,MAAOE,KAAMA,KAAUe","file":"component---src-pages-blog-tsx-5817b3b47a46b4dc6efe.js","sourcesContent":["import * as React from 'react';\nimport { Theme, createStyles, makeStyles } from '@material-ui/core/styles';\nimport Paper from '@material-ui/core/Paper';\nimport Typography from '@material-ui/core/Typography';\nimport Divider from '@material-ui/core/Divider';\nimport Grid from '@material-ui/core/Grid';\nimport Card1 from '../cards/card1';\nimport Card2 from '../cards/card2';\nimport Card3 from '../cards/card3';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n padding: theme.spacing(3, 0, 3, 0),\n backgroundColor: theme.palette.background.paper,\n },\n grid: {\n margin: theme.spacing(2, 0, 2, 0),\n }\n }),\n);\n\nexport default (props: any) => {\n const { children, title, cards, Card = Card3 } = props;\n const classes = useStyles(props);\n return (\n \n \n {title}\n \n \n \n \n {cards.map((card) => (\n \n \n \n ))}\n \n \n \n )\n}","import * as React from \"react\"\nimport { graphql } from \"gatsby\"\nimport HomeLayout from '../components/layouts/home-layout';\nimport BlogContainer from '../components/blog-container/container';\nimport Card from '../components/cards/card3';\nimport * as config from '../../config/SiteConfig.js';\nimport Helmet from \"react-helmet\";\nimport SEO from \"../components/SEO\";\n\nconst kebabCase = (v) => v.toLowerCase().replace(/[^a-zA-Z0-9 -]/g, '').replace(/\\s+/g, '-')\n\nfunction getCards(list) {\n const p = {};\n list.filter(l => l.fields.type === 'blog').forEach((item) => {\n if(!p[item.frontmatter.category]) {\n p[item.frontmatter.category] = [];\n }\n\n p[item.frontmatter.category].push({\n title: item.frontmatter.title,\n thumbnail: item.frontmatter.thumbnail,\n description: item.frontmatter.description,\n link: `/blog/${kebabCase(item.frontmatter.title)}`,\n author: item.frontmatter.author || config.postDefaultAuthor,\n showDescription: true,\n showBottom: true,\n showAuthor: true,\n timeToRead: item.timeToRead,\n });\n })\n return Object.keys(p).map((product) => ({title: product, cards: p[product]}));\n}\n\nfunction getCategories(list) {\n const p = {};\n list.forEach((item) => {\n if(!p[item.frontmatter.category]) {\n p[item.frontmatter.category] = [];\n }\n const link = `${item.fields.type !== 'page' ? `/${item.fields.type}` : ''}${item.fields.slug}`;\n p[item.frontmatter.category].push({\n title: item.frontmatter.title,\n thumbnail: item.frontmatter.thumbnail,\n description: item.frontmatter.description,\n link: link,\n showDescription: true\n });\n })\n return Object.keys(p).map((product) => ({title: product, link: `/tagged/${kebabCase(product)}`, children: p[product]}))\n}\n\nexport default (props) => {\n const {data} = props;\n const list = data.allMarkdownRemark.edges.map((e: any) => e.node);\n const cards = getCards(list);\n const categories = getCategories(list);\n const title = `Blog | ${config.siteTitle}`;\n return (\n <>\n \n \n {title}\n \n \n \n
\n {cards.map((card) => ())}\n \n >\n );\n}\n \n export const query = graphql`\n query {\n allMarkdownRemark(\n sort: {fields: [frontmatter___date], order: DESC},\n filter: {frontmatter: {category: {ne: null}}}\n ) {\n totalCount\n edges {\n node {\n id\n timeToRead\n frontmatter {\n title\n description\n date\n category\n thumbnail\n }\n fields {\n slug\n type\n }\n excerpt\n }\n }\n }\n }\n`"],"sourceRoot":""}