-
Notifications
You must be signed in to change notification settings - Fork 1
/
component---src-templates-markdown-js-9691602b178138a70ea9.js.map
1 lines (1 loc) · 6.82 KB
/
component---src-templates-markdown-js-9691602b178138a70ea9.js.map
1
{"version":3,"sources":["webpack:///./src/components/header.js","webpack:///./src/components/layout.js","webpack:///./src/components/footer.js","webpack:///./src/components/sidebar.js","webpack:///./src/templates/markdown.js"],"names":["Header","siteTitle","menuLinks","className","to","map","link","key","name","activeClassName","header_links","defaultProps","Layout","children","data","useStaticQuery","site","siteMetadata","title","Footer","Date","getFullYear","Sidebar","links","item","idx","href","preprocessHeading","h","word","value","replace","split","join","depth","id","Markdown","markdownRemark","frontmatter","html","headings","indexOf","date","dangerouslySetInnerHTML","__html","author","length"],"mappings":"iSAqBMA,G,oBAAS,SAAC,GAAD,IAAGC,EAAH,EAAGA,UAAWC,EAAd,EAAcA,UAAd,OACb,4BAAQC,UAAU,UAChB,+BAAQF,GACR,6BACE,6BACE,wBAAIE,UAAU,cACZ,kBAAC,OAAD,CAAMC,GAAG,KAAKH,IAEhB,6BAtBa,SAAAC,GACnB,OACE,4BACGA,EAAUG,KAAI,SAAAC,GAAI,OACjB,wBAAIC,IAAKD,EAAKE,KAAML,UAAU,QAC5B,kBAAC,OAAD,CAAMC,GAAIE,EAAKA,KAAMG,gBAAgB,UAClCH,EAAKE,WAgBJE,CAAaR,SAU3BF,EAAOW,aAAe,CACpBV,UAAU,IAGGD,QCAAY,EAnCA,SAAC,GAAkB,IAAD,IAAfC,EAAe,EAAfA,SACVC,EAAOC,yBAAe,cAc5B,OACE,oCACE,yBAAKZ,UAAU,QACb,kBAAC,EAAD,CACEF,WAAW,UAAAa,EAAKE,KAAKC,oBAAV,eAAwBC,QAAxB,QACXhB,UAAS,UAAEY,EAAKE,KAAKC,oBAAZ,aAAE,EAAwBf,YAErC,yBAAKC,UAAU,gBACb,8BAAOU,IAET,kBAAC,EAAD,SCvBOM,EARA,WACb,OACE,yBAAKhB,UAAU,UACb,sCAAW,IAAIiB,MAAOC,cAAtB,kCCmBSC,EArBC,SAAC,GAAe,IAAbC,EAAY,EAAZA,MACjB,OACE,yBAAKpB,UAAU,WAEb,yBAAKA,UAAU,iBACZoB,EAAMlB,KAAI,SAACmB,EAAMC,GAAP,OACT,yBAAKlB,IAAKkB,EAAM,IACd,uBAAGC,KAAMF,EAAKlB,KAAMC,IAAKkB,GACtBD,EAAKhB,c,yDCXpB,oFAKMmB,EAAoB,SAAAC,GACxB,IAAIC,EAAOD,EAAEE,MAAMC,QAAQ,YAAa,IAExC,OADAF,EAAOA,EAAKG,MAAM,KAAKC,KAAK,KACrB,CACLC,MAAON,EAAEM,MACTJ,MAAOF,EAAEE,MACTK,GAAG,IAAKN,IAWG,SAASO,EAAT,GAA6B,IAClCC,EADiC,EAARvB,KACzBuB,eACAC,EAAsBD,EAAtBC,YAAaC,EAASF,EAATE,KAGfhB,EAFWc,EAAeG,SAASnC,IAAIsB,GAEtBtB,KAAI,SAAAmB,GACzB,MAAO,CACLhB,MAdaA,EAcIgB,EAAKM,OAbC,IAAvBtB,EAAKiC,QAAQ,KACRjC,EAAKwB,MAAM,KAAK,GAAK,IAEvBxB,EAAKwB,MAAM,KAAK,IAWnB1B,KAAMkB,EAAKW,IAfE,IAAA3B,KAkBjB,OACE,kBAAC,IAAD,KACE,kBAAC,IAAD,CAASe,MAAOA,IAChB,yBAAKpB,UAAU,YACb,iCACE,4BAAKmC,EAAYpB,OACjB,2BAAIoB,EAAYI,MAEhB,yBACEvC,UAAU,mBACVwC,wBAAyB,CAAEC,OAAQL,MAGtCD,EAAYO,OAAOC,OAAS,GAC3B,6BAAS3C,UAAU,gBACjB,6CACCmC,EAAYO,OAAOxC,KAAI,SAACwC,EAAQpB,GAAT,OACtB,wBAAIlB,IAAKkB,GACNoB,EADH,IACYpB,EAAM,IAAMa,EAAYO,OAAOC,OAAS,MAAQ","file":"component---src-templates-markdown-js-9691602b178138a70ea9.js","sourcesContent":["import React from \"react\"\nimport { Link } from \"gatsby\"\nimport PropTypes from \"prop-types\"\n\nimport \"normalize.css\"\nimport \"../styles/styles.scss\"\n\nconst header_links = menuLinks => {\n return (\n <ul>\n {menuLinks.map(link => (\n <li key={link.name} className=\"link\">\n <Link to={link.link} activeClassName=\"active\">\n {link.name}\n </Link>\n </li>\n ))}\n </ul>\n )\n}\n\nconst Header = ({ siteTitle, menuLinks }) => (\n <header className=\"header\">\n <title>{siteTitle}</title>\n <div>\n <div>\n <h1 className=\"site-title\">\n <Link to=\"/\">{siteTitle}</Link>\n </h1>\n <div>{header_links(menuLinks)}</div>\n </div>\n </div>\n </header>\n)\n\nHeader.propTypes = {\n siteTitle: PropTypes.string,\n}\n\nHeader.defaultProps = {\n siteTitle: ``,\n}\n\nexport default Header\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { useStaticQuery, graphql } from \"gatsby\"\nimport \"normalize.css\"\n\nimport { Header, Footer } from \"./\"\nimport \"../styles/styles.scss\"\n\nconst Layout = ({ children }) => {\n const data = useStaticQuery(graphql`\n query SiteTitleQuery {\n site {\n siteMetadata {\n title\n menuLinks {\n name\n link\n }\n }\n }\n }\n `)\n\n return (\n <>\n <div className=\"site\">\n <Header\n siteTitle={data.site.siteMetadata?.title || `Title`}\n menuLinks={data.site.siteMetadata?.menuLinks}\n />\n <div className=\"site-content\">\n <main>{children}</main>\n </div>\n <Footer />\n </div>\n </>\n )\n}\n\nLayout.propTypes = {\n children: PropTypes.node.isRequired,\n}\n\nexport default Layout\n","import React from \"react\"\n\nconst Footer = () => {\n return (\n <div className=\"footer\">\n <footer>© {new Date().getFullYear()} - Team110 - Chapel Hill, NC</footer>\n </div>\n )\n}\n\nexport default Footer\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\n\nconst Sidebar = ({ links }) => {\n return (\n <div className=\"sidebar\">\n {/* <h3>Overview</h3> */}\n <div className=\"sidebar-links\">\n {links.map((item, idx) => (\n <div key={idx + 20}>\n <a href={item.link} key={idx}>\n {item.name}\n </a>\n </div>\n ))}\n </div>\n </div>\n )\n}\n\nSidebar.propTypes = {\n links: PropTypes.array,\n}\n\nexport default Sidebar\n","import React from \"react\"\nimport { graphql } from \"gatsby\"\n\nimport { Layout, Sidebar } from \"../components/\"\n\nconst preprocessHeading = h => {\n let word = h.value.replace(/[^\\w\\s]/gi, \"\")\n word = word.split(\" \").join(\"-\")\n return {\n depth: h.depth,\n value: h.value,\n id: `#${word}`,\n }\n}\n\nconst formatName = name => {\n if (name.indexOf(\"?\") !== -1) {\n return name.split(\"?\")[0] + \"?\"\n }\n return name.split(\":\")[0]\n}\n\nexport default function Markdown({ data }) {\n const { markdownRemark } = data\n const { frontmatter, html } = markdownRemark\n const headings = markdownRemark.headings.map(preprocessHeading)\n\n const links = headings.map(item => {\n return {\n name: formatName(item.value),\n link: item.id,\n }\n })\n return (\n <Layout>\n <Sidebar links={links} />\n <div className=\"markdown\">\n <section>\n <h1>{frontmatter.title}</h1>\n <p>{frontmatter.date}</p>\n\n <div\n className=\"markdown-content\"\n dangerouslySetInnerHTML={{ __html: html }}\n />\n </section>\n {frontmatter.author.length > 0 && (\n <section className=\"contributors\">\n <h4>Contributors:</h4>\n {frontmatter.author.map((author, idx) => (\n <li key={idx}>\n {author} {idx + 1 !== frontmatter.author.length ? \" |\" : \"\"}\n </li>\n ))}\n </section>\n )}\n </div>\n </Layout>\n )\n}\n\nexport const pageQuery = graphql`\n query($slug: String!) {\n markdownRemark(frontmatter: { slug: { eq: $slug } }) {\n html\n headings {\n depth\n value\n }\n frontmatter {\n date(formatString: \"MMMM DD, YYYY\")\n slug\n title\n author\n }\n }\n }\n`\n"],"sourceRoot":""}