mirror of
https://github.com/bigchaindb/site.git
synced 2024-11-22 01:36:55 +01:00
Merge pull request #249 from bigchaindb/fix/gumshoe
Fix get started page navigation
This commit is contained in:
commit
5f54600271
@ -1,6 +1,6 @@
|
|||||||
language: ruby
|
language: ruby
|
||||||
rvm:
|
rvm:
|
||||||
- 2.4
|
- 2.5
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
bundler: true
|
bundler: true
|
||||||
@ -8,7 +8,7 @@ cache:
|
|||||||
- $TRAVIS_BUILD_DIR/node_modules
|
- $TRAVIS_BUILD_DIR/node_modules
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- nvm install 9
|
- nvm install 10
|
||||||
- pip install --user awscli
|
- pip install --user awscli
|
||||||
- export PATH=$PATH:$HOME/.local/bin
|
- export PATH=$PATH:$HOME/.local/bin
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//=require gumshoe/dist/js/gumshoe.js
|
//=include gumshoejs/dist/js/gumshoe.js
|
||||||
|
|
||||||
//=include bigchain/tab.js
|
//=include bigchain/tab.js
|
||||||
//=include bigchain/newsletter.js
|
//=include bigchain/newsletter.js
|
||||||
@ -7,7 +7,7 @@ const bigchaindbUrl = 'https://test.bigchaindb.com'
|
|||||||
const proxyUrl = 'https://getstarted.bigchaindb.com'
|
const proxyUrl = 'https://getstarted.bigchaindb.com'
|
||||||
const apiPath = '/api/v1/'
|
const apiPath = '/api/v1/'
|
||||||
|
|
||||||
jQuery(function($) {
|
jQuery(function ($) {
|
||||||
|
|
||||||
//
|
//
|
||||||
// init modules
|
// init modules
|
||||||
@ -29,10 +29,10 @@ gumshoe.init()
|
|||||||
function stickyNav() {
|
function stickyNav() {
|
||||||
const menu = document.getElementsByClassName('menu--sub')[0]
|
const menu = document.getElementsByClassName('menu--sub')[0]
|
||||||
|
|
||||||
if ( window.innerWidth >= 768 ) {
|
if (window.innerWidth >= 768) {
|
||||||
const offset = menu.offsetTop
|
const offset = menu.offsetTop
|
||||||
|
|
||||||
window.addEventListener('scroll', function() {
|
window.addEventListener('scroll', function () {
|
||||||
if (offset < window.pageYOffset) {
|
if (offset < window.pageYOffset) {
|
||||||
menu.classList.add('sticky')
|
menu.classList.add('sticky')
|
||||||
} else {
|
} else {
|
||||||
@ -52,17 +52,17 @@ function testNetworkVersion() {
|
|||||||
const versionOutput = document.getElementById('network-version')
|
const versionOutput = document.getElementById('network-version')
|
||||||
|
|
||||||
fetch(bigchaindbUrl)
|
fetch(bigchaindbUrl)
|
||||||
.then(function(response) {
|
.then(function (response) {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
})
|
||||||
.then(function(data) {
|
.then(function (data) {
|
||||||
const version = data.version
|
const version = data.version
|
||||||
const titleOrig = versionOutput.getAttribute('title')
|
const titleOrig = versionOutput.getAttribute('title')
|
||||||
|
|
||||||
versionOutput.innerText = version
|
versionOutput.innerText = version
|
||||||
versionOutput.setAttribute('title', titleOrig + version)
|
versionOutput.setAttribute('title', titleOrig + version)
|
||||||
})
|
})
|
||||||
.catch(function(error) {
|
.catch(function (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -106,13 +106,13 @@ window.addEventListener('DOMContentLoaded', function domload(event) {
|
|||||||
const codeMessages = document.querySelectorAll('.code-example__message')
|
const codeMessages = document.querySelectorAll('.code-example__message')
|
||||||
const escapedContent = content.replace(/'/g, "\\'")
|
const escapedContent = content.replace(/'/g, "\\'")
|
||||||
|
|
||||||
codeMessages.forEach(function(codeMessage) {
|
codeMessages.forEach(function (codeMessage) {
|
||||||
codeMessage.textContent = escapedContent
|
codeMessage.textContent = escapedContent
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// quick form validation, live update code example with user input
|
// quick form validation, live update code example with user input
|
||||||
messageInput.addEventListener('input', function() {
|
messageInput.addEventListener('input', function () {
|
||||||
if (messageInput.value === '') {
|
if (messageInput.value === '') {
|
||||||
postButton.setAttribute('disabled', '')
|
postButton.setAttribute('disabled', '')
|
||||||
// empty message
|
// empty message
|
||||||
@ -142,7 +142,7 @@ window.addEventListener('DOMContentLoaded', function domload(event) {
|
|||||||
postButton.innerHTML = postButtonText
|
postButton.innerHTML = postButtonText
|
||||||
}
|
}
|
||||||
|
|
||||||
postButton.addEventListener('click', function(e) {
|
postButton.addEventListener('click', function (e) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
|
||||||
buttonStateLoading()
|
buttonStateLoading()
|
||||||
|
@ -159,7 +159,7 @@ export const html = () => src(DIST + '/**/*.html')
|
|||||||
export const css = () => src(SRC + '/_assets/styles/bigchain.scss')
|
export const css = () => src(SRC + '/_assets/styles/bigchain.scss')
|
||||||
.pipe($.if(!(isProduction || isStaging), $.sourcemaps.init()))
|
.pipe($.if(!(isProduction || isStaging), $.sourcemaps.init()))
|
||||||
.pipe($.sass({
|
.pipe($.sass({
|
||||||
includePaths: ['node_modules']
|
includePaths: [__dirname + '/node_modules']
|
||||||
}).on('error', $.sass.logError))
|
}).on('error', $.sass.logError))
|
||||||
.pipe($.autoprefixer())
|
.pipe($.autoprefixer())
|
||||||
.pipe($.if(isProduction || isStaging, $.cleanCss()))
|
.pipe($.if(isProduction || isStaging, $.cleanCss()))
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
},
|
},
|
||||||
"description": "Landing page for BigchainDB",
|
"description": "Landing page for BigchainDB",
|
||||||
"homepage": "https://www.bigchaindb.com",
|
"homepage": "https://www.bigchaindb.com",
|
||||||
"license": "(c) 2017 BigchainDB - All Rights Reserved",
|
"license": "Apache-2.0",
|
||||||
"main": "gulpfile.babel.js",
|
"main": "gulpfile.babel.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "gulp",
|
"start": "gulp",
|
||||||
@ -28,7 +28,6 @@
|
|||||||
"bootstrap": "^4.1.1",
|
"bootstrap": "^4.1.1",
|
||||||
"clipboard": "^2.0.1",
|
"clipboard": "^2.0.1",
|
||||||
"cookies-eu-banner": "^1.2.14",
|
"cookies-eu-banner": "^1.2.14",
|
||||||
"gumshoe": "github:cferdinandi/gumshoe",
|
|
||||||
"gumshoejs": "github:cferdinandi/gumshoe",
|
"gumshoejs": "github:cferdinandi/gumshoe",
|
||||||
"is-in-viewport": "^3.0.4",
|
"is-in-viewport": "^3.0.4",
|
||||||
"jquery": "^3.3.1",
|
"jquery": "^3.3.1",
|
||||||
@ -51,7 +50,7 @@
|
|||||||
"critical": "^1.3.3",
|
"critical": "^1.3.3",
|
||||||
"cross-spawn": "^6.0.5",
|
"cross-spawn": "^6.0.5",
|
||||||
"del": "^3.0.0",
|
"del": "^3.0.0",
|
||||||
"gulp": "github:gulpjs/gulp#4.0",
|
"gulp": "^4.0.0",
|
||||||
"gulp-autoprefixer": "^5.0.0",
|
"gulp-autoprefixer": "^5.0.0",
|
||||||
"gulp-clean-css": "^3.9.4",
|
"gulp-clean-css": "^3.9.4",
|
||||||
"gulp-cli": "^2.0.1",
|
"gulp-cli": "^2.0.1",
|
||||||
|
Loading…
Reference in New Issue
Block a user