flamegrill/docs/component---src-templates-d...

1 строка
15 KiB
Plaintext

{"version":3,"sources":["webpack:///./src/components/SEO.jsx","webpack:///./src/components/Layout/Header.jsx","webpack:///./src/components/Layout/TableOfContents.jsx","webpack:///./src/templates/doc.jsx"],"names":["SEO","render","title","description","image","postURL","this","props","postNode","postPath","postSEO","postMeta","frontmatter","excerpt","cover","config","siteUrl","pathPrefix","siteTitle","siteDescription","siteLogo","realPrefix","blogURL","schemaOrgJSONLD","url","name","alternateName","siteTitleAlt","push","itemListElement","position","item","headline","content","type","JSON","stringify","property","siteFBAppID","userTwitter","Component","MainHeader","SiteContainer","Navigation","React","styled","div","theme","brand","Links","entries","StyledLinkList","map","key","entry","EntryListItem","to","childMarkdownRemark","fields","slug","EntryTitle","ChapterList","chapters","level","StyledChapterList","ChapterListItem","ChapterTitle","chapter","index","TableOfContents","TOCWrapper","sitePadding","ol","h6","li","h5","accentDark","accent","DocTemplate","pathContext","data","postBySlug","post","id","category_id","postDefaultCategoryID","location","BodyGrid","HeaderContainer","ToCContainer","tableOfContents","BodyContainer","dangerouslySetInnerHTML","__html","html","contentWidthLaptop","lightGrey","pageQuery"],"mappings":"oKAwGeA,E,gLAnGbC,OAAA,WAAU,IAEJC,EACAC,EACAC,EACAC,EALG,EACiCC,KAAKC,MAArCC,EADD,EACCA,SAAUC,EADX,EACWA,SAAUC,EADrB,EACqBA,QAK5B,GAAIA,EAAS,CACX,IAAMC,EAAWH,EAASI,YAC1BV,EAAQS,EAAST,MACjBC,EAAcQ,EAASR,YACnBQ,EAASR,YACTK,EAASK,QACbT,EAAQO,EAASG,MACjBT,EAAUU,IAAOC,QAAUD,IAAOE,WAAaR,OAE/CP,EAAQa,IAAOG,UACff,EAAcY,IAAOI,gBACrBf,EAAQW,IAAOK,SAEjB,IAAMC,EAAmC,MAAtBN,IAAOE,WAAqB,GAAKF,IAAOE,WAC3Db,EAAQW,IAAOC,QAAUK,EAAajB,EACtC,IAAMkB,EAAUP,IAAOC,QAAUD,IAA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,IAAOC,IAAV,qEAAGD,CAAH,oMAMN,SAAAtC,GAAK,OAAIA,EAAMwC,MAAMwB,eAMjB,SAAAhE,GAAK,OAAIA,EAAMwC,MAAMgD,sBAKzB,SAAAxF,GAAK,OAAIA,EAAMwC,MAAM6B,cAI5BY,EAAkB3C,IAAOC,IAAV,uEAAGD,CAAH,8FASf4C,EAAe5C,IAAOC,IAAV,oEAAGD,CAAH,oIAGF,SAAAtC,GAAK,OAAIA,EAAMwC,MAAMiD,aASxBC,EAAS","file":"component---src-templates-doc-jsx-00e3f891e8d1c5d854f5.js","sourcesContent":["import React, { Component } from 'react'\r\nimport Helmet from 'react-helmet'\r\nimport config from '../../data/SiteConfig'\r\n\r\nclass SEO extends Component {\r\n render() {\r\n const { postNode, postPath, postSEO } = this.props\r\n let title\r\n let description\r\n let image\r\n let postURL\r\n if (postSEO) {\r\n const postMeta = postNode.frontmatter\r\n title = postMeta.title\r\n description = postMeta.description\r\n ? postMeta.description\r\n : postNode.excerpt\r\n image = postMeta.cover\r\n postURL = config.siteUrl + config.pathPrefix + postPath\r\n } else {\r\n title = config.siteTitle\r\n description = config.siteDescription\r\n image = config.siteLogo\r\n }\r\n const realPrefix = config.pathPrefix === '/' ? '' : config.pathPrefix\r\n image = config.siteUrl + realPrefix + image\r\n const blogURL = config.siteUrl + config.pathPrefix\r\n const schemaOrgJSONLD = [\r\n {\r\n '@context': 'http://schema.org',\r\n '@type': 'WebSite',\r\n url: blogURL,\r\n name: title,\r\n alternateName: config.siteTitleAlt ? config.siteTitleAlt : ''\r\n }\r\n ]\r\n if (postSEO) {\r\n schemaOrgJSONLD.push([\r\n {\r\n '@context': 'http://schema.org',\r\n '@type': 'BreadcrumbList',\r\n itemListElement: [\r\n {\r\n '@type': 'ListItem',\r\n position: 1,\r\n item: {\r\n '@id': postURL,\r\n name: title,\r\n image\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n '@context': 'http://schema.org',\r\n '@type': 'BlogPosting',\r\n url: blogURL,\r\n name: title,\r\n alternateName: config.siteTitleAlt ? config.siteTitleAlt : '',\r\n headline: title,\r\n image: {\r\n '@type': 'ImageObject',\r\n url: image\r\n },\r\n description\r\n }\r\n ])\r\n }\r\n return (\r\n <Helmet>\r\n {/* General tags */}\r\n <meta name=\"description\" content={description} />\r\n <meta name=\"image\" content={image} />\r\n\r\n {/* Schema.org tags */}\r\n <script type=\"application/ld+json\">\r\n {JSON.stringify(schemaOrgJSONLD)}\r\n </script>\r\n\r\n {/* OpenGraph tags */}\r\n <meta property=\"og:url\" content={postSEO ? postURL : blogURL} />\r\n {postSEO ? <meta property=\"og:type\" content=\"article\" /> : null}\r\n <meta property=\"og:title\" content={title} />\r\n <meta property=\"og:description\" content={description} />\r\n <meta property=\"og:image\" content={image} />\r\n <meta\r\n property=\"fb:app_id\"\r\n content={config.siteFBAppID ? config.siteFBAppID : ''}\r\n />\r\n\r\n {/* Twitter Card tags */}\r\n <meta name=\"twitter:card\" content=\"summary_large_image\" />\r\n <meta\r\n name=\"twitter:creator\"\r\n content={config.userTwitter ? config.userTwitter : ''}\r\n />\r\n <meta name=\"twitter:title\" content={title} />\r\n <meta name=\"twitter:description\" content={description} />\r\n <meta name=\"twitter:image\" content={image} />\r\n </Helmet>\r\n )\r\n }\r\n}\r\n\r\nexport default SEO\r\n","import React from 'react'\r\nimport styled from 'styled-components'\r\nimport Navigation from './Navigation'\r\n\r\nclass MainHeader extends React.Component {\r\n render() {\r\n return (\r\n <SiteContainer>\r\n <Navigation />\r\n </SiteContainer>\r\n )\r\n }\r\n}\r\n\r\nconst SiteContainer = styled.div`\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n background: ${props => props.theme.brand};\r\n padding: 25px;\r\n`\r\n\r\nexport default MainHeader\r\n","import React from 'react'\r\nimport Link from 'gatsby-link'\r\nimport styled from 'styled-components'\r\n\r\n/* eslint react/no-array-index-key: \"off\" */\r\n\r\nconst Links = ({ entries }) => (\r\n <StyledLinkList>\r\n {entries.map(({ entry }, key) => (\r\n <EntryListItem key={key}>\r\n <Link to={entry.childMarkdownRemark.fields.slug}>\r\n <EntryTitle>{entry.childMarkdownRemark.frontmatter.title}</EntryTitle>\r\n </Link>\r\n </EntryListItem>\r\n ))}\r\n </StyledLinkList>\r\n)\r\n\r\nconst ChapterList = ({ chapters, entries, title, level = 0 }) => (\r\n <StyledChapterList>\r\n {title && (\r\n <ChapterListItem key={`${title}${level}`}>\r\n <ChapterTitle level={level}>{title}</ChapterTitle>\r\n </ChapterListItem>\r\n )}\r\n <ChapterListItem>{entries && <Links entries={entries} />}</ChapterListItem>\r\n <ChapterListItem>\r\n {chapters &&\r\n chapters.map((chapter, index) => (\r\n <ChapterList {...chapter} level={level + 1} key={`${index}`} />\r\n ))}\r\n </ChapterListItem>\r\n </StyledChapterList>\r\n)\r\n\r\nconst TableOfContents = ({ chapters }) => (\r\n <TOCWrapper>\r\n {chapters.map((chapter, index) => (\r\n <ChapterList {...chapter} key={index} />\r\n ))}\r\n </TOCWrapper>\r\n)\r\n\r\nexport default TableOfContents\r\n\r\nconst TOCWrapper = styled.div`\r\n padding: ${props => props.theme.sitePadding};\r\n margin: 0;\r\n`\r\n\r\nconst StyledChapterList = styled.ol`\r\n list-style: none;\r\n margin: 0;\r\n`\r\n\r\nconst StyledLinkList = styled.ol`\r\n list-style: none;\r\n`\r\n\r\nconst EntryTitle = styled.h6`\r\n display: inline-block;\r\n font-weight: 200;\r\n color: black;\r\n margin: 0;\r\n line-height: 1.5;\r\n border-bottom: 1px solid transparent;\r\n text-decoration: none;\r\n`\r\n\r\nconst ChapterListItem = styled.li`\r\n margin: 0;\r\n`\r\n\r\nconst EntryListItem = styled.li`\r\n margin: 0;\r\n a:hover {\r\n border-bottom: 1px solid black;\r\n }\r\n`\r\n\r\nconst ChapterTitle = styled.h5`\r\n font-weight: ${({ level }) => {\r\n switch (level % 3) {\r\n case 1:\r\n return '600'\r\n case 2:\r\n return '400'\r\n default:\r\n return '200'\r\n }\r\n }};\r\n font-size: ${({ level }) => {\r\n switch (level % 3) {\r\n case 1:\r\n return '2.2rem'\r\n case 2:\r\n return '1.8rem'\r\n default:\r\n return '2.8rem'\r\n }\r\n }};\r\n color: ${({ level, theme }) => {\r\n switch (level % 3) {\r\n case 1:\r\n return 'black'\r\n case 2:\r\n return theme.accentDark\r\n default:\r\n return theme.accent\r\n }\r\n }};\r\n`\r\n","import { graphql } from 'gatsby'\r\n\r\nimport React from 'react'\r\nimport Helmet from 'react-helmet'\r\nimport styled from 'styled-components'\r\n\r\nimport SEO from '../components/SEO'\r\nimport SiteHeader from '../components/Layout/Header'\r\nimport config from '../../data/SiteConfig'\r\nimport TableOfContents from '../components/Layout/TableOfContents'\r\nimport Layout from '../layouts'\r\n\r\nexport default class DocTemplate extends React.Component {\r\n render() {\r\n const { slug } = this.props.pathContext\r\n const postNode = this.props.data.postBySlug\r\n const post = postNode.frontmatter\r\n if (!post.id) {\r\n post.id = slug\r\n }\r\n if (!post.id) {\r\n post.category_id = config.postDefaultCategoryID\r\n }\r\n return (\r\n <Layout location={this.props.location}>\r\n <div>\r\n <Helmet>\r\n <title>{`${post.title} | ${config.siteTitle}`}</title>\r\n </Helmet>\r\n <SEO postPath={slug} postNode={postNode} postSEO />\r\n <BodyGrid>\r\n <HeaderContainer>\r\n <SiteHeader location={this.props.location} />\r\n </HeaderContainer>\r\n <ToCContainer>\r\n <TableOfContents\r\n chapters={this.props.data.tableOfContents.chapters}\r\n />\r\n </ToCContainer>\r\n <BodyContainer>\r\n <div>\r\n <h1>{post.title}</h1>\r\n <div dangerouslySetInnerHTML={{ __html: postNode.html }} />\r\n </div>\r\n </BodyContainer>\r\n </BodyGrid>\r\n </div>\r\n </Layout>\r\n )\r\n }\r\n}\r\n\r\nconst BodyGrid = styled.div`\r\n height: 100vh;\r\n display: grid;\r\n grid-template-rows: 75px 1fr;\r\n grid-template-columns: 300px 1fr;\r\n\r\n @media screen and (max-width: 600px) {\r\n display: flex;\r\n flex-direction: column;\r\n height: inherit;\r\n }\r\n`\r\n\r\nconst BodyContainer = styled.div`\r\n grid-column: 2 / 3;\r\n grid-row: 2 / 3;\r\n overflow: scroll;\r\n justify-self: center;\r\n width: 100%;\r\n padding: ${props => props.theme.sitePadding};\r\n @media screen and (max-width: 600px) {\r\n order: 2;\r\n }\r\n\r\n & > div {\r\n max-width: ${props => props.theme.contentWidthLaptop};\r\n margin: auto;\r\n }\r\n\r\n & > h1 {\r\n color: ${props => props.theme.accentDark};\r\n }\r\n`\r\n\r\nconst HeaderContainer = styled.div`\r\n grid-column: 1 / 3;\r\n grid-row: 1 / 2;\r\n z-index: 2;\r\n @media screen and (max-width: 600px) {\r\n order: 1;\r\n }\r\n`\r\n\r\nconst ToCContainer = styled.div`\r\n grid-column: 1 / 2;\r\n grid-row: 2 / 3;\r\n background: ${props => props.theme.lightGrey};\r\n overflow: scroll;\r\n @media screen and (max-width: 600px) {\r\n order: 3;\r\n overflow: inherit;\r\n }\r\n`\r\n\r\n/* eslint no-undef: \"off\" */\r\nexport const pageQuery = graphql`\r\n query DocBySlug($slug: String!) {\r\n postBySlug: markdownRemark(fields: { slug: { eq: $slug } }) {\r\n html\r\n frontmatter {\r\n title\r\n }\r\n }\r\n tableOfContents: docsJson {\r\n chapters {\r\n title\r\n entries {\r\n entry {\r\n id\r\n childMarkdownRemark {\r\n fields {\r\n slug\r\n }\r\n frontmatter {\r\n title\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n`\r\n"],"sourceRoot":""}