1
0
mirror of https://github.com/bigchaindb/site.git synced 2025-02-14 21:10:28 +01:00

Merge branch 'master' into feature/guides

This commit is contained in:
Matthias Kretschmann 2018-02-02 17:30:03 +01:00
commit a51f281e69
Signed by: m
GPG Key ID: 606EEEF3C479A91F
9 changed files with 90 additions and 157 deletions

View File

@ -9,17 +9,12 @@ cache:
before_install: before_install:
- nvm install 9 - nvm install 9
- pip install --user awscli
- export PATH=$PATH:$HOME/.local/bin
before_script: "_ci/setup.sh" before_script: "_ci/setup.sh"
script: "_ci/build.sh" script: "_ci/build.sh"
after_success: "_ci/deploy.sh" after_success: "_ci/deploy.sh"
# deploy:
# skip_cleanup: true
# provider: script
# script: "_ci/deploy.sh"
# on:
# all_branches: true
notifications: notifications:
email: false email: false

View File

@ -1,4 +1,11 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#
# Required global environment variables:
#
# AWS_ACCESS_KEY_ID
# AWS_SECRET_ACCESS_KEY
# AWS_DEFAULT_REGION
#
set -e; set -e;
@ -9,7 +16,6 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; th
gulp deploy --beta; gulp deploy --beta;
## ##
## check for master push which is no pull request ## check for master push which is no pull request
## ##
@ -19,18 +25,14 @@ elif [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ];
else else
echo "$(tput setaf 64)" # green echo "$(tput setaf 64)---------------------------------------------"
echo "---------------------------------------------"
echo " ✓ nothing to deploy " echo " ✓ nothing to deploy "
echo "---------------------------------------------" echo "---------------------------------------------$(tput sgr0)"
echo "$(tput sgr0)" # reset
fi; fi;
echo "$(tput setaf 64)" # green echo "$(tput setaf 64)---------------------------------------------"
echo "---------------------------------------------"
echo " ✓ done deployment " echo " ✓ done deployment "
echo "---------------------------------------------" echo "---------------------------------------------$(tput sgr0)"
echo "$(tput sgr0)" # reset
exit; exit;

View File

@ -8,15 +8,15 @@ url: https://www.bigchaindb.com
bigchaindb_api_url: https://test.bigchaindb.com bigchaindb_api_url: https://test.bigchaindb.com
# set to `true` to make hiring link appear in main menu # set to `true` to make hiring link appear in main menu
hiring: false hiring: true
email: email:
contact: contact@bigchaindb.com contact: contact@bigchaindb.com
contact_cc: "kamal@bigchaindb.com,ricardo@bigchaindb.com" contact_cc: "kamal@bigchaindb.com,ricardo@bigchaindb.com,gautam@bigchaindb.com"
cla: troy@ascribe.io cla: troy@ascribe.io
cla_cc: sylvain@bigchaindb.com cla_cc: sylvain@bigchaindb.com
enterprise: ikytz6br@robot.zapier.com enterprise: ikytz6br@robot.zapier.com
enterprise_cc: "kamal@bigchaindb.com,ricardo@bigchaindb.com" enterprise_cc: "kamal@bigchaindb.com,ricardo@bigchaindb.com,gautam@bigchaindb.com"
social: social:
gitter: gitter:

View File

@ -1,19 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<defs>
<style>
.cls-1 {
fill: none;
stroke: #ed1a55;
stroke-linecap: square;
stroke-width: 2px;
}
</style>
</defs>
<title>gitter</title> <title>gitter</title>
<g id="gitter"> <g id="gitter">
<path class="cls-1" d="M8,4V19.5"/> <path d="M8,4V19.5"/>
<path class="cls-1" d="M12,4V19.5"/> <path d="M12,4V19.5"/>
<path class="cls-1" d="M16,4v7"/> <path d="M16,4v7"/>
<path class="cls-1" d="M4,1V11"/> <path d="M4,1V11"/>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 457 B

After

Width:  |  Height:  |  Size: 230 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 46 KiB

View File

@ -182,6 +182,9 @@ $menu-height-md: 66px;
.icon--gitter { .icon--gitter {
animation: gitterPulse 5s ease-out infinite; animation: gitterPulse 5s ease-out infinite;
stroke-linecap: square;
stroke-width: 2px;
fill: none;
} }
} }

View File

