{
+ const { title } = data.site.siteMetadata
+ const sections = data.allSectionsYaml.edges
+
+ return (
+
+ )
+ }}
+ />
)
Header.propTypes = {
diff --git a/src/components/Header.module.scss b/src/components/Header.module.scss
index 7f6b40bb..9cbbf6d5 100644
--- a/src/components/Header.module.scss
+++ b/src/components/Header.module.scss
@@ -1,7 +1,8 @@
@import 'variables';
.header {
- background: $brand-black;
+ background: $brand-black url('@oceanprotocol/art/jellyfish/jellyfish-back@2x.png') no-repeat center -4rem;
+ background-size: cover;
width: 100%;
padding: $spacer / 2 0;
padding-right: $spacer / 1.5;
@@ -48,3 +49,15 @@
.headerMenu {
justify-self: flex-end;
}
+
+.section {
+ display: inline-block;
+ margin: 0 $spacer / 2;
+ font-family: $font-family-button;
+ color: $brand-grey-light;
+
+ &:hover,
+ &:focus {
+ color: $brand-white;
+ }
+}
diff --git a/src/components/HeaderHome.module.scss b/src/components/HeaderHome.module.scss
index 59887628..01f6acc5 100644
--- a/src/components/HeaderHome.module.scss
+++ b/src/components/HeaderHome.module.scss
@@ -2,7 +2,8 @@
@import 'animations';
.header {
- background: $brand-black;
+ background: $brand-black url('@oceanprotocol/art/jellyfish/jellyfish-back@2x.png') no-repeat center 7rem;
+ background-size: cover;
width: 100%;
padding: $spacer * 2 0;
min-height: 30rem;
diff --git a/src/components/HeaderSection.jsx b/src/components/HeaderSection.jsx
index 536a05a0..2c7a8fcf 100644
--- a/src/components/HeaderSection.jsx
+++ b/src/components/HeaderSection.jsx
@@ -1,18 +1,24 @@
import React from 'react'
import PropTypes from 'prop-types'
+import { Link } from 'gatsby'
import Content from './Content'
import styles from './HeaderSection.module.scss'
const HeaderSection = ({ title }) => (
- {title}
+
+
+ /
+
+ {title}
+
)
HeaderSection.propTypes = {
- title: PropTypes.string
+ title: PropTypes.array
}
export default HeaderSection
diff --git a/src/components/HeaderSection.module.scss b/src/components/HeaderSection.module.scss
index d8b06daf..b5fa8cd8 100644
--- a/src/components/HeaderSection.module.scss
+++ b/src/components/HeaderSection.module.scss
@@ -1,12 +1,17 @@
@import 'variables';
.headerSection {
- padding: $spacer / 2 0;
+ padding: $spacer 0;
border-bottom: .1rem solid $brand-grey-lighter;
}
.headerSectionTitle {
margin: 0;
- font-size: $font-size-large;
+ font-size: $font-size-h4;
color: $brand-grey-light;
}
+
+.rootLink {
+ display: inline-block;
+ margin-right: $spacer / 4;
+}
diff --git a/src/components/Layout.jsx b/src/components/Layout.jsx
index 7ee73d85..f6b0a172 100755
--- a/src/components/Layout.jsx
+++ b/src/components/Layout.jsx
@@ -1,32 +1,17 @@
import React from 'react'
import PropTypes from 'prop-types'
-import { StaticQuery, graphql } from 'gatsby'
import Header from './Header'
-const Layout = ({ children, header }) => (
- {
- const { title } = data.site.siteMetadata
- const headerElement = header ||
+const Layout = ({ children, header }) => {
+ const headerElement = header ||
- return (
- <>
- {headerElement}
- {children}
- >
- )
- }}
- />
-)
+ return (
+ <>
+ {headerElement}
+ {children}
+ >
+ )
+}
Layout.propTypes = {
children: PropTypes.node.isRequired,
diff --git a/src/templates/Doc.jsx b/src/templates/Doc.jsx
index 0850362c..a4681dea 100644
--- a/src/templates/Doc.jsx
+++ b/src/templates/Doc.jsx
@@ -16,12 +16,22 @@ export default class DocTemplate extends Component {
render() {
const { location } = this.props
const post = this.props.data.markdownRemark
+ const sections = this.props.data.allSectionsYaml.edges
const { section } = post.fields
const { title, description } = post.frontmatter
+ // output section title as defined in sections.yml
+ const sectionTitle = sections.map(({ node }) => {
+ // compare section against section title from sections.yml
+ if (node.title.toLowerCase().includes(section)) {
+ return node.title
+ }
+ })
+
return (
-
+
+
{section ? (
@@ -79,6 +89,7 @@ export const pageQuery = graphql`
title
}
}
+
markdownRemark(fields: { slug: { eq: $slug } }) {
id
excerpt
@@ -91,5 +102,15 @@ export const pageQuery = graphql`
section
}
}
+
+ allSectionsYaml {
+ edges {
+ node {
+ title
+ description
+ link
+ }
+ }
+ }
}
`