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BsB,aAMrB,qBAAGtB,MAAkBE","sources":["webpack://sea-gatsby-store/./src/components/blog/related-articles.jsx","webpack://sea-gatsby-store/./src/templates/pages/blog-page.jsx"],"sourcesContent":["import { Link } from \"gatsby\"\nimport React, { useEffect, useState } from \"react\"\nimport styled from \"styled-components\"\nimport { graphql, useStaticQuery } from \"gatsby\"\nimport CloudflareImage from \"../reusable/cloudflare-image\"\n\nconst RelatedArticles = ({ categories, currentBlogSlug }) => {\n const blogQueryData = useStaticQuery(BLOG_QUERY)\n const blogs = blogQueryData?.allSeaBlog?.nodes\n\n const [blogsToDisplay, setBlogsToDisplay] = useState(blogs)\n\n useEffect(() => {\n let relatedBlogs = []\n\n blogs.forEach((blog) => {\n categories.forEach((cat) => {\n blog.categories.every((blogCat) => {\n if (cat.slug == blogCat.slug && currentBlogSlug != blog.slug) {\n relatedBlogs.push(blog)\n return false\n }\n })\n })\n })\n\n if (relatedBlogs.length == 0) {\n blogs.forEach((blog) => {\n if (currentBlogSlug != blog.slug) {\n relatedBlogs.push(blog)\n }\n })\n }\n\n setBlogsToDisplay(relatedBlogs)\n }, [])\n\n return (\n \n Related Articles\n {blogsToDisplay.map((blog, index) => (\n \n \n \n \n \n \n {blog.title}\n {blog.read_time}\n \n by {blog.author} · {blog.date}\n \n \n \n \n ))}\n \n )\n}\n\nexport default RelatedArticles\n\nconst Container = styled.div`\n width: 400px;\n min-width: 400px;\n margin-left: 50px;\n margin-top: 25px;\n\n @media (max-width: ${({ theme }) => theme.breakMedium}) {\n width: 300px;\n min-width: 300px;\n }\n\n @media (max-width: ${({ theme }) => theme.breakSmall}) {\n margin-left: 0;\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n justify-content: space-evenly;\n }\n`\n\nconst Title = styled.h2`\n margin-bottom: 30px;\n width: 100%;\n text-align: center;\n\n @media (max-width: ${({ theme }) => theme.breakMedium}) {\n font-size: 1.75rem;\n line-height: 2.6rem;\n }\n\n @media (max-width: ${({ theme }) => theme.breakSmall}) {\n text-align: center;\n }\n`\n\nconst Article = styled.div`\n width: 100%;\n height: 400px;\n box-shadow: 0px 3px 20px #00000014;\n border-radius: 8px 8px 8px 8px;\n margin-bottom: 20px;\n display: flex;\n flex-direction: column;\n cursor: pointer;\n overflow: hidden;\n\n @media (max-width: ${({ theme }) => theme.breakMedium}) {\n height: 300px;\n width: 300px;\n }\n`\nconst ArticleImageContainer = styled.div`\n width: 100%;\n height: 280px;\n overflow: hidden;\n\n @media (max-width: ${({ theme }) => theme.breakMedium}) {\n height: 200px;\n }\n`\n\nconst ArticleInfoContainer = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 120px;\n padding: 0 50px;\n justify-content: space-between;\n padding: 5px 5% 10px 5%;\n`\n\nconst ArticleTitle = styled.h4`\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n`\n\nconst ReadTime = styled.p`\n color: ${({ theme }) => theme.colors.brandHover};\n text-align: center;\n margin: 0;\n`\n\nconst ArticleAuthor = styled.p`\n margin: 0;\n text-align: center;\n color: ${({ theme }) => theme.colors.lightgrey5};\n font-style: italic;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n`\n\n// ===============\n// QUERY\n// ===============\nconst BLOG_QUERY = graphql`\n {\n allSeaBlog {\n nodes {\n author\n slug\n title\n date\n read_time\n categories {\n slug\n name\n }\n thumbnail {\n source_url\n }\n }\n }\n }\n`\n","import React from \"react\"\nimport styled from \"styled-components\"\n\nimport Layout from \"../../theme/layout\"\nimport SEO from \"../../components/header/seo\"\nimport RelatedArticles from \"../../components/blog/related-articles\"\n\nconst BlogPage = ({ pageContext, location }) => {\n return (\n \n \n \n \n \n \n \n )\n}\n\nexport default BlogPage\n\nconst Container = styled.div`\n display: flex;\n width: 100%;\n margin-top: 50px;\n padding: 0 10px;\n\n @media (max-width: ${({ theme }) => theme.breakSmall}) {\n flex-direction: column;\n align-items: center;\n }\n`\n\nconst BlogContent = styled.div`\n p,\n figure,\n h1,\n h2 {\n margin-top: 1.8rem;\n }\n\n p {\n text-align: justify;\n }\n\n blockquote {\n background-color: ${({ theme }) => theme.colors.brandGrey};\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 60px 10% 30px 10%;\n margin: 50px 0 50px 0;\n\n & > p {\n margin-top: 0;\n text-align: center;\n }\n\n & > cite {\n margin-top: 10px;\n font: normal normal bold 21px/35px Poppins;\n }\n }\n\n .wp-block-column {\n & > div {\n display: inline-block;\n }\n\n @media (max-width: ${({ theme }) => theme.breakTiny}) {\n align-items: center;\n }\n }\n\n iframe {\n @media (max-width: ${({ theme }) => theme.breakSmall}) {\n width: 100%;\n }\n }\n`\n"],"names":["categories","currentBlogSlug","blogQueryData","useStaticQuery","BLOG_QUERY","blogs","allSeaBlog","nodes","useState","blogsToDisplay","setBlogsToDisplay","useEffect","relatedBlogs","forEach","blog","cat","every","blogCat","slug","push","length","Container","Title","map","index","Link","to","key","Article","ArticleImageContainer","src","thumbnail","source_url","alt","author","objectFit","ArticleInfoContainer","ArticleTitle","title","ReadTime","read_time","ArticleAuthor","date","styled","theme","breakMedium","breakSmall","colors","brandHover","lightgrey5","pageContext","location","pathContext","bannerDetails","subTitle","description","excerpt","image","italic","yoast","seo","BlogContent","dangerouslySetInnerHTML","__html","content","brandGrey","breakTiny"],"sourceRoot":""}