-
Notifications
You must be signed in to change notification settings - Fork 3
/
component---src-templates-lesson-jsx-1a8b44204d8f2b24e204.js.map
1 lines (1 loc) · 28.4 KB
/
component---src-templates-lesson-jsx-1a8b44204d8f2b24e204.js.map
1
{"version":3,"sources":["webpack:///component---src-templates-lesson-jsx-1a8b44204d8f2b24e204.js","webpack:///./src/components/Layout/TableOfContents.jsx","webpack:///./src/templates/lesson.jsx"],"names":["webpackJsonp","219","module","exports","__webpack_require__","_interopRequireDefault","obj","__esModule","default","_taggedTemplateLiteralLoose","strings","raw","_classCallCheck","instance","Constructor","TypeError","_possibleConstructorReturn","self","call","ReferenceError","_inherits","subClass","superClass","prototype","Object","create","constructor","value","enumerable","writable","configurable","setPrototypeOf","__proto__","_templateObject","_templateObject2","_react","_react2","_gatsbyLink","_gatsbyLink2","_styledComponents","_styledComponents2","TableOfContents","_React$Component","this","apply","arguments","buildNodes","posts","props","type","contentsType","postNodes","forEach","post","node","frontmatter","postNode","title","path","fields","slug","substring","category","lessonNumber","lesson","chapter","push","postNodeChapters","sort","a","b","nodeListItems","listItems","chapterTitles","idx","chapterLessons","nodeIdx","createElement","LessonContainer","key","to","className","render","TableOfContentsContainer","React","Component","styled","div","theme","sitePadding","brand","227","pageQuery","undefined","_templateObject3","_templateObject4","_reactHelmet","_reactHelmet2","_SEO","_SEO2","_Header","_Header2","_SiteConfig","_SiteConfig2","_TableOfContents","_TableOfContents2","LessonTemplate","pathContext","data","postBySlug","id","category_id","config","postDefaultCategoryID","siteTitle","postPath","postSEO","BodyGrid","HeaderContainer","location","BodyContainer","dangerouslySetInnerHTML","__html","html","ToCContainer","allPostTitles","edges","toCChapters","widthLaptop","contentWidthLaptop","accentDark"],"mappings":"AAAAA,cAAc,iBAERC,IACA,SAAUC,EAAQC,EAASC,GAEhC,YAmBA,SAASC,GAAuBC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,QAASF,GAEvF,QAASG,GAA4BC,EAASC,GAA0B,MAAnBD,GAAQC,IAA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AAA,eACEzC,EAAA5B,QAAAqE,cAAA,UACGxB,EAAKI,OAERrB,EAAA5B,QAAAqE,cAAA,OAAK4C,yBAA2BC,OAAQlE,EAASmE,UAGrDvF,EAAA5B,QAAAqE,cAAC+C,GAAa3C,UAAU,OACtB7C,EAAA5B,QAAAqE,cAAC4B,EAAAjG,SACCuC,MAAOJ,KAAKK,MAAM4D,KAAKiB,cAAcC,MACrC5E,aAAa,OACbuB,cAAeuC,UAAOe,kBFiP1BrB,GEnRkCtB,UAAMC,UFsRjDlF,GAAQK,QEtRYkG,CA2CrB,IAAMW,GAAW/B,UAAOC,IAAlBtD,EAQiB,SAAAe,GAAA,MAASA,GAAMwC,MAAMwC,cActCR,EAAgBlC,UAAOC,IAAvBrD,EAIO,SAAAc,GAAA,MAASA,GAAMwC,MAAMC,aAIjB,SAAAzC,GAAA,MAASA,GAAMwC,MAAMyC,oBAIzB,SAAAjF,GAAA,MAASA,GAAMwC,MAAM0C,YAEX,SAAAlF,GAAA,MAASA,GAAMwC,MAAMwC,aAGrB,SAAAhF,GAAA,MAASA,GAAMwC,MAAMwC,aAEtB,SAAAhF,GAAA,MAASA,GAAMwC,MAAMC,cAIrC6B,EAAkBhC,UAAOC,IAAzBO,GAMA8B,EAAetC,UAAOC,IAAtBQ,EAGiB,SAAA/C,GAAA,MAASA,GAAMwC,MAAMwC,aAEzB,SAAAhF,GAAA,MAASA,GAAMwC,MAAMC,aAK3BG","file":"component---src-templates-lesson-jsx-1a8b44204d8f2b24e204.js","sourcesContent":["webpackJsonp([112254247690605],{\n\n/***/ 219:\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tvar _templateObject = _taggedTemplateLiteralLoose(['\\n padding: ', '; \\n & > ul, .chapterItems {\\n list-style: none;\\n padding: 0;\\n margin: 0;\\n }\\n \\n p, h6 {\\n display: inline-block;\\n font-weight: 200;\\n margin: 0;\\n }\\n \\n .tocHeading {\\n font-weight: 200;\\n color: ', ';\\n margin-bottom: 10px;\\n }\\n'], ['\\n padding: ', '; \\n & > ul, .chapterItems {\\n list-style: none;\\n padding: 0;\\n margin: 0;\\n }\\n \\n p, h6 {\\n display: inline-block;\\n font-weight: 200;\\n margin: 0;\\n }\\n \\n .tocHeading {\\n font-weight: 200;\\n color: ', ';\\n margin-bottom: 10px;\\n }\\n']),\n\t _templateObject2 = _taggedTemplateLiteralLoose(['\\n h6, p {\\n color: black;\\n margin: 0;\\n line-height: 1.5;\\n }\\n li {\\n margin: 0;\\n }\\n &:hover {\\n li {\\n span {\\n border-bottom: 1px solid black;\\n }\\n }\\n }\\n'], ['\\n h6, p {\\n color: black;\\n margin: 0;\\n line-height: 1.5;\\n }\\n li {\\n margin: 0;\\n }\\n &:hover {\\n li {\\n span {\\n border-bottom: 1px solid black;\\n }\\n }\\n }\\n']);\n\t\n\tvar _react = __webpack_require__(3);\n\t\n\tvar _react2 = _interopRequireDefault(_react);\n\t\n\tvar _gatsbyLink = __webpack_require__(15);\n\t\n\tvar _gatsbyLink2 = _interopRequireDefault(_gatsbyLink);\n\t\n\tvar _styledComponents = __webpack_require__(21);\n\t\n\tvar _styledComponents2 = _interopRequireDefault(_styledComponents);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _taggedTemplateLiteralLoose(strings, raw) { strings.raw = raw; return strings; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\t// This class should not be used for listing posts, but for chapter based Docs. See PostListing for that.\n\t// You'll also need to add your chapters to siteConfig\n\t\n\tvar TableOfContents = function (_React$Component) {\n\t _inherits(TableOfContents, _React$Component);\n\t\n\t function TableOfContents() {\n\t _classCallCheck(this, TableOfContents);\n\t\n\t return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n\t }\n\t\n\t TableOfContents.prototype.buildNodes = function buildNodes() {\n\t var posts = this.props.posts;\n\t\n\t var type = this.props.contentsType;\n\t var postNodes = [];\n\t posts.forEach(function (post) {\n\t if (post.node.frontmatter.type === type) {\n\t var postNode = {\n\t title: post.node.frontmatter.title,\n\t path: '/' + type + '/' + post.node.fields.slug.substring(1),\n\t category: post.node.frontmatter.category,\n\t lessonNumber: post.node.frontmatter.lesson,\n\t chapter: post.node.frontmatter.chapter\n\t };\n\t postNodes.push(postNode);\n\t }\n\t });\n\t\n\t var postNodeChapters = [];\n\t postNodes.forEach(function (post) {\n\t if (postNodeChapters[post.chapter]) {\n\t postNodeChapters[post.chapter].push(post);\n\t } else {\n\t postNodeChapters[post.chapter] = [post];\n\t }\n\t });\n\t\n\t postNodeChapters.forEach(function (chapter) {\n\t chapter.sort(function (a, b) {\n\t return a.lessonNumber > b.lessonNumber;\n\t });\n\t });\n\t return postNodeChapters;\n\t };\n\t\n\t TableOfContents.prototype.nodeListItems = function nodeListItems() {\n\t var postNodeChapters = this.buildNodes();\n\t var listItems = [];\n\t var chapterTitles = this.props.chapterTitles;\n\t postNodeChapters.forEach(function (chapter, idx) {\n\t var chapterLessons = [];\n\t chapter.forEach(function (node, nodeIdx) {\n\t chapterLessons.push(_react2.default.createElement(\n\t LessonContainer,\n\t { key: 'lesson-' + nodeIdx },\n\t _react2.default.createElement(\n\t _gatsbyLink2.default,\n\t { to: node.path },\n\t _react2.default.createElement(\n\t 'li',\n\t null,\n\t _react2.default.createElement(\n\t 'span',\n\t null,\n\t _react2.default.createElement(\n\t 'p',\n\t null,\n\t node.chapter,\n\t '.',\n\t node.lessonNumber,\n\t ' \\xA0'\n\t ),\n\t _react2.default.createElement(\n\t 'h6',\n\t null,\n\t node.title\n\t )\n\t )\n\t )\n\t )\n\t ));\n\t });\n\t listItems.push(_react2.default.createElement(\n\t 'li',\n\t { className: 'chapter', key: idx },\n\t _react2.default.createElement(\n\t 'h5',\n\t { className: 'tocHeading' },\n\t chapterTitles[idx]\n\t ),\n\t _react2.default.createElement(\n\t 'ul',\n\t { className: 'chapterItems' },\n\t chapterLessons\n\t )\n\t ));\n\t });\n\t return listItems;\n\t };\n\t\n\t TableOfContents.prototype.render = function render() {\n\t return _react2.default.createElement(\n\t TableOfContentsContainer,\n\t null,\n\t _react2.default.createElement(\n\t 'ul',\n\t null,\n\t this.nodeListItems()\n\t )\n\t );\n\t };\n\t\n\t return TableOfContents;\n\t}(_react2.default.Component);\n\t\n\tvar TableOfContentsContainer = _styledComponents2.default.div(_templateObject, function (props) {\n\t return props.theme.sitePadding;\n\t}, function (props) {\n\t return props.theme.brand;\n\t});\n\t\n\tvar LessonContainer = _styledComponents2.default.div(_templateObject2);\n\t\n\texports.default = TableOfContents;\n\tmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ 227:\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\texports.pageQuery = undefined;\n\t\n\tvar _templateObject = _taggedTemplateLiteralLoose([' \\n width: 100vw;\\n display: grid; \\n grid-template-areas: \\n \"header\"\\n \"content\"\\n \"nav\"; \\n \\n @media (min-width: ', ') {\\n height: 100vh;\\n grid-template-columns: 300px 1fr;\\n grid-template-rows: 75px 1fr;\\n grid-template-areas: \\n \"header header\" \\n \"nav content\";\\n #nav {\\n display: flex;\\n justify-content: space-between;\\n }\\n }\\n'], [' \\n width: 100vw;\\n display: grid; \\n grid-template-areas: \\n \"header\"\\n \"content\"\\n \"nav\"; \\n \\n @media (min-width: ', ') {\\n height: 100vh;\\n grid-template-columns: 300px 1fr;\\n grid-template-rows: 75px 1fr;\\n grid-template-areas: \\n \"header header\" \\n \"nav content\";\\n #nav {\\n display: flex;\\n justify-content: space-between;\\n }\\n }\\n']),\n\t _templateObject2 = _taggedTemplateLiteralLoose(['\\n grid-area: content; \\n justify-self: center; \\n width: 100%; \\n padding: ', ';\\n padding-bottom: 0;\\n padding-top: 0;\\n & > article {\\n max-width: ', ';\\n margin: auto;\\n } \\n & > h1 {\\n color: ', ';\\n }\\n @media (max-width: ', ') {\\n max-width: 95vw;\\n }\\n @media (min-width: ', ') {\\n overflow: scroll;\\n padding-bottom: ', ';\\n }\\n'], ['\\n grid-area: content; \\n justify-self: center; \\n width: 100%; \\n padding: ', ';\\n padding-bottom: 0;\\n padding-top: 0;\\n & > article {\\n max-width: ', ';\\n margin: auto;\\n } \\n & > h1 {\\n color: ', ';\\n }\\n @media (max-width: ', ') {\\n max-width: 95vw;\\n }\\n @media (min-width: ', ') {\\n overflow: scroll;\\n padding-bottom: ', ';\\n }\\n']),\n\t _templateObject3 = _taggedTemplateLiteralLoose(['\\n grid-area: header;\\n width: 100%; \\n z-index: 2;\\n'], ['\\n grid-area: header;\\n width: 100%; \\n z-index: 2;\\n']),\n\t _templateObject4 = _taggedTemplateLiteralLoose(['\\n grid-area: nav;\\n padding-top: 0\\n @media (min-width: ', ') {\\n overflow: scroll;\\n padding-top: ', ';\\n } \\n'], ['\\n grid-area: nav;\\n padding-top: 0\\n @media (min-width: ', ') {\\n overflow: scroll;\\n padding-top: ', ';\\n } \\n']);\n\t\n\tvar _react = __webpack_require__(3);\n\t\n\tvar _react2 = _interopRequireDefault(_react);\n\t\n\tvar _reactHelmet = __webpack_require__(26);\n\t\n\tvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\t\n\tvar _styledComponents = __webpack_require__(21);\n\t\n\tvar _styledComponents2 = _interopRequireDefault(_styledComponents);\n\t\n\tvar _SEO = __webpack_require__(61);\n\t\n\tvar _SEO2 = _interopRequireDefault(_SEO);\n\t\n\tvar _Header = __webpack_require__(60);\n\t\n\tvar _Header2 = _interopRequireDefault(_Header);\n\t\n\tvar _SiteConfig = __webpack_require__(23);\n\t\n\tvar _SiteConfig2 = _interopRequireDefault(_SiteConfig);\n\t\n\tvar _TableOfContents = __webpack_require__(219);\n\t\n\tvar _TableOfContents2 = _interopRequireDefault(_TableOfContents);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _taggedTemplateLiteralLoose(strings, raw) { strings.raw = raw; return strings; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar LessonTemplate = function (_React$Component) {\n\t _inherits(LessonTemplate, _React$Component);\n\t\n\t function LessonTemplate() {\n\t _classCallCheck(this, LessonTemplate);\n\t\n\t return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n\t }\n\t\n\t LessonTemplate.prototype.render = function render() {\n\t var slug = this.props.pathContext.slug;\n\t\n\t var postNode = this.props.data.postBySlug;\n\t var post = postNode.frontmatter;\n\t if (!post.id) {\n\t post.id = slug;\n\t }\n\t if (!post.id) {\n\t post.category_id = _SiteConfig2.default.postDefaultCategoryID;\n\t }\n\t\n\t return _react2.default.createElement(\n\t 'div',\n\t null,\n\t _react2.default.createElement(\n\t _reactHelmet2.default,\n\t null,\n\t _react2.default.createElement(\n\t 'title',\n\t null,\n\t post.title + ' | ' + _SiteConfig2.default.siteTitle\n\t )\n\t ),\n\t _react2.default.createElement(_SEO2.default, { postPath: slug, postNode: postNode, postSEO: true }),\n\t _react2.default.createElement(\n\t BodyGrid,\n\t null,\n\t _react2.default.createElement(\n\t HeaderContainer,\n\t { className: 'header' },\n\t _react2.default.createElement(_Header2.default, { location: this.props.location })\n\t ),\n\t _react2.default.createElement(\n\t BodyContainer,\n\t { className: 'content' },\n\t _react2.default.createElement(\n\t 'article',\n\t null,\n\t _react2.default.createElement(\n\t 'h1',\n\t null,\n\t post.title\n\t ),\n\t _react2.default.createElement('div', { dangerouslySetInnerHTML: { __html: postNode.html } })\n\t )\n\t ),\n\t _react2.default.createElement(\n\t ToCContainer,\n\t { className: 'nav' },\n\t _react2.default.createElement(_TableOfContents2.default, {\n\t posts: this.props.data.allPostTitles.edges,\n\t contentsType: 'docs',\n\t chapterTitles: _SiteConfig2.default.toCChapters\n\t })\n\t )\n\t )\n\t );\n\t };\n\t\n\t return LessonTemplate;\n\t}(_react2.default.Component);\n\t\n\texports.default = LessonTemplate;\n\t\n\t\n\tvar BodyGrid = _styledComponents2.default.div(_templateObject, function (props) {\n\t return props.theme.widthLaptop;\n\t});\n\t\n\tvar BodyContainer = _styledComponents2.default.div(_templateObject2, function (props) {\n\t return props.theme.sitePadding;\n\t}, function (props) {\n\t return props.theme.contentWidthLaptop;\n\t}, function (props) {\n\t return props.theme.accentDark;\n\t}, function (props) {\n\t return props.theme.widthLaptop;\n\t}, function (props) {\n\t return props.theme.widthLaptop;\n\t}, function (props) {\n\t return props.theme.sitePadding;\n\t});\n\t\n\tvar HeaderContainer = _styledComponents2.default.div(_templateObject3);\n\t\n\tvar ToCContainer = _styledComponents2.default.div(_templateObject4, function (props) {\n\t return props.theme.widthLaptop;\n\t}, function (props) {\n\t return props.theme.sitePadding;\n\t});\n\t\n\t/* eslint no-undef: \"off\" */\n\tvar pageQuery = exports.pageQuery = '** extracted graphql fragment **';\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// component---src-templates-lesson-jsx-1a8b44204d8f2b24e204.js","import React from 'react';\nimport Link from 'gatsby-link';\nimport styled from 'styled-components';\n\n// This class should not be used for listing posts, but for chapter based Docs. See PostListing for that.\n// You'll also need to add your chapters to siteConfig\n\nclass TableOfContents extends React.Component {\n buildNodes () {\n const {posts} = this.props;\n const type = this.props.contentsType;\n const postNodes = [];\n posts.forEach(post => {\n if (post.node.frontmatter.type === type) {\n const postNode = {\n title: post.node.frontmatter.title,\n path: `/${type}/${post.node.fields.slug.substring(1)}`,\n category: post.node.frontmatter.category,\n lessonNumber: post.node.frontmatter.lesson,\n chapter: post.node.frontmatter.chapter\n };\n postNodes.push(postNode);\n }\n });\n\n const postNodeChapters = [];\n postNodes.forEach(post => {\n if (postNodeChapters[post.chapter]) {\n postNodeChapters[post.chapter].push(post);\n } else {\n postNodeChapters[post.chapter] = [post];\n }\n });\n\n postNodeChapters.forEach(chapter => {\n chapter.sort((a, b) => a.lessonNumber > b.lessonNumber);\n });\n return postNodeChapters;\n }\n\n nodeListItems () {\n const postNodeChapters = this.buildNodes();\n const listItems = [];\n const chapterTitles = this.props.chapterTitles;\n postNodeChapters.forEach((chapter, idx) => {\n const chapterLessons = [];\n chapter.forEach((node, nodeIdx) => {\n chapterLessons.push(\n <LessonContainer key={'lesson-' + nodeIdx}>\n <Link to={node.path}>\n <li>\n <span>\n <p>{node.chapter}.{node.lessonNumber} </p>\n <h6>{node.title}</h6>\n </span>\n </li>\n </Link>\n </LessonContainer>\n );\n });\n listItems.push(\n <li className='chapter' key={idx}>\n <h5 className='tocHeading'>\n {chapterTitles[idx]}\n </h5>\n <ul className='chapterItems'>\n {chapterLessons}\n </ul>\n </li>\n );\n });\n return listItems;\n }\n\n render () {\n return (\n <TableOfContentsContainer>\n <ul>\n {this.nodeListItems()}\n </ul>\n </TableOfContentsContainer>\n );\n }\n}\n\nconst TableOfContentsContainer = styled.div`\n padding: ${props => props.theme.sitePadding}; \n & > ul, .chapterItems {\n list-style: none;\n padding: 0;\n margin: 0;\n }\n \n p, h6 {\n display: inline-block;\n font-weight: 200;\n margin: 0;\n }\n \n .tocHeading {\n font-weight: 200;\n color: ${props => props.theme.brand};\n margin-bottom: 10px;\n }\n`;\n\nconst LessonContainer = styled.div`\n h6, p {\n color: black;\n margin: 0;\n line-height: 1.5;\n }\n li {\n margin: 0;\n }\n &:hover {\n li {\n span {\n border-bottom: 1px solid black;\n }\n }\n }\n`;\n\nexport default TableOfContents;\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/Layout/TableOfContents.jsx","import React from 'react';\nimport Helmet from 'react-helmet';\nimport styled from 'styled-components';\n\nimport SEO from '../components/SEO/SEO';\nimport SiteHeader from '../components/Layout/Header';\nimport config from '../../data/SiteConfig';\nimport TableOfContents from '../components/Layout/TableOfContents';\n\nexport default class LessonTemplate extends React.Component {\n render () {\n const { slug } = this.props.pathContext;\n const postNode = this.props.data.postBySlug;\n const post = postNode.frontmatter;\n if (!post.id) {\n post.id = slug;\n }\n if (!post.id) {\n post.category_id = config.postDefaultCategoryID;\n }\n\n return (\n <div>\n <Helmet>\n <title>{`${post.title} | ${config.siteTitle}`}</title>\n </Helmet>\n <SEO postPath={slug} postNode={postNode} postSEO />\n <BodyGrid>\n <HeaderContainer className='header'>\n <SiteHeader location={this.props.location} />\n </HeaderContainer>\n <BodyContainer className='content'>\n <article>\n <h1>\n {post.title}\n </h1>\n <div dangerouslySetInnerHTML={{ __html: postNode.html }} />\n </article>\n </BodyContainer>\n <ToCContainer className='nav'>\n <TableOfContents\n posts={this.props.data.allPostTitles.edges}\n contentsType='docs'\n chapterTitles={config.toCChapters}\n />\n </ToCContainer>\n </BodyGrid>\n </div>\n );\n }\n}\n\nconst BodyGrid = styled.div` \n width: 100vw;\n display: grid; \n grid-template-areas: \n \"header\"\n \"content\"\n \"nav\"; \n \n @media (min-width: ${props => props.theme.widthLaptop}) {\n height: 100vh;\n grid-template-columns: 300px 1fr;\n grid-template-rows: 75px 1fr;\n grid-template-areas: \n \"header header\" \n \"nav content\";\n #nav {\n display: flex;\n justify-content: space-between;\n }\n }\n`;\n\nconst BodyContainer = styled.div`\n grid-area: content; \n justify-self: center; \n width: 100%; \n padding: ${props => props.theme.sitePadding};\n padding-bottom: 0;\n padding-top: 0;\n & > article {\n max-width: ${props => props.theme.contentWidthLaptop};\n margin: auto;\n } \n & > h1 {\n color: ${props => props.theme.accentDark};\n }\n @media (max-width: ${props => props.theme.widthLaptop}) {\n max-width: 95vw;\n }\n @media (min-width: ${props => props.theme.widthLaptop}) {\n overflow: scroll;\n padding-bottom: ${props => props.theme.sitePadding};\n }\n`;\n\nconst HeaderContainer = styled.div`\n grid-area: header;\n width: 100%; \n z-index: 2;\n`;\n\nconst ToCContainer = styled.div`\n grid-area: nav;\n padding-top: 0\n @media (min-width: ${props => props.theme.widthLaptop}) {\n overflow: scroll;\n padding-top: ${props => props.theme.sitePadding};\n } \n`;\n\n/* eslint no-undef: \"off\" */\nexport const pageQuery = graphql`\n query LessonBySlug($slug: String!, $category: String!) {\n allPostTitles: allMarkdownRemark(\n sort: { order: ASC, fields: [frontmatter___lesson, frontmatter___chapter]},\n filter: { frontmatter: { category:{ eq: $category }}}){\n edges {\n node {\n frontmatter {\n title\n lesson\n category\n chapter\n type\n }\n fields {\n slug\n }\n }\n }\n }\n postBySlug: markdownRemark(fields: { slug: { eq: $slug } }, frontmatter: { category: { eq: $category }}) {\n html\n timeToRead\n excerpt\n frontmatter {\n title\n cover\n date\n category\n tags\n }\n fields {\n slug\n }\n } \n }\n`;\n\n\n\n// WEBPACK FOOTER //\n// ./src/templates/lesson.jsx"],"sourceRoot":""}