output test network version number

This commit is contained in:
Matthias Kretschmann 2018-04-10 15:43:38 +02:00
parent e0fc4c40c9
commit 5dad5ffa59
Signed by: m
GPG Key ID: 606EEEF3C479A91F
5 changed files with 37 additions and 7 deletions

View File

@ -45,6 +45,31 @@ function stickyNav() {
stickyNav()
//
// Test network version
//
function testNetworkVersion() {
const versionOutput = document.getElementById('network-version')
fetch(bigchaindbUrl)
.then(function(response) {
return response.json()
})
.then(function(data) {
const version = data.version
const titleOrig = versionOutput.getAttribute('title')
versionOutput.innerText = version
versionOutput.setAttribute('title', titleOrig + version)
})
.catch(function(error) {
console.log(error)
})
}
testNetworkVersion()
//
// BigchainDB transaction tool
//

View File

@ -141,7 +141,6 @@
height: 3rem;
border-radius: 50%;
font-size: $font-size-lg;
vertical-align: .4rem;
background: $headings-color;
color: $gray;
font-weight: 400;
@ -152,6 +151,7 @@
span {
display: inline-block;
margin: 0;
vertical-align: .4rem;
}
}
@ -178,6 +178,7 @@
}
}
//
// All your star bases belong to us
//
@ -272,6 +273,13 @@
}
}
.choice__title__version {
font-size: $font-size-sm;
color: $gray-light;
font-family: $font-family-base;
font-weight: $font-weight-base;
}
.choice__title--community {
text-align: center;

View File

@ -313,7 +313,7 @@
margin-right: $spacer;
&:after {
background: darken($gray-dark, 10%);
display: none;
}
&.active {
@ -375,10 +375,6 @@
background: $headings-color;
color: $gray;
}
&:after {
background: $headings-color;
}
}
}
}

View File

@ -23,6 +23,7 @@ server:
network:
pretitle: "Managed"
title: "The BigchainDB Test Network"
version_title: "Test Network is currently running on BigchainDB "
description: "No installation needed. Sign up and connect instantly, we will handle running a BigchainDB network for you."
button: "Sign up"
link: "https://testnet.bigchaindb.com"

View File

@ -162,7 +162,7 @@ conn.postTransactionSync(txSigned)
<div class="grid grid--full grid-small--half grid--gutters">
<div class="grid__col">
<span class="pretitle">{{ content.server.network.pretitle }}</span>
<h2 class="choice__title">{{ content.server.network.title }}</h2>
<h2 class="choice__title">{{ content.server.network.title }} <span class="choice__title__version" id="network-version" title="{{ content.server.network.version_title }}"></span></h2>
<p>{{ content.server.network.description }}</p>
<a class="btn btn-primary" href="{{ content.server.network.link }}">{{ content.server.network.button }}</a>
</div>