-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
35 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from 'react'; | ||
import './BreadcrumbBar.scss'; | ||
|
||
const BreadcrumbBar = () => { | ||
return <div className="breadcrumbBar">hey</div>; | ||
}; | ||
|
||
export default BreadcrumbBar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.breadcrumbBar { | ||
background: rgb(202, 201, 201); | ||
height: 50px; | ||
width: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 17 additions & 12 deletions
29
src/templates/example-template.js → src/templates/GuideTemplate.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,42 @@ | ||
import React from 'react'; | ||
import { graphql } from 'gatsby'; | ||
import PropTypes from 'prop-types'; | ||
import Layout from '../components/Layout'; | ||
import BreadcrumbBar from '../components/BreadcrumbBar'; | ||
|
||
export default function Template({ | ||
export default function GuideTemplate({ | ||
data, // this prop will be injected by the GraphQL query below. | ||
}) { | ||
const { markdownRemark } = data; // data.markdownRemark holds your post data | ||
const { frontmatter, html } = markdownRemark; | ||
return ( | ||
<div className="doc-container"> | ||
<div className="doc"> | ||
<h1>{frontmatter.title}</h1> | ||
<h2>{frontmatter.date}</h2> | ||
<div | ||
className="doc-content" | ||
dangerouslySetInnerHTML={{ __html: html }} | ||
/> | ||
<Layout> | ||
<BreadcrumbBar /> | ||
<div className="guideTemplate-container"> | ||
<div> | ||
<h1>{frontmatter.title}</h1> | ||
<h2>{frontmatter.duration}</h2> | ||
<div | ||
className="guideTemplate-content" | ||
dangerouslySetInnerHTML={{ __html: html }} | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
</Layout> | ||
); | ||
} | ||
export const pageQuery = graphql` | ||
query($path: String!) { | ||
markdownRemark(frontmatter: { path: { eq: $path } }) { | ||
html | ||
frontmatter { | ||
date(formatString: "MMMM DD, YYYY") | ||
duration | ||
path | ||
title | ||
} | ||
} | ||
} | ||
`; | ||
Template.propTypes = { | ||
GuideTemplate.propTypes = { | ||
data: PropTypes.object, | ||
}; |
Empty file.