From c33143d4ce7d6d57f9b29a432f32452f600e0c1d Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Wed, 27 Mar 2019 14:47:25 +0100 Subject: [PATCH] output namespace --- gatsby-node.js | 5 ++++- src/templates/Doc.module.scss | 2 +- src/templates/Javadoc/index.jsx | 13 +++++++++---- src/templates/Javadoc/index.module.scss | 11 +++++++++++ 4 files changed, 25 insertions(+), 6 deletions(-) diff --git a/gatsby-node.js b/gatsby-node.js index 8e129f8d..01abbb82 100755 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -296,7 +296,10 @@ exports.createPages = ({ graphql, actions }) => { description: `${metaSquidJava.name._text}. ${ metaSquidJava.description._text }.`, - version: metaSquidJava.version._text + version: metaSquidJava.version._text, + namespace: `${metaSquidJava.groupId._text}.${ + metaSquidJava.artifactId._text + }` } }) }) diff --git a/src/templates/Doc.module.scss b/src/templates/Doc.module.scss index db6eee3c..49eb817b 100644 --- a/src/templates/Doc.module.scss +++ b/src/templates/Doc.module.scss @@ -60,5 +60,5 @@ border-bottom: 1px solid $brand-grey-lighter; padding-bottom: $spacer / 2; margin-top: $spacer * 2; - margin-bottom: $spacer; + margin-bottom: $spacer / $line-height; } diff --git a/src/templates/Javadoc/index.jsx b/src/templates/Javadoc/index.jsx index 7bb0e4c5..81a05115 100644 --- a/src/templates/Javadoc/index.jsx +++ b/src/templates/Javadoc/index.jsx @@ -96,7 +96,7 @@ export default class JavadocTemplate extends Component { render() { const { location, pageContext } = this.props - const { javadoc, title, description, version } = pageContext + const { javadoc, title, description, version, namespace } = pageContext return ( <> @@ -130,9 +130,14 @@ export default class JavadocTemplate extends Component { title={title} description={description} prepend={ - - {version} - + <> + + {version} + +

+ {namespace} +

+ } /> diff --git a/src/templates/Javadoc/index.module.scss b/src/templates/Javadoc/index.module.scss index 03c9cfc0..ac94e138 100644 --- a/src/templates/Javadoc/index.module.scss +++ b/src/templates/Javadoc/index.module.scss @@ -5,6 +5,10 @@ border: 1px solid $brand-grey-lighter; margin-bottom: $spacer; border-radius: $border-radius; + + > p { + margin-bottom: $spacer; + } } .subHeading { @@ -21,3 +25,10 @@ margin-bottom: $spacer / 2; margin-top: 0; } + +.namespace { + font-size: $font-size-base; + font-family: $font-family-monospace; + color: $brand-grey-light; + margin-top: $spacer / $line-height; +}