@ -0,0 +1,13 @@
---
layout: partner
title: Biosfera Foundation
link: http://www.biosferafoundation.com/en/
---
The artificial ecosystems created by humans are not necessarily in balance with those natural, smart ones. That is why BIOSFERA develops implementation frameworks that make human ecosystems smart. We call this Smart Ecosystem Engineering (SEE).
SEE gives natural ecosystems a voice and a face so that they can participate in the distribution and the exchange of the value that they generate for us, for all life on earth and for the Biosphere as a whole.
Biosfera has developed the operating system for Smart Ecosystems called TUPIX. TUPIX allows both the ecosystems and the communities of dependent actors to monitor, manage and control this distribution and exchange of value in real-time, secure and transparent.

View File

@ -17,6 +17,7 @@ import request from 'request'
import uglifyjs from 'uglify-es' import uglifyjs from 'uglify-es'
import composer from 'gulp-uglify/composer' import composer from 'gulp-uglify/composer'
const minify = composer(uglifyjs, console) const minify = composer(uglifyjs, console)
const cp = require('child_process')
// get all the configs: `pkg` and `site` // get all the configs: `pkg` and `site`
import pkg from './package.json' import pkg from './package.json'
@ -56,16 +57,15 @@ console.log("")
const PORT = 1337 const PORT = 1337
// paths // paths
const SRC = site.source + '/', const SRC = site.source,
DIST = site.destination + '/' DIST = site.destination
// deployment // deployment
const S3BUCKET = 'www.bigchaindb.com', const S3_BUCKET_LIVE = 'www.bigchaindb.com',
S3REGION = 'eu-central-1', S3_BUCKET_BETA = 'beta.bigchaindb.com',
S3BUCKET_BETA = 'beta.bigchaindb.com', S3_BUCKET_GAMMA = 'gamma.bigchaindb.com',
S3REGION_BETA = 'eu-central-1', S3_OPTIONS_DEFAULT = '--delete --acl public-read',
S3BUCKET_GAMMA = 'gamma.bigchaindb.com', S3_OPTIONS_CACHING = '--cache-control max-age=2592000,public'
S3REGION_GAMMA = 'eu-central-1'
// SVG sprite // SVG sprite
const SPRITECONFIG = { const SPRITECONFIG = {
@ -100,8 +100,8 @@ const BANNER = [
// //
export const clean = () => export const clean = () =>
del([ del([
DIST + '**/*', DIST + '/**/*',
DIST + '.*' // delete all hidden files DIST + '/.*' // delete all hidden files
]) ])
@ -123,8 +123,7 @@ export const jekyll = (done) => {
var jekyll_options = 'jekyll build --incremental --drafts --future' var jekyll_options = 'jekyll build --incremental --drafts --future'
} }
let spawn = require('child_process').spawn, const jekyll = cp.execFile('bundle', ['exec', jekyll_options], { stdio: 'inherit' })
jekyll = spawn('bundle', ['exec', jekyll_options], { stdio: 'inherit' })
jekyll.on('error', (error) => onError() ).on('close', done) jekyll.on('error', (error) => onError() ).on('close', done)
} }
@ -133,7 +132,7 @@ export const jekyll = (done) => {
// //
// HTML // HTML
// //
export const html = () => src(DIST + '**/*.html') export const html = () => src(DIST + '/**/*.html')
.pipe($.if(isProduction || isStaging, $.htmlmin({ .pipe($.if(isProduction || isStaging, $.htmlmin({
collapseWhitespace: true, collapseWhitespace: true,
conservativeCollapse: true, conservativeCollapse: true,
@ -151,7 +150,7 @@ export const html = () => src(DIST + '**/*.html')
// //
// Styles // Styles
// //
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: ['node_modules']
@ -161,7 +160,7 @@ export const css = () => src(SRC + '_assets/styles/bigchain.scss')
.pipe($.if(!(isProduction || isStaging), $.sourcemaps.write())) .pipe($.if(!(isProduction || isStaging), $.sourcemaps.write()))
.pipe($.if(isProduction || isStaging, $.header(BANNER, { pkg: pkg }))) .pipe($.if(isProduction || isStaging, $.header(BANNER, { pkg: pkg })))
.pipe($.rename({ suffix: '.min' })) .pipe($.rename({ suffix: '.min' }))
.pipe(dest(DIST + 'assets/css/')) .pipe(dest(DIST + '/assets/css/'))
.pipe(browser.stream()) .pipe(browser.stream())
// inline critical-path CSS // inline critical-path CSS
@ -194,55 +193,55 @@ export const criticalCss = (done) => {
// //
export const js = () => export const js = () =>
src([ src([
SRC + '_assets/javascripts/bigchain.js', SRC + '/_assets/javascripts/bigchain.js',
SRC + '_assets/javascripts/page-*.js' SRC + '/_assets/javascripts/page-*.js'
]) ])
.pipe($.if(!(isProduction || isStaging), $.sourcemaps.init())) .pipe($.if(!(isProduction || isStaging), $.sourcemaps.init()))
.pipe($.include({ .pipe($.include({
includePaths: ['node_modules', SRC + '_assets/javascripts'] includePaths: ['node_modules', SRC + '/_assets/javascripts']
})).on('error', onError) })).on('error', onError)
.pipe($.if(isProduction || isStaging, minify())).on('error', onError) .pipe($.if(isProduction || isStaging, minify())).on('error', onError)
.pipe($.if(!(isProduction || isStaging), $.sourcemaps.write())) .pipe($.if(!(isProduction || isStaging), $.sourcemaps.write()))
.pipe($.if(isProduction || isStaging, $.header(BANNER, { pkg: pkg }))) .pipe($.if(isProduction || isStaging, $.header(BANNER, { pkg: pkg })))
.pipe($.rename({suffix: '.min'})) .pipe($.rename({suffix: '.min'}))
.pipe(dest(DIST + 'assets/js/')) .pipe(dest(DIST + '/assets/js/'))
// //
// SVG sprite // SVG sprite
// //
export const svg = () => src(SRC + '_assets/images/*.svg') export const svg = () => src(SRC + '/_assets/images/*.svg')
.pipe($.if(isProduction || isStaging, $.imagemin({ .pipe($.if(isProduction || isStaging, $.imagemin({
svgoPlugins: [{ removeRasterImages: true }] svgoPlugins: [{ removeRasterImages: true }]
}))) })))
.pipe($.svgSprite(SPRITECONFIG)) .pipe($.svgSprite(SPRITECONFIG))
.pipe(dest(DIST + 'assets/img/')) .pipe(dest(DIST + '/assets/img/'))
// //
// Copy Images // Copy Images
// //
export const images = () => src(SRC + '_assets/images/**/*') export const images = () => src(SRC + '/_assets/images/**/*')
.pipe($.if(isProduction || isStaging, $.imagemin([ .pipe($.if(isProduction || isStaging, $.imagemin([
$.imagemin.gifsicle({ interlaced: true }), $.imagemin.gifsicle({ interlaced: true }),
$.imagemin.jpegtran({ progressive: true }), $.imagemin.jpegtran({ progressive: true }),
$.imagemin.optipng({ optimizationLevel: 5 }), $.imagemin.optipng({ optimizationLevel: 5 }),
$.imagemin.svgo({plugins: [{ removeViewBox: true }]}) $.imagemin.svgo({plugins: [{ removeViewBox: true }]})
]))) ])))
.pipe(dest(DIST + 'assets/img/')) .pipe(dest(DIST + '/assets/img/'))
// //
// Copy Fonts // Copy Fonts
// //
export const fonts = () => src(SRC + '_assets/fonts/**/*') export const fonts = () => src(SRC + '/_assets/fonts/**/*')
.pipe(dest(DIST + 'assets/fonts/')) .pipe(dest(DIST + '/assets/fonts/'))
// //
// Zip up media kit // Zip up media kit
// //
export const mediakit = () => src(SRC + 'mediakit/**/*', { base: SRC }) export const mediakit = () => src(SRC + '/mediakit/**/*', { base: SRC })
.pipe($.zip('mediakit.zip')) .pipe($.zip('mediakit.zip'))
.pipe(dest(DIST)) .pipe(dest(DIST))
@ -253,12 +252,12 @@ export const mediakit = () => src(SRC + 'mediakit/**/*', { base: SRC })
export const rev = (done) => { export const rev = (done) => {
// globbing is slow so do everything conditionally for faster dev build // globbing is slow so do everything conditionally for faster dev build
if (isProduction || isStaging) { if (isProduction || isStaging) {
return src(DIST + 'assets/**/*.{css,js,png,jpg,jpeg,svg,eot,ttf,woff,woff2}') return src(DIST + '/assets/**/*.{css,js,png,jpg,jpeg,svg,eot,ttf,woff,woff2}')
.pipe($.rev()) .pipe($.rev())
.pipe(dest(DIST + 'assets/')) .pipe(dest(DIST + '/assets/'))
// output rev manifest for next replace task // output rev manifest for next replace task
.pipe($.rev.manifest()) .pipe($.rev.manifest())
.pipe(dest(DIST + 'assets/')) .pipe(dest(DIST + '/assets/'))
} }
done() done()
} }
@ -271,9 +270,9 @@ export const rev = (done) => {
export const revReplace = (done) => { export const revReplace = (done) => {
// globbing is slow so do everything conditionally for faster dev build // globbing is slow so do everything conditionally for faster dev build
if (isProduction || isStaging) { if (isProduction || isStaging) {
let manifest = src(DIST + 'assets/rev-manifest.json') let manifest = src(DIST + '/assets/rev-manifest.json')
return src(DIST + '**/*.{html,css,js}') return src(DIST + '/**/*.{html,css,js}')
.pipe($.revReplace({ manifest: manifest })) .pipe($.revReplace({ manifest: manifest }))
.pipe(dest(DIST)) .pipe(dest(DIST))
} }
@ -298,11 +297,11 @@ export const server = (done) => {
// Watch for file changes // Watch for file changes
// //
export const watchSrc = () => { export const watchSrc = () => {
watch(SRC + '_assets/styles/**/*.scss').on('all', series(css)) watch(SRC + '/_assets/styles/**/*.scss').on('all', series(css))
watch(SRC + '_assets/javascripts/**/*.js').on('all', series(js, browser.reload)) watch(SRC + '/_assets/javascripts/**/*.js').on('all', series(js, browser.reload))
watch(SRC + '_assets/images/**/*.{png,jpg,jpeg,gif,webp}').on('all', series(images, browser.reload)) watch(SRC + '/_assets/images/**/*.{png,jpg,jpeg,gif,webp}').on('all', series(images, browser.reload))
watch(SRC + '_assets/images/**/*.{svg}').on('all', series(svg, browser.reload)) watch(SRC + '/_assets/images/**/*.{svg}').on('all', series(svg, browser.reload))
watch([SRC + '**/*.{html,xml,json,txt,md,yml}', './*.yml', SRC + '_includes/svg/*']).on('all', series('build', browser.reload)) watch([SRC + '/**/*.{html,xml,json,txt,md,yml}', './*.yml', SRC + '/_includes/svg/*']).on('all', series('build', browser.reload))
} }
@ -365,91 +364,19 @@ export default dev
// gulp deploy --beta // gulp deploy --beta
// gulp deploy --gamma // gulp deploy --gamma
// //
export const s3 = () => { export const s3 = (cb) => {
let S3_BUCKET_TARGET
// create publisher, define config
if ($.util.env.live === true) { if ($.util.env.live === true) {
var publisher = $.awspublish.create({ S3_BUCKET_TARGET = S3_BUCKET_LIVE
params: { 'Bucket': S3BUCKET },
'accessKeyId': process.env.AWS_ACCESS_KEY,
'secretAccessKey': process.env.AWS_SECRET_KEY,
'region': S3REGION
})
} else if ($.util.env.beta === true) { } else if ($.util.env.beta === true) {
var publisher = $.awspublish.create({ S3_BUCKET_TARGET = S3_BUCKET_BETA
params: { 'Bucket': S3BUCKET_BETA },
'accessKeyId': process.env.AWS_BETA_ACCESS_KEY,
'secretAccessKey': process.env.AWS_BETA_SECRET_KEY,
'region': S3REGION_BETA
})
} else if ($.util.env.gamma === true) { } else if ($.util.env.gamma === true) {
var publisher = $.awspublish.create({ S3_BUCKET_TARGET = S3_BUCKET_GAMMA
params: { 'Bucket': S3BUCKET_GAMMA },
'accessKeyId': process.env.AWS_GAMMA_ACCESS_KEY,
'secretAccessKey': process.env.AWS_GAMMA_SECRET_KEY,
'region': S3REGION_GAMMA
})
} else {
return
} }
return src(DIST + '**/*') cp.exec(`aws s3 sync ${DIST} s3://${S3_BUCKET_TARGET} --exclude "assets/*" ${S3_OPTIONS_DEFAULT}`, (err) => cb(err))
.pipe($.awspublishRouter({ cp.exec(`aws s3 sync ${DIST} s3://${S3_BUCKET_TARGET} --exclude "*" --include "assets/*" ${S3_OPTIONS_DEFAULT} ${S3_OPTIONS_CACHING}`, (err) => cb(err))
cache: {
// cache for 5 minutes by default
cacheTime: 300
},
routes: {
// all static assets, cached & gzipped
'^assets/(?:.+)\\.(?:js|css|png|jpg|jpeg|gif|ico|svg|ttf|eot|woff|woff2)$': {
cacheTime: 2592000, // cache for 1 month
gzip: true
},
// every other asset, cached
'^assets/.+$': {
cacheTime: 2592000 // cache for 1 month
},
// all html files, not cached & gzipped
'^.+\\.html': {
cacheTime: 0,
gzip: true
},
// all pdf files, not cached
'^.+\\.pdf': {
cacheTime: 0
},
// all zip files, not cached
'^.+\\.zip': {
cacheTime: 0
},
// font mime types
'\.ttf$': {
key: '$&',
headers: { 'Content-Type': 'application/x-font-ttf' }
},
'\.woff$': {
key: '$&',
headers: { 'Content-Type': 'application/x-font-woff' }
},
'\.woff2$': {
key: '$&',
headers: { 'Content-Type': 'application/x-font-woff2' }
},
// pass-through for anything that wasn't matched by routes above, to be uploaded with default options
"^.+$": "$&"
}
}))
.pipe(parallelize(publisher.publish(), 100))
.pipe(publisher.sync()) // delete files in bucket that are not in local folder
.pipe($.awspublish.reporter({
states: ['create', 'update', 'delete']
}))
} }

View File

@ -29,7 +29,7 @@
"clipboard": "^1.7.1", "clipboard": "^1.7.1",
"gumshoe": "github:cferdinandi/gumshoe", "gumshoe": "github:cferdinandi/gumshoe",
"is-in-viewport": "^3.0.0", "is-in-viewport": "^3.0.0",
"jquery": "^3.2.1", "jquery": "^3.3.1",
"normalize-css": "^2.3.1", "normalize-css": "^2.3.1",
"normalize-opentype.css": "^0.2.4", "normalize-opentype.css": "^0.2.4",
"parsleyjs": "^2.8.0", "parsleyjs": "^2.8.0",
@ -41,22 +41,22 @@
"whatwg-fetch": "^2.0.3" "whatwg-fetch": "^2.0.3"
}, },
"devDependencies": { "devDependencies": {
"acorn": "^5.3.0", "acorn": "^5.4.1",
"babel-core": "^6.26.0", "babel-core": "^6.26.0",
"babel-preset-env": "^1.6.1", "babel-preset-env": "^1.6.1",
"browser-sync": "^2.23.3", "browser-sync": "^2.23.6",
"concurrent-transform": "^1.0.0", "concurrent-transform": "^1.0.0",
"critical": "^1.1.0", "critical": "^1.1.0",
"cross-spawn": "^5.1.0", "cross-spawn": "^6.0.4",
"del": "^3.0.0", "del": "^3.0.0",
"gulp": "github:gulpjs/gulp#4.0", "gulp": "github:gulpjs/gulp#4.0",
"gulp-autoprefixer": "^4.1.0", "gulp-autoprefixer": "^4.1.0",
"gulp-awspublish": "^3.3.0", "gulp-awspublish": "^3.3.1",
"gulp-awspublish-router": "^0.1.3", "gulp-awspublish-router": "^0.1.3",
"gulp-clean-css": "^3.9.2", "gulp-clean-css": "^3.9.2",
"gulp-cli": "^2.0.0", "gulp-cli": "^2.0.1",
"gulp-concat": "^2.6.1", "gulp-concat": "^2.6.1",
"gulp-header": "^1.8.9", "gulp-header": "^2.0.1",
"gulp-htmlmin": "^4.0.0", "gulp-htmlmin": "^4.0.0",
"gulp-if": "^2.0.2", "gulp-if": "^2.0.2",
"gulp-imagemin": "^4.1.0", "gulp-imagemin": "^4.1.0",
@ -67,7 +67,7 @@
"gulp-rev": "^8.1.1", "gulp-rev": "^8.1.1",
"gulp-rev-replace": "^0.4.3", "gulp-rev-replace": "^0.4.3",
"gulp-sass": "^3.1.0", "gulp-sass": "^3.1.0",
"gulp-sourcemaps": "^2.6.3", "gulp-sourcemaps": "^2.6.4",
"gulp-svg-sprite": "^1.3.7", "gulp-svg-sprite": "^1.3.7",
"gulp-uglify": "^3.0.0", "gulp-uglify": "^3.0.0",
"gulp-util": "^3.0.8", "gulp-util": "^3.0.8",
@ -77,7 +77,7 @@
"stylelint": "^8.4.0", "stylelint": "^8.4.0",
"stylelint-config-bigchaindb": "^1.2.0", "stylelint-config-bigchaindb": "^1.2.0",
"stylelint-config-standard": "^18.0.0", "stylelint-config-standard": "^18.0.0",
"uglify-es": "^3.3.5" "uglify-es": "^3.3.9"
}, },
"engines": { "engines": {
"node": ">=7.0.0" "node": ">=7.0.0"