1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00

add past versions linking to swaggerhub

This commit is contained in:
Matthias Kretschmann 2019-04-17 13:36:30 +02:00
parent dfe712516b
commit c5c143f2ae
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 18 additions and 3 deletions

View File

@ -173,6 +173,7 @@ exports.createPages = ({ graphql, actions }) => {
component: apiSwaggerTemplate, component: apiSwaggerTemplate,
context: { context: {
slug: slugAquarius, slug: slugAquarius,
name: swaggerComponents[0],
api: specAquarius api: specAquarius
} }
}) })
@ -185,6 +186,7 @@ exports.createPages = ({ graphql, actions }) => {
component: apiSwaggerTemplate, component: apiSwaggerTemplate,
context: { context: {
slug: slugBrizo, slug: slugBrizo,
name: swaggerComponents[1],
api: specBrizo api: specBrizo
} }
}) })

View File

@ -50,9 +50,17 @@
} }
.version { .version {
color: $brand-grey-light;
font-size: $font-size-base; font-size: $font-size-base;
font-family: $font-family-monospace; font-family: $font-family-monospace;
color: $brand-grey-light;
a {
font-size: $font-size-mini;
font-family: $font-family-base;
font-weight: $font-weight-base;
display: inline-block;
margin-left: .5rem;
}
} }
.pathName { .pathName {

View File

@ -69,7 +69,7 @@ export default class ApiSwaggerTemplate extends Component {
render() { render() {
const { location, pageContext } = this.props const { location, pageContext } = this.props
const { api } = pageContext const { api, name } = pageContext
const { host, basePath, info, paths } = api const { host, basePath, info, paths } = api
const { title, description, version, license, contact } = info const { title, description, version, license, contact } = info
@ -106,7 +106,12 @@ export default class ApiSwaggerTemplate extends Component {
description={description} description={description}
prepend={ prepend={
<span className={stylesDoc.version}> <span className={stylesDoc.version}>
{version} <span>v{version}</span>
<a
href={`https://app.swaggerhub.com/apis/Ocean-Protocol/${name}`}
>
past versions
</a>
</span> </span>
} }
/> />