diff --git a/.gitignore b/.gitignore index d291e31..91af54b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,4 @@ Gemfile.lock .jekyll-metadata _dist .awspublish* -.sass-cache yarn.lock diff --git a/README.md b/README.md index 72f9f62..8374983 100644 --- a/README.md +++ b/README.md @@ -94,15 +94,3 @@ gulp build --production # deploy contents of /_dist to live gulp deploy --live ``` - - -## `_assets` & `assets`, WTF? - -Basically: - -- `_assets`: its content won't be copied over to generated site but handled by Gulp during build process. -- `assets`: its content is copied over to generated site and processed by Jekyll's assets pipeline - -The site avoids using Jekyll's builtin assets pipeline for various reasons and all assets are handled and compiled by Gulp during the build process. - -This has one important drawback: it limits the use of 3rd-party tools providing a UI for Jekyll-based sites cause all of those tools depend on a simple `jekyll serve` to show a preview of edited content. To work around that, the `assets` folder holds all assets which are merely copied, rather than processed (`fonts` & `videos`). As for the styles, the `css/` folder holds a collection file importing all our main styles. This file then gets processed by Jekyll's assets pipeline so at least styles work when doing a `jekyll serve`. Additionally, this `assets` folder holds a precompiled sprite sheet of the interface assets. diff --git a/_config.yml b/_config.yml index 29bc353..92067e4 100644 --- a/_config.yml +++ b/_config.yml @@ -59,9 +59,6 @@ redcarpet: source: ./_src destination: ./_dist -sass: - sass_dir: _assets/styles - # Plugins # -------------------- diff --git a/_src/assets/fonts/NotoSans-Regular.ttf b/_src/_assets/fonts/NotoSans-Regular.ttf similarity index 100% rename from _src/assets/fonts/NotoSans-Regular.ttf rename to _src/_assets/fonts/NotoSans-Regular.ttf diff --git a/_src/assets/fonts/NotoSans-Regular.woff b/_src/_assets/fonts/NotoSans-Regular.woff similarity index 100% rename from _src/assets/fonts/NotoSans-Regular.woff rename to _src/_assets/fonts/NotoSans-Regular.woff diff --git a/_src/assets/fonts/NotoSans-Regular.woff2 b/_src/_assets/fonts/NotoSans-Regular.woff2 similarity index 100% rename from _src/assets/fonts/NotoSans-Regular.woff2 rename to _src/_assets/fonts/NotoSans-Regular.woff2 diff --git a/_src/_assets/styles/bigchain.scss b/_src/_assets/styles/bigchain.scss index fe8c0f7..45020fe 100644 --- a/_src/_assets/styles/bigchain.scss +++ b/_src/_assets/styles/bigchain.scss @@ -4,6 +4,10 @@ // bigchain.io // +// Normalize all the things +@import '../../../node_modules/normalize-css/normalize'; +@import '../../../node_modules/normalize-opentype.css/normalize-opentype.scss'; + // Variables & Mixins @import 'bigchain/_variables'; @import 'bigchain/_mixins'; diff --git a/_src/_assets/styles/bigchain/_typography.scss b/_src/_assets/styles/bigchain/_typography.scss index c4313a0..b49a57d 100644 --- a/_src/_assets/styles/bigchain/_typography.scss +++ b/_src/_assets/styles/bigchain/_typography.scss @@ -34,6 +34,9 @@ body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -moz-font-feature-settings: 'liga', 'kern'; + + // remove old style numerals + font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "pnum" 1, "tnum" 0, "onum" 0, "lnum" 0, "dlig" 1; } // Reset fonts for relevant elements diff --git a/_src/assets/videos/northern-light.mp4 b/_src/_assets/videos/northern-light.mp4 similarity index 100% rename from _src/assets/videos/northern-light.mp4 rename to _src/_assets/videos/northern-light.mp4 diff --git a/_src/assets/videos/northern-light.webm b/_src/_assets/videos/northern-light.webm similarity index 100% rename from _src/assets/videos/northern-light.webm rename to _src/_assets/videos/northern-light.webm diff --git a/_src/_data/menus.yml b/_src/_data/menus.yml index 5b5e85f..c987fc6 100644 --- a/_src/_data/menus.yml +++ b/_src/_data/menus.yml @@ -1,33 +1,36 @@ --- main: -- title: How it works - url: "/features/" -- title: Whitepaper - url: "/whitepaper/" -- title: Community - url: "/community/" -- title: Docs - url: https://docs.bigchaindb.com/ + - title: How it works + url: "/features/" + - title: Whitepaper + url: "/whitepaper/" + - title: Community + url: "/community/" + - title: Docs + url: https://docs.bigchaindb.com/ + secondary: -- title: About - url: "/about/" -- title: Contact - url: "/contact/" -- title: Blog - url: https://blog.bigchaindb.com + - title: About + url: "/about/" + - title: Contact + url: "/contact/" + - title: Blog + url: https://blog.bigchaindb.com + community: -- title: GitHub - url: https://github.com/bigchaindb -- title: Twitter - url: https://twitter.com/BigchainDB -- title: Gitter - url: https://gitter.im/bigchaindb/bigchaindb + - title: GitHub + url: https://github.com/bigchaindb + - title: Twitter + url: https://twitter.com/BigchainDB + - title: Gitter + url: https://gitter.im/bigchaindb/bigchaindb + legal: -- title: Terms - url: "/terms/" -- title: Privacy - url: "/privacy/" -- title: Contributor Agreement - url: "/cla/" -- title: Imprint - url: "/imprint/" + - title: Terms + url: "/terms/" + - title: Privacy + url: "/privacy/" + - title: Contributor Agreement + url: "/cla/" + - title: Imprint + url: "/imprint/" diff --git a/_src/assets/css/bigchain.min.scss b/_src/assets/css/bigchain.min.scss deleted file mode 100644 index 8e8b684..0000000 --- a/_src/assets/css/bigchain.min.scss +++ /dev/null @@ -1,4 +0,0 @@ ---- ---- - -@import "bigchain"; diff --git a/_src/assets/img/sprite.svg b/_src/assets/img/sprite.svg deleted file mode 100644 index ce74b97..0000000 --- a/_src/assets/img/sprite.svg +++ /dev/null @@ -1 +0,0 @@ -gitterstacksstack-traditional \ No newline at end of file diff --git a/assets/img/sprite.svg b/assets/img/sprite.svg deleted file mode 100644 index ce74b97..0000000 --- a/assets/img/sprite.svg +++ /dev/null @@ -1 +0,0 @@ -gitterstacksstack-traditional \ No newline at end of file diff --git a/forestryio/images/bigchainpartners.png b/forestryio/images/bigchainpartners.png deleted file mode 100644 index f05f206..0000000 Binary files a/forestryio/images/bigchainpartners.png and /dev/null differ diff --git a/gulpfile.js b/gulpfile.js index 05c3b4e..0400e09 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -212,6 +212,25 @@ gulp.task('images', function() { }); +// +// Copy Fonts +// +gulp.task('fonts', function() { + return gulp.src(SRC + '_assets/fonts/**/*') + .pipe($.rename({dirname: ''})) + .pipe(gulp.dest(DIST + 'assets/fonts/')); +}); + + +// +// Copy Videos +// +gulp.task('videos', function() { + return gulp.src(SRC + '_assets/videos/**/*') + .pipe(gulp.dest(DIST + 'assets/videos/')); +}); + + // // Revision static assets // @@ -269,6 +288,7 @@ gulp.task('default', ['build', 'server'], function() { gulp.watch([SRC + '_assets/javascripts/**/*.js'], ['js', browser.reload]); gulp.watch([SRC + '_assets/images/**/*.{png,jpg,jpeg,gif,webp}'], ['images', browser.reload]); gulp.watch([SRC + '_assets/images/**/*.{svg}'], ['svg', browser.reload]); + gulp.watch([SRC + '_assets/videos/**/*.{mp4,webm}'], ['videos', browser.reload]); gulp.watch([SRC + '**/*.{html,xml,json,txt,md,yml}', './_config.yml', SRC + '_includes/svg/*'], ['build', browser.reload]); }); @@ -288,7 +308,7 @@ gulp.task('build', function(done) { runSequence( 'clean', 'jekyll', - ['html', 'css', 'js', 'images', 'svg'], + ['html', 'css', 'js', 'images', 'fonts', 'videos', 'svg'], 'rev', 'rev:replace', done @@ -355,7 +375,7 @@ gulp.task('deploy', function() { cacheTime: 0, gzip: true }, - + // all pdf files, not cached '^.+\\.pdf': { cacheTime: 0 diff --git a/package.json b/package.json index 862751c..fb88427 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,8 @@ }, "dependencies": { "jquery": "^2.1.4", + "normalize-css": ">=2.3.1", + "normalize-opentype.css": ">=0.2.4", "parsleyjs": "^2.0.7", "svg4everybody": "^2.0.0", "vivus": "^0.2.2",