{"version":3,"sources":["webpack:///./src/components/product/index.tsx","webpack:///./src/templates/post.tsx","webpack:///./src/components/cover/index.tsx"],"names":["useStyles","makeStyles","theme","createStyles","root","flexGrow","justifyContent","padding","spacing","zIndex","position","marginTop","fluid","minHeight","height","maxHeight","width","pageContent","maxWidth","color","boxShadow","marginBottom","textAlign","lineHeight","borderBottom","fontWeight","borderTop","Product","props","classes","node","tags","frontmatter","showSocial","undefined","socials","Paper","elevation","className","dangerouslySetInnerHTML","__html","html","Container","Divider","light","postNode","postPath","fields","slug","coverContainer","data","pageContext","suggestions","categories","suggestionCards","map","suggestion","title","thumbnail","link","type","showAuthor","showDescription","showTags","showBottom","markdownRemark","post","showCommments","comments","showSuggestions","id","category_id","config","rel","href","path","SEO","postSEO","page_cover","cover","cards","Disqus","CoverImage","windowScrollTop","fileEdges","children","parallax","React","transform","setTransform","window","innerWidth","pageYOffset","addEventListener","resetTransform","removeEventListener","coverNodeList","filter","fileNode","childImageSharp","absolutePath","indexOf","length","style","coverURL","substring","__PATH_PREFIX__","backgroundImage","query","Cover","render","allFile","edges"],"mappings":"6OAUMA,G,UAAYC,aAAW,SAACC,GAAD,OAC3BC,YAAa,CACXC,KAAM,CACJC,SAAU,EACVC,eAAgB,gBAChBC,QAASL,EAAMM,QAAQ,EAAG,GAC1BC,OAAQ,EACRC,SAAU,WACVC,UAAW,SAEbC,MAAO,CACHC,UAAW,QACXC,OAAQ,OACRC,UAAW,OACXC,MAAO,OACPN,SAAU,YAEdO,YAAa,CACXC,SAAU,OACV,eAAgB,CACdC,MAAO,aAET,QAAS,CACLH,MAAO,OACPI,UAAW,mBAEf,MAAO,CACHD,MAAO,WAEX,uCAAwC,CACpCR,UAAW,OACXU,aAAc,mBAElB,OAAQ,CACJV,UAAW,QAEf,UAAW,CACPK,MAAO,OACPE,SAAU,OACVG,aAAc,QAElB,8EAA+E,CAC3EC,UAAW,QAEf,yJAA0J,CACtJf,QAAS,OACTgB,WAAY,OAEhB,4BAA6B,CACzBC,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,YAAc,KACvBR,EAAkBO,OAAOE,YAAc,EACvCF,OAAOG,iBAAiB,SAAUC,IAElCX,EAAkB,EAEb,WACDO,OAAOC,YAAc,IACrBD,OAAOK,oBAAoB,SAAUD,GAEvCX,EAAkB,MAK1B,IAAMW,EAAiB,WAEjBX,EADEO,OAAOC,YAAc,IACLD,OAAOE,YAAc,EAErB,EAEpBH,EAAa,iBAAmBN,EAAkB,UAGhDa,EAAgBZ,EAAUa,QAAO,SAAAC,GACrC,OAAsC,OAAlCA,EAASpE,KAAKqE,kBAKT,IAFPD,EAASpE,KAAKsE,aAAaC,QACzB1B,OAAU,eAAgBI,OAQhC,GAA6B,IAAzBiB,EAAcM,OAChB,OACE,gBAAC,IAAD,CACE1F,MAAOoF,EAAc,GAAGlE,KAAKqE,gBAAgBvF,MAC7C0B,UAAWT,EAAQjB,MACnB2F,MAAO,CAACf,UAAWA,IAElBH,GAMP,IAAMmB,EACsB,MAA1BzB,EAAM0B,UAAU,EAAG,GACfC,GAAkB3B,EAClBA,EACN,OACE,uBACEwB,MAAO,CACLI,gBAAiB,OAAOH,EAAT,IACfhB,UAAWA,GAEblD,UAAWT,EAAQjB,OAEhByE,IAiBLuB,EAAQ,YAqCCC,IAjDD,SAACjF,GACX,OACI,gBAAC,cAAD,CACIgF,MAAOA,EAEPE,OAAQ,SAAC5D,GAAD,OACJ,gBAACgC,EAAD,iBAAgBtD,EAAhB,CAAuBwD,UAAWlC,EAAK6D,QAAQC","file":"component---src-templates-post-tsx-293d1a69b5ad95bbaab0.js","sourcesContent":["import * as React from \"react\";\nimport { createStyles, makeStyles, Theme } from '@material-ui/core/styles';\nimport Paper from '@material-ui/core/Paper';\nimport Tags from '../tags';\nimport Container from '@material-ui/core/Container';\nimport Social from '../social';\nimport Divider from '@material-ui/core/Divider';\nimport './index.scss';\n\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n flexGrow: 1,\n justifyContent: 'space-between',\n padding: theme.spacing(3, 2),\n zIndex: 3,\n position: 'relative',\n marginTop: '-60px'\n },\n fluid: {\n minHeight: '360px',\n height: 'auto',\n maxHeight: '60vh',\n width: '100%',\n position: 'relative'\n },\n pageContent: {\n maxWidth: '100%',\n '& blockquote': {\n color: 'slategrey',\n },\n '& img': {\n width: '100%',\n boxShadow: 'none !important',\n },\n '& a': {\n color: '#2e9fff',\n },\n '& > h1, > h2, > h3, > h4, > h5, > h6': {\n marginTop: '20px',\n marginBottom: '20px !important',\n },\n '& l1': {\n marginTop: '15px',\n },\n '& table': {\n width: '100%',\n maxWidth: '100%',\n marginBottom: '20px',\n },\n '& table > thead > tr > th, table > tbody > tr > th, table > tfoot > tr > th': {\n textAlign: 'left',\n },\n '& table > thead > tr > th, table > thead > tr > td, table > tbody > tr > th, table > tbody > tr > td, table > tfoot > tr > th, table > tfoot > tr > td': {\n padding: '10px',\n lineHeight: 1.429,\n },\n '& table > thead > tr > th': {\n borderBottom: '2px solid rgba(0, 0, 0, 0.12)',\n fontWeight: 700,\n },\n '& table > tbody + tbody': {\n borderTop: '2px solid rgba(0, 0, 0, 0.12)'\n },\n '& table > tbody > tr > td': {\n borderBottom: '1px solid rgba(0, 0, 0, 0.12)',\n }\n }\n }),\n);\n\nconst Product = (props) => {\n const classes = useStyles(props);\n const {node} = props;\n const tags = node.frontmatter.tags;\n const showSocial = node.frontmatter.socials !== undefined && node.frontmatter.socials !== false;\n\n return (\n \n
\n {\n // tslint:disable:react-no-dangerous-html\n
\n // tslint:enable:react-no-dangerous-html\n }\n \n {tags && (<>
\n \n \n \n
)}\n \n \n \n {showSocial && (<>
\n \n )}\n \n );\n}\n\nexport default Product;","import * as React from \"react\"\nimport { graphql } from \"gatsby\"\nimport PostLayout from '../components/layouts/post-layout';\nimport ProductContainer from '../components/product-container/container';\nimport Cover from '../components/cover';\nimport Container from '@material-ui/core/Container';\nimport { createStyles, makeStyles, Theme } from '@material-ui/core/styles';\nimport Product from '../components/product';\nimport Disqus from '../components/Disqus';\nimport * as config from '../../config/SiteConfig.js';\nimport Helmet from \"react-helmet\";\nimport SEO from \"../components/SEO\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n coverContainer: {\n padding: 0,\n marginTop: 0,\n marginBottom: 0\n }\n }),\n);\n\nexport default (props) => {\n const classes = useStyles(props);\n const {data, pageContext} = props;\n const {suggestions, categories} = pageContext;\n const suggestionCards = suggestions.map((suggestion) => ({\n title: suggestion.node.frontmatter.title,\n thumbnail: suggestion.node.frontmatter.thumbnail,\n link: `${suggestion.node.fields.type !== 'page' ? `/${suggestion.node.fields.type}` : ''}${suggestion.node.fields.slug}`,\n showAuthor: false,\n showDescription: false,\n showTags: false,\n showBottom: false\n }))\n const node = data.markdownRemark;\n const post = node.frontmatter;\n const showCommments = post.comments !== null && post.comments !== false;\n const showSuggestions = post.suggestion !== null && post.suggestion !== false;\n\n if (!post.id) {\n post.id = node.fields.slug;\n }\n if (!post.category_id) {\n post.category_id = config.postDefaultCategoryID;\n }\n\n return (\n \n \n {post.title}\n \n \n \n {post.page_cover && \n \n }\n \n \n \n {showSuggestions && \n \n }\n {showCommments && \n \n }\n \n )\n}\n \nexport const query = graphql`\n query PagePostBySlug($slug: String!) {\n markdownRemark(fields: { slug: { eq: $slug } }) {\n html\n excerpt\n frontmatter {\n title\n description\n page_cover\n date\n thumbnail\n category\n tags\n comments\n suggestion\n socials\n }\n fields {\n slug\n date\n type\n }\n }\n }\n`;","import * as React from \"react\";\nimport { StaticQuery, graphql } from \"gatsby\";\nimport Img from \"gatsby-image\";\nimport * as path from \"path\";\nimport { createStyles, makeStyles, Theme } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n flexGrow: 1,\n justifyContent: 'space-between',\n },\n fluid: {\n // minHeight: '360px',\n height: 'auto',\n maxHeight: '60vh',\n width: '100%',\n position: 'relative'\n }\n }),\n);\n\nconst CoverImage = (props) => {\n const classes = useStyles(props);\n const { fileEdges, cover, children, parallax = true } = props;\n\n let windowScrollTop;\n const [transform, setTransform] = React.useState(\n \"translate3d(0,\" + windowScrollTop + \"px,0)\"\n );\n React.useEffect(() => {\n if (parallax) {\n if (window.innerWidth >= 768) {\n windowScrollTop = window.pageYOffset / 3;\n window.addEventListener(\"scroll\", resetTransform);\n } else {\n windowScrollTop = 0;\n }\n return function cleanup() {\n if (window.innerWidth >= 768) {\n window.removeEventListener(\"scroll\", resetTransform);\n } else {\n windowScrollTop = 0;\n }\n };\n }\n });\n const resetTransform = () => {\n if (window.innerWidth >= 768) {\n windowScrollTop = window.pageYOffset / 3;\n } else {\n windowScrollTop = 0;\n }\n setTransform(\"translate3d(0,\" + windowScrollTop + \"px,0)\");\n };\n\n const coverNodeList = fileEdges.filter(fileNode => {\n if (fileNode.node.childImageSharp === null) return false;\n\n if (\n fileNode.node.absolutePath.indexOf(\n path.join(\"/static/img/\", cover)\n ) !== -1\n )\n return true;\n\n return false;\n });\n\n if (coverNodeList.length === 1) {\n return (\n \n {children}\n \n );\n }\n\n /* tslint no-undef: \"off\" */\n const coverURL =\n cover.substring(0, 1) === \"/\"\n ? __PATH_PREFIX__ + cover\n : cover;\n return (\n \n {children}\n
\n );\n }\n\nconst Cover = (props: any) => {\n return (\n (\n \n )}\n />\n );\n}\n\nconst query = graphql`\nquery CoverQuery {\n allFile {\n edges {\n node {\n id\n absolutePath\n childImageSharp {\n id\n resolutions {\n base64\n tracedSVG\n aspectRatio\n width\n height\n src\n srcSet\n srcWebp\n srcSetWebp\n originalName\n }\n internal {\n contentDigest\n type\n owner\n }\n fluid(maxWidth: 1280) {\n ...GatsbyImageSharpFluid\n originalName\n }\n }\n }\n }\n }\n }\n`;\n\nexport default Cover;"],"sourceRoot":""}