diff --git a/.gitignore b/.gitignore index 796996c..78e6a1c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ Gemfile.lock .jekyll-metadata _dist .awspublish* +.sass-cache diff --git a/README.md b/README.md index f28a576..f544f3c 100644 --- a/README.md +++ b/README.md @@ -87,3 +87,15 @@ 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 8cddbc0..a894da6 100644 --- a/_config.yml +++ b/_config.yml @@ -57,6 +57,9 @@ redcarpet: source: ./_src destination: ./_dist +sass: + sass_dir: _assets/styles + # Plugins # -------------------- diff --git a/_src/_assets/styles/bigchain.scss b/_src/_assets/styles/bigchain.scss index 932d9f0..6986d03 100644 --- a/_src/_assets/styles/bigchain.scss +++ b/_src/_assets/styles/bigchain.scss @@ -4,10 +4,6 @@ // 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 14988ad..c4313a0 100644 --- a/_src/_assets/styles/bigchain/_typography.scss +++ b/_src/_assets/styles/bigchain/_typography.scss @@ -15,6 +15,7 @@ html { } body { + margin: 0; font-family: $font-family-base; font-size: $font-size-base; font-weight: $font-weight-base; @@ -33,9 +34,6 @@ 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/_data/menus.yml b/_src/_data/menus.yml index b0261f2..295e76c 100644 --- a/_src/_data/menus.yml +++ b/_src/_data/menus.yml @@ -1,36 +1,34 @@ - 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/' + - title: Contact + url: /contact/ secondary: - - title: About - url: /about/ - - title: Contact - url: /contact/ - - title: Blog - url: https://medium.com/the-bigchaindb-blog - + - title: About + url: /about/ + - title: Contact + url: /contact/ + - title: Blog + url: 'https://medium.com/the-bigchaindb-blog' community: - - title: GitHub - url: https://github.com/bigchaindb - - title: Twitter - url: https://twitter.com/BigchainDB - - title: Gitter - url: https://gitter.im/bigchaindb/bigchaindb - - title: Google Group - url: https://groups.google.com/forum/#!forum/bigchaindb - + - title: GitHub + url: 'https://github.com/bigchaindb' + - title: Twitter + url: 'https://twitter.com/BigchainDB' + - title: Gitter + url: 'https://gitter.im/bigchaindb/bigchaindb' + - title: Google Group + url: 'https://groups.google.com/forum/#!forum/bigchaindb' legal: - - title: Terms - url: /terms/ - - title: Privacy - url: /privacy/ - - title: Imprint - url: /imprint/ + - title: Terms + url: /terms/ + - title: Privacy + url: /privacy/ + - title: Imprint + url: /imprint/ \ No newline at end of file diff --git a/_src/assets/css/bigchain.min.scss b/_src/assets/css/bigchain.min.scss new file mode 100644 index 0000000..8e8b684 --- /dev/null +++ b/_src/assets/css/bigchain.min.scss @@ -0,0 +1,4 @@ +--- +--- + +@import "bigchain"; 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/img/sprite.svg b/_src/assets/img/sprite.svg new file mode 100644 index 0000000..ce74b97 --- /dev/null +++ b/_src/assets/img/sprite.svg @@ -0,0 +1 @@ +gitterstacksstack-traditional \ No newline at end of file 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/gulpfile.js b/gulpfile.js index 7b1cc36..202ccc6 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -212,25 +212,6 @@ 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 // @@ -288,7 +269,6 @@ 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]); }); @@ -308,7 +288,7 @@ gulp.task('build', function(done) { runSequence( 'clean', 'jekyll', - ['html', 'css', 'js', 'images', 'fonts', 'videos', 'svg'], + ['html', 'css', 'js', 'images', 'svg'], 'rev', 'rev:replace', done diff --git a/package.json b/package.json index 4936444..578d093 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,6 @@ }, "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",