diff --git a/src/components/DocFooter.jsx b/src/components/DocFooter.jsx new file mode 100644 index 000000000..5365322ba --- /dev/null +++ b/src/components/DocFooter.jsx @@ -0,0 +1,21 @@ +import React from 'react' +import PropTypes from 'prop-types' +import { ReactComponent as Pencil } from '../images/pencil.svg' +import styles from './DocFooter.module.scss' + +const githubContentPath = + 'https://github.com/oceanprotocol/docs/blob/master/content' + +const DocFooter = ({ post }) => ( + +) + +DocFooter.propTypes = { + post: PropTypes.object.isRequired +} + +export default DocFooter diff --git a/src/components/DocFooter.module.scss b/src/components/DocFooter.module.scss new file mode 100644 index 000000000..8376a7adb --- /dev/null +++ b/src/components/DocFooter.module.scss @@ -0,0 +1,30 @@ +@import 'variables'; + +.footer { + margin-top: $spacer; + padding-top: $spacer; + margin-bottom: $spacer; + padding-bottom: $spacer; + border-top: .1rem solid $brand-grey-lighter; + font-size: $font-size-small; + text-align: center; + + a { + font-family: $font-family-button; + text-transform: uppercase; + color: $brand-grey-light; + margin: 0 $spacer / 2; + + &:hover, + &:focus { + color: $brand-pink; + } + + svg { + display: inline-block; + margin-right: $spacer / 10; + margin-bottom: -1px; + fill: $brand-grey-light; + } + } +} diff --git a/src/images/pencil.svg b/src/images/pencil.svg new file mode 100644 index 000000000..9a0ed66c4 --- /dev/null +++ b/src/images/pencil.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/templates/Doc.jsx b/src/templates/Doc.jsx index a4681dea4..9f528ebfe 100644 --- a/src/templates/Doc.jsx +++ b/src/templates/Doc.jsx @@ -5,6 +5,7 @@ import Layout from '../components/Layout' import Content from '../components/Content' import HeaderSection from '../components/HeaderSection' import Sidebar from '../components/Sidebar' +import DocFooter from '../components/DocFooter' import styles from './Doc.module.scss' export default class DocTemplate extends Component { @@ -57,6 +58,8 @@ export default class DocTemplate extends Component { __html: post.html }} /> + + ) : ( @@ -74,6 +77,8 @@ export default class DocTemplate extends Component { __html: post.html }} /> + + )} @@ -94,6 +99,7 @@ export const pageQuery = graphql` id excerpt html + fileAbsolutePath frontmatter { title description @@ -101,6 +107,7 @@ export const pageQuery = graphql` fields { section } + ...PageFooter } allSectionsYaml { @@ -113,4 +120,12 @@ export const pageQuery = graphql` } } } + + fragment PageFooter on MarkdownRemark { + parent { + ... on File { + relativePath + } + } + } `