{"version":3,"sources":["webpack:///./src/templates/category-posts-index.js"],"names":["CategoryBlogIndex","data","pageContext","nextPagePath","previousPagePath","categoryName","posts","allWpPost","nodes","length","isHomePage","pathname","title","fluid","className","styles","contentWrapper","categoryLinkForIndexPage","to","categoryTitleForIndexPage","postsRowWrapper","map","post","featuredImage","node","localFile","childImageSharp","alt","altText","caption","tags","name","postWrapper","xs","md","xl","key","uri","itemScope","itemType","span","order","itemProp","featuredImageWrapper","style","position","top","left","width","height","display","justifyContent","alignItems","postRegular","postTitle","parse","date","postExcerpt","excerpt","postDate","author"],"mappings":"2FAAA,0KA8IeA,UAhIW,SAAC,GAGpB,IAFLC,EAEI,EAFJA,KAEI,IADJC,YAAeC,EACX,EADWA,aAAcC,EACzB,EADyBA,iBAAkBC,EAC3C,EAD2CA,aAEzCC,EAAQL,EAAKM,UAAUC,MAE7B,OAAKF,EAAMG,OAcT,kBAAC,IAAD,CAAQC,YAAU,GAChB,kBAAC,IAAD,CACEC,SAAQ,kDAAoE,QAAjBN,EAAyBA,EAAe,UACnGO,MAAOP,IAMP,kBAAC,IAAD,CACEQ,OAAK,EACLC,UAAWC,IAAOC,gBAElB,kBAAC,IAAD,CAAKF,UAAWC,IAAOE,0BACrB,kBAAC,OAAD,CAAMC,GAAG,KAAT,0BAEF,kBAAC,IAAD,CAAKJ,UAAWC,IAAOI,2BAA8C,QAAjBd,EAAyB,SAAWA,GACxF,kBAAC,IAAD,CAAKS,UAAWC,IAAOK,iBACpBd,EAAMe,KAAI,SAAAC,GAAS,IAAD,gBACXV,EAAQU,EAAKV,MACbW,EAAgB,CACpBV,MAAK,UAAES,EAAKC,qBAAP,iBAAE,EAAoBC,YAAtB,iBAAE,EAA0BC,iBAA5B,iBAAE,EAAqCC,uBAAvC,aAAE,EAAsDb,MAC7Dc,KAAK,UAAAL,EAAKC,qBAAL,mBAAoBC,YAApB,eAA0BI,UAA1B,GACLC,SAAS,UAAAP,EAAKC,qBAAL,mBAAoBC,YAApB,eAA0BK,U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posts-index-js-6b1a6a25886e548340ef.js","sourcesContent":["import React from \"react\"\nimport { Link, graphql } from \"gatsby\"\nimport Image from \"gatsby-image\"\nimport parse from \"html-react-parser\"\n\nimport Bio from \"../components/bio\"\nimport Layout from \"../components/layout\"\nimport SEO from \"../components/seo\"\n\nimport styles from \"./blog-index.module.css\"\nimport Container from 'react-bootstrap/Container'\nimport Row from 'react-bootstrap/Row'\nimport Col from 'react-bootstrap/Col'\n\nconst CategoryBlogIndex = ({\n data,\n pageContext: { nextPagePath, previousPagePath, categoryName },\n}) => {\n const posts = data.allWpPost.nodes\n\n if (!posts.length) {\n return (\n \n \n \n

\n No blog posts found. Add posts to your WordPress site and they'll\n appear here!\n

\n
\n )\n }\n\n return (\n \n \n\n {/* */}\n \n {/*
    */}\n \n \n Back to Insights Home\n \n {categoryName === 'All' ? 'Latest' : categoryName}\n \n {posts.map(post => {\n const title = post.title\n const featuredImage = {\n fluid: post.featuredImage?.node?.localFile?.childImageSharp?.fluid,\n alt: post.featuredImage?.node?.altText || ``,\n caption: post.featuredImage?.node?.caption || '',\n }\n const tag = post.tags.nodes.length > 0 ? post.tags.nodes[0].name : '';\n // console.log('tag: ', tag);\n\n return (\n \n {/*
  1. */}\n \n \n
    \n {/* if we have a featured image for this post let's display it */}\n {featuredImage?.fluid && (\n \n )}\n {featuredImage.caption && (\n
    {featuredImage.caption}
    \n )}\n
    \n \n \n
    \n

    \n \n {parse(title)}\n \n

    \n {post.date}\n
    \n
    {parse(post.excerpt)}
    \n
    By {post.author.node.name} ยท {post.date}
    \n \n \n {/*
  2. */}\n \n )\n })}\n
    \n \n {/*
*/}\n \n\n {previousPagePath && (\n <>\n Previous page\n
\n \n )}\n {nextPagePath && Next page}\n
\n )\n}\n\nexport default CategoryBlogIndex\n\nexport const pageQuery = graphql`\n query WordPressPostCategory($offset: Int!, $postsPerPage: Int!, $categoryName: String) {\n allWpPost(\n filter: {categories: {nodes: {elemMatch: {name: {eq: $categoryName}}}}}\n sort: { fields: [date], order: DESC }\n limit: $postsPerPage\n skip: $offset\n ) {\n nodes {\n author {\n node {\n name\n }\n }\n excerpt\n uri\n date(formatString: \"MMMM DD, YYYY\")\n title\n excerpt\n featuredImage {\n node {\n altText\n # caption\n localFile {\n childImageSharp {\n fluid(maxWidth: 1000, quality: 100) {\n ...GatsbyImageSharpFluid_tracedSVG\n }\n }\n }\n }\n }\n categories {\n nodes {\n name\n }\n }\n tags {\n nodes {\n name\n }\n }\n }\n }\n }\n`\n"],"sourceRoot":""}