{"version":3,"sources":["webpack:///./src/templates/post.js"],"names":["Post","data","location","post","ghostPost","url","slug","shareText","title","telegramUrl","encodeURIComponent","twitterUrl","mailUrl","type","codeinjection_styles","className","style","backgroundImage","feature_image","dangerouslySetInnerHTML","__html","html","paddingBottom","tags","map","tag","key","to","name","href","data-action","alt","target","rel","onClick","window","print","postQuery"],"mappings":"8OAiNeA,UAzLF,SAAC,GAAwB,IAAtBC,EAAqB,EAArBA,KAAMC,EAAe,EAAfA,SACZC,EAAOF,EAAKG,UAEZC,EAAM,gCAAkCF,EAAKG,KAE7CC,EAAY,yBAA2BJ,EAAKK,MAAQ,MAAQH,EAE5DI,EACF,8BACAC,mBAAmBL,GACnB,SACAK,mBAAmBP,EAAKK,OAEtBG,EACF,iCACAD,mBAAmBL,GACnB,SACAK,mBAAmBP,EAAKK,OAEtBI,EACF,mBACAF,mBAAmBP,EAAKK,OACxB,SACAE,mBAAmBL,GAEvB,OACI,oCACI,kBAAC,IAAD,CAAUJ,KAAMA,EAAMC,SAAUA,EAAUW,KAAK,YAC/C,kBAAC,IAAD,KACI,2BAAOA,KAAK,YAAZ,GAA2BV,EAAKW,uBAEpC,kBAAC,IAAD,KACI,yBAAKC,UAAU,kBACX,6BAASA,UAAU,WACf,4BACIA,UAAU,qBACVC,MAAO,CACHC,gBAAgB,OAAQd,EAAKe,cAAd,MAGnB,wBAAIH,UAAU,iBACV,8BAAOZ,EAAKK,UAIxB,6BAASO,UAAU,WACf,6BAASA,UAAU,qBAEf,6BACIA,UAAU,kDACVI,wBAAyB,CACrBC,OAAQjB,EAAKkB,QAGrB,6BACA,yBAAKN,UAAU,aACX,wBAAIA,UAAU,YAAd,eAGJ,yBACIA,UAAU,uBACVC,MAAO,CACHM,cAAe,SAGlBnB,EAAKoB,KAAKC,KAAI,SAACC,GACZ,OACI,kBAAC,OAAD,CACIC,IAAKD,EAAInB,KACTS,UAAU,4BACVY,GAAI,QAAUF,EAAInB,MAEjB,KAAOmB,EAAIG,UAK5B,6BAEA,yBAAKb,UAAU,aACX,wBAAIA,UAAU,YAAd,gCAIJ,yBACIA,UAAU,YACVC,MAAO,CACHM,cAAe,SAGnB,yBAAKP,UAAU,cACX,uBACIc,KACI,wBAA0BtB,EAE9BuB,cAAY,wBAEZ,kBAAC,IAAD,CACIf,UAAU,kBACVgB,IAAI,6BAIZ,uBACIF,KAAMpB,EACNuB,OAAO,SACPC,IAAI,uBAEJ,kBAAC,IAAD,CACIlB,UAAU,kBACVgB,IAAI,6BAIZ,uBACIF,KACI,gDACAnB,mBAAmBL,GAEvBG,MAAM,wBACNwB,OAAO,SACPC,IAAI,uBAEJ,kBAAC,IAAD,CACIlB,UAAU,kBACVgB,IAAI,6BAGZ,uBACIF,KAAMlB,EACNH,MAAM,uBACNwB,OAAO,SACPC,IAAI,uBAEJ,kBAAC,IAAD,CACIlB,UAAU,kBACVgB,IAAI,4BAIZ,uBACIF,KAAMjB,EACNJ,MAAM,uBACNwB,OAAO,SACPC,IAAI,uBAEJ,kBAAC,IAAD,CACIlB,UAAU,kBACVgB,IAAI,0BAGZ,uBACIF,KAAK,IACLK,QAAS,WACLC,OAAOC,UAGX,kBAAC,IAAD,CACIrB,UAAU,kBACVgB,IAAI,kCA4BzC,IAAMM,EAAS","file":"component---src-templates-post-js-49b45e9c72f16f71bc90.js","sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { graphql } from \"gatsby\";\nimport { Helmet } from \"react-helmet\";\nimport { Link } from \"gatsby\";\n\nimport { Layout } from \"../components/common\";\nimport { MetaData } from \"../components/common/meta\";\n\nimport {\n FaWhatsapp,\n FaFacebookF,\n FaTelegramPlane,\n FaTwitter,\n FaEnvelope,\n FaPrint,\n} from \"react-icons/fa\";\n\n/**\n * Single post view (/:slug)\n *\n * This file renders a single post and loads all the content.\n *\n */\nconst Post = ({ data, location }) => {\n const post = data.ghostPost;\n\n const url = \"https://www.tombatruites.cat/\" + post.slug;\n\n const shareText = \"Mira aquesta recepta: \" + post.title + \" - \" + url;\n\n const telegramUrl =\n \"https://t.me/share/url?url=\" +\n encodeURIComponent(url) +\n \"&text=\" +\n encodeURIComponent(post.title);\n\n const twitterUrl =\n \"https://twitter.com/share?url=\" +\n encodeURIComponent(url) +\n \"&text=\" +\n encodeURIComponent(post.title);\n\n const mailUrl =\n \"mailto:?subject=\" +\n encodeURIComponent(post.title) +\n \"&body=\" +\n encodeURIComponent(url);\n\n return (\n <>\n \n \n \n \n \n
\n
\n \n

\n {post.title}\n

\n \n
\n
\n
\n {/* The main post content */}\n \n
\n
\n

ETIQUETES:

\n
\n\n \n {post.tags.map((tag) => {\n return (\n \n {`# ` + tag.name}\n \n );\n })}\n
\n
\n\n
\n

\n COMPARTEIX AQUESTA RECEPTA:\n

\n
\n \n
\n \n \n \n\n \n \n \n\n \n \n \n \n \n \n\n \n \n \n {\n window.print();\n }}\n >\n \n \n
\n \n \n \n \n
\n \n );\n};\n\nPost.propTypes = {\n data: PropTypes.shape({\n ghostPost: PropTypes.shape({\n codeinjection_styles: PropTypes.object,\n title: PropTypes.string.isRequired,\n tags: PropTypes.array.isRequired,\n html: PropTypes.string.isRequired,\n feature_image: PropTypes.string,\n }).isRequired,\n }).isRequired,\n location: PropTypes.object.isRequired,\n};\n\nexport default Post;\n\nexport const postQuery = graphql`\n query($slug: String!) {\n ghostPost(slug: { eq: $slug }) {\n ...GhostPostFields\n }\n }\n`;\n"],"sourceRoot":""}