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MA7DhBuB,QAAUvB,EAAKkC,UAEtB,gBAACd,EAAA,EAAD,KACGpB,EAAKuB,OACJ,wBAAMhB,MAAM,WAAW4B,GAAIxB,EAAUX,EAAKuB,SAE3CvB,EAAKuB,OACJ,0BAAKvB,EAAKuB,OAEXvB,EAAKkC,SACJ,uBAAK3B,MAAUC,EAAL,KAAuBR,EAAKoC,sBAAwB5B,EAAOR,EAAKoC,qBAAqB1B,iBAC5FX,EAAaC,GACd,gBAAC,IAAD,CAAeqC,cAAe,CAACC,KAAYC,SAAUvC,EAAKkC,UAC1D,uBAAKM,MAAO,CAACC,MAAO,aAdd,IAACzC","sources":["webpack://hmb/./src/templates/GenericPage.module.scss","webpack://hmb/./src/templates/GenericPage.jsx"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport var content = \"GenericPage-module--content--upzd4\";\nexport var top = \"GenericPage-module--top--tcv0O\";\nexport var bottom = \"GenericPage-module--bottom--e56CO\";\nexport var left = \"GenericPage-module--left--hU0eA\";\nexport var right = \"GenericPage-module--right--gRB3s\";\nexport var small = \"GenericPage-module--small--0yaIk\";\nexport var medium = \"GenericPage-module--medium--NVzZ0\";\nexport var large = \"GenericPage-module--large--zDe86\";\nexport var legend = \"GenericPage-module--legend--U1k5M\";","import * as React from \"react\"\nimport Layout from '../components/Layout/Layout';\nimport CenteredSection from '../components/CenteredSection/CenteredSection';\nimport WideImageSection from '../components/WideImageSection/WideImageSection';\nimport ReactMarkdown from \"react-markdown\";\nimport rehypeRaw from 'rehype-raw';\nimport { graphql } from 'gatsby'\n\nimport * as styles from './GenericPage.module.scss'\n\nconst GenericPage = ({pageContext, data}) => {\n const articles = data.allStrapiArticle.edges;\n\n const content = (node) => {\n if(!node.Title && !node.Content) return false;\n return (\n \n {node.Title && \n \n }\n {node.Title && \n

{node.Title}

\n }\n {node.Content && \n
\n {contentImage(node)}\n \n
\n
\n }\n
\n )\n }\n\n const contentImage = (node) => {\n return (\n node.ContentImage &&\n img\n )\n }\n\n const anchorTag = (title) => {\n const re = new RegExp(\"[^a-zA-Z0-9-]\", \"g\");\n return title.replaceAll(\" \",\"-\").replaceAll(re, \"\").toLowerCase();\n }\n\n const legend = () => {\n if(!pageContext.showLegend) return false;\n if(articles[0] && articles.length < (articles[0].node.Index === 0 ? 3 : 2)) return false;\n\n return (\n \n
\n {articles.map(article => (\n article.node.Title && \n article.node.index !== 0 &&\n {article.node.Title}
\n ))}\n
\n
\n )\n }\n\n return (\n // show legend first if no header (index>0), or after the header if header present\n \n {articles.map((article, i) => (\n
\n {i === 0 && article.node.Index > 0 && legend()} \n {article.node.HeaderImage && }\n {i === 0 && article.node.Index === 0 && legend()}\n {content(article.node)}\n
\n ))}\n
\n )\n}\n\nexport default GenericPage;\n\nexport const pageQuery=graphql`\n query GenericPageQuery($page: String) {\n allStrapiArticle(filter: {Page: {eq: $page}} sort: {order: ASC, fields: Index}) {\n edges {\n node {\n HeaderText\n HeaderImage {\n localFile {\n childImageSharp {\n fluid(quality: 90, maxWidth: 1920) {\n ...GatsbyImageSharpFluid\n }\n }\n }\n }\n Title\n Content\n Index\n ContentImage {\n localFile {\n childImageSharp {\n fluid(quality: 90, maxWidth: 800) {\n ...GatsbyImageSharpFluid\n }\n }\n }\n }\n ContentImageSize\n ContentImagePosition\n }\n }\n }\n }\n`"],"names":["bottom","left","right","small","medium","large","pageContext","articles","data","allStrapiArticle","edges","contentImage","node","ContentImage","src","localFile","childImageSharp","fluid","alt","class","styles","ContentImageSize","toLowerCase","anchorTag","title","re","RegExp","replaceAll","legend","showLegend","length","Index","CenteredSection","map","article","Title","index","href","Layout","pageTitle","i","HeaderImage","WideImageSection","image","heading","HeaderText","Content","id","ContentImagePosition","rehypePlugins","rehypeRaw","children","style","clear"],"sourceRoot":""}