1
0
mirror of https://github.com/bigchaindb/site.git synced 2024-11-21 17:26:55 +01:00

Merge pull request #249 from bigchaindb/fix/gumshoe

Fix get started page navigation
This commit is contained in:
Matthias Kretschmann 2018-06-25 13:33:47 +02:00 committed by GitHub
commit 5f54600271
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 16 deletions

View File

@ -1,6 +1,6 @@
language: ruby
rvm:
- 2.4
- 2.5
cache:
bundler: true
@ -8,7 +8,7 @@ cache:
- $TRAVIS_BUILD_DIR/node_modules
before_install:
- nvm install 9
- nvm install 10
- pip install --user awscli
- export PATH=$PATH:$HOME/.local/bin

View File

@ -1,4 +1,4 @@
//=require gumshoe/dist/js/gumshoe.js
//=include gumshoejs/dist/js/gumshoe.js
//=include bigchain/tab.js
//=include bigchain/newsletter.js
@ -7,7 +7,7 @@ const bigchaindbUrl = 'https://test.bigchaindb.com'
const proxyUrl = 'https://getstarted.bigchaindb.com'
const apiPath = '/api/v1/'
jQuery(function($) {
jQuery(function ($) {
//
// init modules
@ -29,10 +29,10 @@ gumshoe.init()
function stickyNav() {
const menu = document.getElementsByClassName('menu--sub')[0]
if ( window.innerWidth >= 768 ) {
if (window.innerWidth >= 768) {
const offset = menu.offsetTop
window.addEventListener('scroll', function() {
window.addEventListener('scroll', function () {
if (offset < window.pageYOffset) {
menu.classList.add('sticky')
} else {
@ -52,17 +52,17 @@ function testNetworkVersion() {
const versionOutput = document.getElementById('network-version')
fetch(bigchaindbUrl)
.then(function(response) {
.then(function (response) {
return response.json()
})
.then(function(data) {
.then(function (data) {
const version = data.version
const titleOrig = versionOutput.getAttribute('title')
versionOutput.innerText = version
versionOutput.setAttribute('title', titleOrig + version)
})
.catch(function(error) {
.catch(function (error) {
console.log(error)
})
}
@ -106,13 +106,13 @@ window.addEventListener('DOMContentLoaded', function domload(event) {
const codeMessages = document.querySelectorAll('.code-example__message')
const escapedContent = content.replace(/'/g, "\\'")
codeMessages.forEach(function(codeMessage) {
codeMessages.forEach(function (codeMessage) {
codeMessage.textContent = escapedContent
})
}
// quick form validation, live update code example with user input
messageInput.addEventListener('input', function() {
messageInput.addEventListener('input', function () {
if (messageInput.value === '') {
postButton.setAttribute('disabled', '')
// empty message
@ -142,7 +142,7 @@ window.addEventListener('DOMContentLoaded', function domload(event) {
postButton.innerHTML = postButtonText
}
postButton.addEventListener('click', function(e) {
postButton.addEventListener('click', function (e) {
e.preventDefault()
buttonStateLoading()

View File

@ -159,7 +159,7 @@ export const html = () => src(DIST + '/**/*.html')
export const css = () => src(SRC + '/_assets/styles/bigchain.scss')
.pipe($.if(!(isProduction || isStaging), $.sourcemaps.init()))
.pipe($.sass({
includePaths: ['node_modules']
includePaths: [__dirname + '/node_modules']
}).on('error', $.sass.logError))
.pipe($.autoprefixer())
.pipe($.if(isProduction || isStaging, $.cleanCss()))

View File

@ -7,7 +7,7 @@
},
"description": "Landing page for BigchainDB",
"homepage": "https://www.bigchaindb.com",
"license": "(c) 2017 BigchainDB - All Rights Reserved",
"license": "Apache-2.0",
"main": "gulpfile.babel.js",
"scripts": {
"start": "gulp",
@ -28,7 +28,6 @@
"bootstrap": "^4.1.1",
"clipboard": "^2.0.1",
"cookies-eu-banner": "^1.2.14",
"gumshoe": "github:cferdinandi/gumshoe",
"gumshoejs": "github:cferdinandi/gumshoe",
"is-in-viewport": "^3.0.4",
"jquery": "^3.3.1",
@ -51,7 +50,7 @@
"critical": "^1.3.3",
"cross-spawn": "^6.0.5",
"del": "^3.0.0",
"gulp": "github:gulpjs/gulp#4.0",
"gulp": "^4.0.0",
"gulp-autoprefixer": "^5.0.0",
"gulp-clean-css": "^3.9.4",
"gulp-cli": "^2.0.1",