From 46f45bb8a93244854aaded4ddf580f6ec73389f7 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Fri, 30 Sep 2016 13:29:45 +0200 Subject: [PATCH] Introduced ESLint for code style checks --- .eslintrc | 183 +++++++++ Gulpfile.js | 384 +++++++++--------- MANIFEST.in | 2 +- .../javascripts/application-29b6c4d53e.js | 58 +++ .../javascripts/application-a233641b81.js | 8 - .../javascripts/modernizr-29976e9007.js | 1 + .../javascripts/modernizr-d3fe1698b6.js | 1 - .../stylesheets/application-bcbe056a5b.css | 1 + .../stylesheets/application-d7ccfc4ec2.css | 1 - material/base.html | 6 +- material/partials/header.html | 13 +- material/partials/search.html | 27 +- material/partials/toc.html | 2 +- package.json | 5 +- src/assets/javascripts/application.js | 346 ++++++++++------ src/assets/javascripts/components/expander.js | 52 ++- .../javascripts/components/scrollspy.js | 65 +-- src/assets/javascripts/components/search.js | 98 +++++ src/assets/javascripts/components/sidebar.js | 93 +++-- src/assets/stylesheets/_shame.scss | 177 +++++++- src/assets/stylesheets/base/_icons.scss | 4 +- .../stylesheets/extensions/_permalinks.scss | 4 +- src/assets/stylesheets/layout/_header.scss | 22 +- src/assets/stylesheets/layout/_nav.scss | 19 +- src/assets/stylesheets/layout/_search.scss | 88 ++-- src/assets/stylesheets/layout/_sidebar.scss | 7 +- src/assets/stylesheets/layout/_source.scss | 21 +- src/base.html | 4 +- src/partials/header.html | 20 +- src/partials/search.html | 67 ++- src/partials/toc.html | 2 +- 31 files changed, 1245 insertions(+), 536 deletions(-) create mode 100644 .eslintrc create mode 100644 material/assets/javascripts/application-29b6c4d53e.js delete mode 100644 material/assets/javascripts/application-a233641b81.js create mode 100644 material/assets/javascripts/modernizr-29976e9007.js delete mode 100644 material/assets/javascripts/modernizr-d3fe1698b6.js create mode 100644 material/assets/stylesheets/application-bcbe056a5b.css delete mode 100644 material/assets/stylesheets/application-d7ccfc4ec2.css create mode 100644 src/assets/javascripts/components/search.js diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 000000000..0c866a34d --- /dev/null +++ b/.eslintrc @@ -0,0 +1,183 @@ +{ + "extends": "eslint:recommended", + "ecmaFeatures": { + "globalReturn": true, + "modules": true + }, + "env": { + "browser": true, + "es6": true, + "node": true + }, + "globals": { + "describe": true, + "before": true, + "it": true, + "expect": true, + "Modernizr": true, + "navigator": true + }, + "parser": "babel-eslint", + "parserOptions": { + "ecmaVersion": 6, + "impliedStrict": true, + "sourceType": "module" + }, + "plugins": [], + "rules": { + "array-callback-return": 2, + "array-bracket-spacing": 2, + "arrow-body-style": [2, "always"], + "arrow-parens": [2, "as-needed"], + "arrow-spacing": 2, + "block-scoped-var": 2, + "block-spacing": 2, + "brace-style": 2, + "camelcase": [2, { + "properties": "always", + }], + "comma-dangle": [2, "never"], + "comma-style": [2, "last"], + "complexity": 2, + "computed-property-spacing": 2, + "consistent-this": 2, + "dot-notation": 2, + "eol-last": 2, + "eqeqeq": 2, + "func-call-spacing": 2, + "func-names": [2, "never"], + "func-style": 2, + "generator-star-spacing": 2, + "indent": [2, 2, { + "FunctionDeclaration": { + "body": 1, + "parameters": 2 + }, + "FunctionExpression": { + "body": 1, + "parameters": 2 + }, + "MemberExpression": 1, + "VariableDeclarator": { + "var": 2, + "let": 2, + "const": 3 + } + }], + "init-declarations": 2, + "key-spacing": 2, + "keyword-spacing": 2, + "linebreak-style": 2, + "lines-around-comment": 2, + "lines-around-directive": 2, + "max-depth": 2, + "max-len": [2, { + "ignorePattern": "\/\/ TODO" + }], + "max-nested-callbacks": 2, + "max-params": 2, + "max-statements-per-line": 2, + "multiline-ternary": 2, + "new-cap": 2, + "newline-per-chained-call": 2, + "no-array-constructor": 2, + "no-alert": 2, + "no-caller": 2, + "no-confusing-arrow": [2, { + "allowParens": false + }], + "no-duplicate-imports": 2, + "no-eq-null": 2, + "no-eval": 2, + "no-extend-native": 2, + "no-extra-bind": 2, + "no-floating-decimal": 2, + "no-global-assign": 2, + "no-invalid-this": 2, + "no-labels": 2, + "no-lone-blocks": 2, + "no-loop-func": 2, + "no-multiple-empty-lines": [2, { + "max": 1 + }], + "no-nested-ternary": 2, + "no-new": 2, + "no-new-object": 2, + "no-param-reassign": 2, + "no-prototype-builtins": 2, + "no-shadow": 2, + "no-tabs": 2, + "no-template-curly-in-string": 2, + "no-throw-literal": 2, + "no-trailing-spaces": 2, + "no-undefined": 2, + "no-underscore-dangle": [2, { + "allowAfterThis": true, + "allowAfterSuper": true + }], + "no-unneeded-ternary": 2, + "no-unsafe-negation": 2, + "no-unused-expressions": 2, + "no-use-before-define": 2, + "no-useless-call": 2, + "no-useless-computed-key": 2, + "no-useless-constructor": 2, + "no-useless-rename": 2, + "no-var": 2, + "no-whitespace-before-property": 2, + "no-with": 2, + "object-curly-newline": 2, + "object-curly-spacing": 2, + "object-property-newline": 2, + "object-shorthand": 2, + "one-var-declaration-per-line": 2, + "operator-assignment": 2, + "prefer-arrow-callback": 2, + "prefer-const": 2, + "prefer-numeric-literals": 2, + "prefer-spread": 2, + "prefer-template": 2, + "quotes": [2, "double"], + "radix": 2, + "require-jsdoc": [2, { + "require": { + "FunctionDeclaration": true, + "MethodDefinition": true, + "ClassDeclaration": false + } + }], + "rest-spread-spacing": 2, + "semi": [2, "never"], + "semi-spacing": 2, + "space-before-function-paren": [2, "never"], + "space-in-parens": 2, + "space-infix-ops": 2, + "space-unary-ops": 2, + "spaced-comment": [2, "always", { + "line": { + "markers": ["/"], + "exceptions": ["-", "+"] + }, + "block": { + "markers": ["!"], + "exceptions": ["*"], + "balanced": true + } + }], + "strict": 2, + "template-curly-spacing": 2, + "unicode-bom": 2, + "valid-jsdoc": [2, { + "prefer": { + "arg": "param", + "argument": "param", + "class": "constructor", + "returns": "return", + "virtual": "abstract" + }, + "requireParamDescription": true, + "requireReturnDescription": true + }], + "yield-star-spacing": 2 + } +} \ No newline at end of file diff --git a/Gulpfile.js b/Gulpfile.js index 72c46bc9f..586646ddb 100755 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -20,51 +20,51 @@ * IN THE SOFTWARE. */ +"use strict" + /* ---------------------------------------------------------------------------- * Imports * ------------------------------------------------------------------------- */ -var gulp = require('gulp'); -var addsrc = require('gulp-add-src'); -var args = require('yargs').argv; -var autoprefix = require('autoprefixer'); -var changed = require('gulp-changed'); -var child = require('child_process'); -var clean = require('del'); -var compact = require('gulp-remove-empty-lines'); -var concat = require('gulp-concat'); -var ignore = require('gulp-ignore'); -var gulpif = require('gulp-if'); -var mincss = require('gulp-cssnano'); -var minhtml = require('gulp-htmlmin'); -var minsvg = require('gulp-svgmin'); -var modernizr = require('gulp-modernizr'); -var mqpacker = require('css-mqpacker'); -var notifier = require('node-notifier'); -var path = require('path'); -var plumber = require('gulp-plumber'); -var postcss = require('gulp-postcss'); -var replace = require('gulp-replace'); -var rev = require('gulp-rev'); -var sass = require('gulp-sass'); -var sasslint = require('gulp-sass-lint'); -var sourcemaps = require('gulp-sourcemaps'); -var stream = require('webpack-stream'); -var uglify = require('gulp-uglify'); -var util = require('gulp-util'); -var vinyl = require('vinyl-paths'); -var version = require('gulp-rev-replace'); -var webpack = require('webpack'); +var gulp = require("gulp") +var args = require("yargs").argv +var autoprefix = require("autoprefixer") +var changed = require("gulp-changed") +var child = require("child_process") +var clean = require("del") +var compact = require("gulp-remove-empty-lines") +var concat = require("gulp-concat") +var gulpif = require("gulp-if") +var mincss = require("gulp-cssnano") +var minhtml = require("gulp-htmlmin") +var minsvg = require("gulp-svgmin") +var modernizr = require("gulp-modernizr") +var mqpacker = require("css-mqpacker") +var notifier = require("node-notifier") +var path = require("path") +var plumber = require("gulp-plumber") +var postcss = require("gulp-postcss") +var replace = require("gulp-replace") +var rev = require("gulp-rev") +var sass = require("gulp-sass") +var sasslint = require("gulp-sass-lint") +var sourcemaps = require("gulp-sourcemaps") +var stream = require("webpack-stream") +var uglify = require("gulp-uglify") +var util = require("gulp-util") +var vinyl = require("vinyl-paths") +var version = require("gulp-rev-replace") +var webpack = require("webpack") /* ---------------------------------------------------------------------------- * Locals * ------------------------------------------------------------------------- */ /* MkDocs server */ -var server = null; +var server = null /* Watching context */ -var watch = false; +var watch = false /* ---------------------------------------------------------------------------- * Overrides @@ -73,28 +73,28 @@ var watch = false; /* * Override gulp.src() for nicer error handling. */ -var src = gulp.src; +var src = gulp.src // TODO: do this via extension somehow... gulp.src = function() { return src.apply(gulp, arguments) .pipe( plumber(function(error) { util.log(util.colors.red( - 'Error (' + error.plugin + '): ' + error.message - )); + "Error (" + error.plugin + "): " + error.message + )) /* Extract file where error happened, if existent */ var file = error.relativePath - ? error.relativePath.split('/').pop() - : ''; + ? error.relativePath.split("/").pop() + : "" /* Dispatch system-level notification */ notifier.notify({ - title: 'Error (' + error.plugin + '): ' + file, + title: "Error (" + error.plugin + "): " + file, message: error.messageOriginal - }); - this.emit('end'); - })); -}; + }) + this.emit("end") + })) +} /* ---------------------------------------------------------------------------- * Asset pipeline @@ -103,51 +103,51 @@ gulp.src = function() { /* * Clean stylesheets generated by build. */ -gulp.task('assets:clean:stylesheets', function() { - return gulp.src('material/assets/stylesheets/*') - .pipe(vinyl(clean)); -}); +gulp.task("assets:clean:stylesheets", () => { + return gulp.src("material/assets/stylesheets/*") + .pipe(vinyl(clean)) +}) /* * Clean javascripts generated by build. */ -gulp.task('assets:clean:javascripts', function() { - return gulp.src('material/assets/javascripts/*') - .pipe(vinyl(clean)); -}); +gulp.task("assets:clean:javascripts", () => { + return gulp.src("material/assets/javascripts/*") + .pipe(vinyl(clean)) +}) /* * Clean images generated by build. */ -gulp.task('assets:clean:images', function() { - return gulp.src('material/assets/images/*') - .pipe(vinyl(clean)); -}); +gulp.task("assets:clean:images", () => { + return gulp.src("material/assets/images/*") + .pipe(vinyl(clean)) +}) /* * Clean files generated by build. */ -gulp.task('assets:clean', [ - 'assets:clean:stylesheets', - 'assets:clean:javascripts', - 'assets:clean:images' -]); +gulp.task("assets:clean", [ + "assets:clean:stylesheets", + "assets:clean:javascripts", + "assets:clean:images" +]) /* * Build stylesheets from SASS source. */ -gulp.task('assets:build:stylesheets', args.production ? [ - 'assets:clean:stylesheets', - 'assets:build:images', -] : [], function() { - return gulp.src('src/assets/stylesheets/*.scss') +gulp.task("assets:build:stylesheets", args.production ? [ + "assets:clean:stylesheets", + "assets:build:images" +] : [], () => { + return gulp.src("src/assets/stylesheets/*.scss") .pipe(gulpif(args.sourcemaps, sourcemaps.init())) .pipe( sass({ includePaths: [ - 'node_modules/modularscale-sass/stylesheets', - 'node_modules/material-design-color', - 'node_modules/material-shadows' + "node_modules/modularscale-sass/stylesheets", + "node_modules/material-design-color", + "node_modules/material-shadows" ] })) .pipe( @@ -159,40 +159,44 @@ gulp.task('assets:build:stylesheets', args.production ? [ .pipe(gulpif(args.production, mincss())) .pipe(gulpif(args.production, rev())) .pipe(gulpif(args.production, - version({ manifest: gulp.src('manifest.json') }))) - .pipe(gulp.dest('material/assets/stylesheets')) + version({ manifest: gulp.src("manifest.json") }))) + .pipe(gulp.dest("material/assets/stylesheets")) .pipe(gulpif(args.production, - rev.manifest('manifest.json', { - base: 'material/assets', + rev.manifest("manifest.json", { + base: "material/assets", merge: true }))) - .pipe(gulpif(args.production, gulp.dest('material/assets'))); -}); + .pipe(gulpif(args.production, gulp.dest("material/assets"))) +}) /* * Build javascripts by transpiling ES6 with babel. */ -gulp.task('assets:build:javascripts', args.production ? [ - 'assets:clean:javascripts' -] : [], function() { - return gulp.src('src/assets/javascripts/**/*.js') +gulp.task("assets:build:javascripts", args.production ? [ + "assets:clean:javascripts" +] : [], () => { + return gulp.src("src/assets/javascripts/**/*.js") .pipe( stream({ - entry: 'application.js', + entry: "application.js", output: { - filename: 'application.js' + filename: "application.js" }, module: { loaders: [{ - loader: 'babel-loader', - test: path.join(__dirname, 'src/assets/javascripts'), + loader: "babel-loader", + test: path.join(__dirname, "src/assets/javascripts"), query: { - presets: 'es2015' + presets: "es2015" } + }, { + test: /\.js$/, + loader: "eslint-loader", + exclude: /node_modules/ }] }, plugins: [ - new webpack.NoErrorsPlugin(), + new webpack.NoErrorsPlugin() ].concat( args.production ? [ new webpack.optimize.UglifyJsPlugin({ @@ -206,105 +210,105 @@ gulp.task('assets:build:javascripts', args.production ? [ }, resolve: { modulesDirectories: [ - 'src/assets/javascripts', - 'node_modules' + "src/assets/javascripts", + "node_modules" ], extensions: [ - '', '.js' + "", ".js" ] }, - devtool: args.sourcemaps ? 'source-map' : '' + devtool: args.sourcemaps ? "source-map" : "" })) .pipe(gulpif(args.production, rev())) - .pipe(gulp.dest('material/assets/javascripts')) + .pipe(gulp.dest("material/assets/javascripts")) .pipe(gulpif(args.production, - rev.manifest('manifest.json', { - base: 'material/assets', + rev.manifest("manifest.json", { + base: "material/assets", merge: true }))) - .pipe(gulpif(args.production, gulp.dest('material/assets'))); -}); + .pipe(gulpif(args.production, gulp.dest("material/assets"))) +}) /* * Create a customized modernizr build. */ -gulp.task('assets:build:modernizr', [ - 'assets:build:stylesheets', - 'assets:build:javascripts' -], function() { +gulp.task("assets:build:modernizr", [ + "assets:build:stylesheets", + "assets:build:javascripts" +], () => { return gulp.src([ - 'material/assets/stylesheets/*.css', - 'material/assets/javascripts/*.js' + "material/assets/stylesheets/*.css", + "material/assets/javascripts/*.js" ]).pipe( modernizr({ options: [ - 'addTest', /* Add custom tests */ - 'fnBind', /* Use function.bind */ - 'html5printshiv', /* HTML5 support for IE */ - 'setClasses', /* Add CSS classes to root tag */ - 'testProp' /* Test for properties */ + "addTest", /* Add custom tests */ + "fnBind", /* Use function.bind */ + "html5printshiv", /* HTML5 support for IE */ + "setClasses", /* Add CSS classes to root tag */ + "testProp" /* Test for properties */ ] })) - .pipe(concat('modernizr.js')) + .pipe(concat("modernizr.js")) .pipe(gulpif(args.production, uglify())) .pipe(gulpif(args.production, rev())) - .pipe(gulp.dest('material/assets/javascripts')) + .pipe(gulp.dest("material/assets/javascripts")) .pipe(gulpif(args.production, - rev.manifest('manifest.json', { - base: 'material/assets', + rev.manifest("manifest.json", { + base: "material/assets", merge: true }))) - .pipe(gulpif(args.production, gulp.dest('material/assets'))); -}); + .pipe(gulpif(args.production, gulp.dest("material/assets"))) +}) /* * Copy and minify vector graphics. */ -gulp.task('assets:build:images:svg', function() { - return gulp.src('src/assets/images/**/*.svg') - .pipe(gulpif(watch, changed('material/assets/images'))) +gulp.task("assets:build:images:svg", () => { + return gulp.src("src/assets/images/**/*.svg") + .pipe(gulpif(watch, changed("material/assets/images"))) .pipe(gulpif(args.production, minsvg())) .pipe(gulpif(args.production, rev())) - .pipe(gulp.dest('material/assets/images')) + .pipe(gulp.dest("material/assets/images")) .pipe(gulpif(args.production, - rev.manifest('manifest.json', { - base: 'material/assets', + rev.manifest("manifest.json", { + base: "material/assets", merge: true }))) - .pipe(gulpif(args.production, gulp.dest('material/assets'))); -}); + .pipe(gulpif(args.production, gulp.dest("material/assets"))) +}) /* * Copy favicon. */ -gulp.task('assets:build:images:ico', function() { - return gulp.src('src/assets/images/**/*.ico') - .pipe(gulp.dest('material/assets/images')) -}); +gulp.task("assets:build:images:ico", () => { + return gulp.src("src/assets/images/**/*.ico") + .pipe(gulp.dest("material/assets/images")) +}) /* * Copy images. */ -gulp.task('assets:build:images', [ - 'assets:clean:images' -], function() { +gulp.task("assets:build:images", [ + "assets:clean:images" +], () => { return gulp.start([ - 'assets:build:images:svg', - 'assets:build:images:ico' - ]); -}); + "assets:build:images:svg", + "assets:build:images:ico" + ]) +}) /* * Minify views. */ -gulp.task('assets:build:views', args.production ? [ - 'assets:build:stylesheets', - 'assets:build:modernizr', - 'assets:build:images' -] : [], function() { - var metadata = require('./package.json'); - return gulp.src('src/**/*.html') - .pipe(gulpif(watch, changed('material'))) +gulp.task("assets:build:views", args.production ? [ + "assets:build:stylesheets", + "assets:build:modernizr", + "assets:build:images" +] : [], () => { + var metadata = require("./package.json") + return gulp.src("src/**/*.html") + .pipe(gulpif(watch, changed("material"))) .pipe( minhtml({ collapseBooleanAttributes: true, @@ -313,51 +317,51 @@ gulp.task('assets:build:views', args.production ? [ removeStyleLinkTypeAttributes: true, customAttrCollapse: /(content)/ })) - .pipe(replace('$theme-name$', metadata.name)) - .pipe(replace('$theme-version$', metadata.version)) + .pipe(replace("$theme-name$", metadata.name)) + .pipe(replace("$theme-version$", metadata.version)) .pipe(compact()) .pipe(gulpif(args.production, - version({ manifest: gulp.src('manifest.json') }))) - .pipe(gulp.dest('material')); -}); + version({ manifest: gulp.src("manifest.json") }))) + .pipe(gulp.dest("material")) +}) /* * Build assets. */ -gulp.task('assets:build', [ - 'assets:build:stylesheets', - 'assets:build:javascripts', - 'assets:build:modernizr', - 'assets:build:images', - 'assets:build:views' -]); +gulp.task("assets:build", [ + "assets:build:stylesheets", + "assets:build:javascripts", + "assets:build:modernizr", + "assets:build:images", + "assets:build:views" +]) /* * Watch assets for changes and rebuild on the fly. */ -gulp.task('assets:watch', function() { - watch = true; +gulp.task("assets:watch", () => { + watch = true /* Rebuild stylesheets */ gulp.watch([ - 'src/assets/stylesheets/**/*.scss' - ], ['assets:build:stylesheets']); + "src/assets/stylesheets/**/*.scss" + ], ["assets:build:stylesheets"]) /* Rebuild javascripts */ gulp.watch([ - 'src/assets/javascripts/**/*.js' - ], ['assets:build:javascripts']); + "src/assets/javascripts/**/*.js" + ], ["assets:build:javascripts"]) /* Copy images */ gulp.watch([ - 'src/assets/images/**/*' - ], ['assets:build:images']); + "src/assets/images/**/*" + ], ["assets:build:images"]) /* Minify views */ gulp.watch([ - 'src/**/*.html' - ], ['assets:build:views']); -}); + "src/**/*.html" + ], ["assets:build:views"]) +}) /* ---------------------------------------------------------------------------- * Application server @@ -366,35 +370,35 @@ gulp.task('assets:watch', function() { /* * Build documentation. */ -gulp.task('mkdocs:build', [ - 'assets:build' -], function() { - return child.spawnSync('mkdocs', ['build']); -}); +gulp.task("mkdocs:build", [ + "assets:build" +], () => { + return child.spawnSync("mkdocs", ["build"]) +}) /* * Restart MkDocs server. */ -gulp.task('mkdocs:serve', function() { +gulp.task("mkdocs:serve", () => { if (server) - server.kill(); + server.kill() /* Spawn MkDocs server */ - server = child.spawn('mkdocs', ['serve', '-a', '0.0.0.0:8000']); + server = child.spawn("mkdocs", ["serve", "-a", "0.0.0.0:8000"]) /* Pretty print server log output */ - server.stdout.on('data', function(data) { - var lines = data.toString().split('\n') + server.stdout.on("data", data => { + var lines = data.toString().split("\n") for (var l in lines) if (lines[l].length) - util.log(lines[l]); - }); + util.log(lines[l]) + }) /* Print errors to stdout */ - server.stderr.on('data', function(data) { - process.stdout.write(data.toString()); - }); -}); + server.stderr.on("data", data => { + process.stdout.write(data.toString()) + }) +}) /* ---------------------------------------------------------------------------- * Interface @@ -403,28 +407,28 @@ gulp.task('mkdocs:serve', function() { /* * Build assets and documentation. */ -gulp.task('build', [ - 'assets:clean', - 'assets:build' +gulp.task("build", [ + "assets:clean", + "assets:build" ].concat(args.mkdocs - ? 'mkdocs:build' - : [])); + ? "mkdocs:build" + : [])) /* * Start asset and MkDocs watchdogs. */ -gulp.task('watch', [ - 'assets:clean', - 'assets:build' -], function() { +gulp.task("watch", [ + "assets:clean", + "assets:build" +], () => { return gulp.start([ - 'assets:watch' + "assets:watch" ].concat(args.mkdocs - ? 'mkdocs:serve' - : [])); -}); + ? "mkdocs:serve" + : [])) +}) /* * Build assets by default. */ -gulp.task('default', ['build']); \ No newline at end of file +gulp.task("default", ["build"]) \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in index 83ee74c85..515bad148 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,2 @@ -recursive-include material *.ico *.js *.css *.html *.eot *.svg *.ttf *.woff +recursive-include material *.ico *.js *.css *.html *.svg recursive-exclude site * \ No newline at end of file diff --git a/material/assets/javascripts/application-29b6c4d53e.js b/material/assets/javascripts/application-29b6c4d53e.js new file mode 100644 index 000000000..332855dd1 --- /dev/null +++ b/material/assets/javascripts/application-29b6c4d53e.js @@ -0,0 +1,58 @@ +!function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return e[i].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var o=n(1),r=i(o),s=n(2),a=i(s),c=n(3),l=i(c),u=n(4),h=i(u);document.addEventListener("DOMContentLoaded",function(){Modernizr.addTest("ios",function(){return!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)}),Modernizr.addTest("standalone",function(){return!!navigator.standalone}),r["default"].attach(document.body);var e=window.matchMedia("(min-width: 1200px)"),t=new l["default"](".md-sidebar--primary"),n=function(){e.matches?t.listen():t.unlisten()};n();var i=new l["default"](".md-sidebar--secondary");i.listen();var o=new h["default"](".md-sidebar--secondary .md-nav--secondary .md-nav__link");o.listen(),window.addEventListener("resize",n);var s=document.getElementById("query");s.addEventListener("focus",function(){document.querySelector(".md-search").classList.add("md-js__search--locked")});var c=0,u=document.getElementById("search");u.addEventListener("click",function(e){var t=document.body.classList,n=!matchMedia("only screen and (min-width: 960px)").matches;t.contains("md-js__body--locked")?(t.remove("md-js__body--locked"),n&&setTimeout(function(){window.scrollTo(0,c)},100)):(c=window.scrollY,n&&setTimeout(function(){window.scrollTo(0,0)},400),setTimeout(function(){e.target.checked&&(n&&t.add("md-js__body--locked"),setTimeout(function(){document.getElementById("md-search").focus()},200))},450))});var d=document.querySelectorAll(".md-nav__item--nested > .md-nav__link");[].forEach.call(d,function(e){var t=e.nextElementSibling;t.style.maxHeight=t.getBoundingClientRect().height+"px",e.addEventListener("click",function(){var e=t.getBoundingClientRect().height;e?(t.style.maxHeight=e+"px",requestAnimationFrame(function(){t.classList.add("md-nav--transitioning"),t.style.maxHeight="0px"})):!function(){t.style.maxHeight="",t.classList.add("md-nav--toggled");var e=t.getBoundingClientRect().height;t.classList.remove("md-nav--toggled"),t.style.maxHeight="0px",requestAnimationFrame(function(){t.classList.add("md-nav--transitioning"),t.style.maxHeight=e+"px"})}()}),t.addEventListener("transitionend",function(e){e.target.classList.remove("md-nav--transitioning"),e.target.getBoundingClientRect().height>0&&(e.target.style.maxHeight="100%")})}),fetch("https://api.github.com/repos/squidfunk/mkdocs-material").then(function(e){return e.json()}).then(function(e){var t=e.stargazers_count,n=e.forks_count,i=document.querySelectorAll(".md-source__facts");[].forEach.call(i,function(e){var i=document.createElement("li");i.className="md-source__fact md-source__fact--hidden",i.innerText=t+" Stars",e.appendChild(i),setTimeout(function(e){e.classList.remove("md-source__fact--hidden")},100,i),i=document.createElement("li"),i.className="md-source__fact md-source__fact--hidden",i.innerText=n+" Forks",e.appendChild(i),setTimeout(function(e){e.classList.remove("md-source__fact--hidden")},500,i)})})["catch"](function(){}),fetch("/mkdocs/search_index.json").then(function(e){return e.json()}).then(function(e){var t=(0,a["default"])(function(){(void 0).field("title",{boost:10}),(void 0).field("text"),(void 0).ref("location")}),n={};e.docs.forEach(function(e){e.text=e.text.replace(/\s(\.,\:)\s/gi,function(e,t){return t+" "}),e.location=window.baseUrl+e.location,n[e.location]=e,t.add(e)});var i=document.getElementById("query");i.addEventListener("keyup",function(){for(var e=document.querySelector(".md-search-result__list");e.firstChild;)e.removeChild(e.firstChild);var i=t.search(s.value);i.forEach(function(t){var i=n[t.ref],o=document.createElement("a");o.classList.add("md-search-result__link"),o.href=i.location;var r=document.createElement("li");r.classList.add("md-search-result__item"),r.appendChild(o);var s=document.createElement("div");s.classList.add("md-search-result__title"),s.innerHTML=i.title,o.appendChild(s);var a=document.createElement("p");a.classList.add("md-search-result__description"),a.innerHTML=i.text,o.appendChild(a),e.appendChild(r)});var o=document.querySelector(".md-search-result__meta");o.innerHTML=i.length+" search result"+(1!==i.length?"s":"")})})["catch"](function(){})})},function(e,t,n){var i;!function(){"use strict";/** + * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs. + * + * @codingstandard ftlabs-jsv2 + * @copyright The Financial Times Limited [All Rights Reserved] + * @license MIT License (see LICENSE.txt) + */ +function o(e,t){function n(e,t){return function(){return e.apply(t,arguments)}}var i;if(t=t||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=t.touchBoundary||10,this.layer=e,this.tapDelay=t.tapDelay||200,this.tapTimeout=t.tapTimeout||700,!o.notNeeded(e)){for(var r=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],a=this,c=0,l=r.length;c=0,s=navigator.userAgent.indexOf("Android")>0&&!r,a=/iP(ad|hone|od)/.test(navigator.userAgent)&&!r,c=a&&/OS 4_\d(_\d)?/.test(navigator.userAgent),l=a&&/OS [6-7]_\d/.test(navigator.userAgent),u=navigator.userAgent.indexOf("BB10")>0;o.prototype.needsClick=function(e){switch(e.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(e.disabled)return!0;break;case"input":if(a&&"file"===e.type||e.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(e.className)},o.prototype.needsFocus=function(e){switch(e.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!s;case"input":switch(e.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!e.disabled&&!e.readOnly;default:return/\bneedsfocus\b/.test(e.className)}},o.prototype.sendClick=function(e,t){var n,i;document.activeElement&&document.activeElement!==e&&document.activeElement.blur(),i=t.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(e),!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,e.dispatchEvent(n)},o.prototype.determineEventType=function(e){return s&&"select"===e.tagName.toLowerCase()?"mousedown":"click"},o.prototype.focus=function(e){var t;a&&e.setSelectionRange&&0!==e.type.indexOf("date")&&"time"!==e.type&&"month"!==e.type?(t=e.value.length,e.setSelectionRange(t,t)):e.focus()},o.prototype.updateScrollParent=function(e){var t,n;if(t=e.fastClickScrollParent,!t||!t.contains(e)){n=e;do{if(n.scrollHeight>n.offsetHeight){t=n,e.fastClickScrollParent=n;break}n=n.parentElement}while(n)}t&&(t.fastClickLastScrollTop=t.scrollTop)},o.prototype.getTargetElementFromEventTarget=function(e){return e.nodeType===Node.TEXT_NODE?e.parentNode:e},o.prototype.onTouchStart=function(e){var t,n,i;if(e.targetTouches.length>1)return!0;if(t=this.getTargetElementFromEventTarget(e.target),n=e.targetTouches[0],a){if(i=window.getSelection(),i.rangeCount&&!i.isCollapsed)return!0;if(!c){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return e.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(t)}}return this.trackingClick=!0,this.trackingClickStart=e.timeStamp,this.targetElement=t,this.touchStartX=n.pageX,this.touchStartY=n.pageY,e.timeStamp-this.lastClickTimen||Math.abs(t.pageY-this.touchStartY)>n},o.prototype.onTouchMove=function(e){return!this.trackingClick||((this.targetElement!==this.getTargetElementFromEventTarget(e.target)||this.touchHasMoved(e))&&(this.trackingClick=!1,this.targetElement=null),!0)},o.prototype.findControl=function(e){return void 0!==e.control?e.control:e.htmlFor?document.getElementById(e.htmlFor):e.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},o.prototype.onTouchEnd=function(e){var t,n,i,o,r,u=this.targetElement;if(!this.trackingClick)return!0;if(e.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=e.timeStamp,n=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,l&&(r=e.changedTouches[0],u=document.elementFromPoint(r.pageX-window.pageXOffset,r.pageY-window.pageYOffset)||u,u.fastClickScrollParent=this.targetElement.fastClickScrollParent),i=u.tagName.toLowerCase(),"label"===i){if(t=this.findControl(u)){if(this.focus(u),s)return!1;u=t}}else if(this.needsFocus(u))return e.timeStamp-n>100||a&&window.top!==window&&"input"===i?(this.targetElement=null,!1):(this.focus(u),this.sendClick(u,e),a&&"select"===i||(this.targetElement=null,e.preventDefault()),!1);return!(!a||c||(o=u.fastClickScrollParent,!o||o.fastClickLastScrollTop===o.scrollTop))||(this.needsClick(u)||(e.preventDefault(),this.sendClick(u,e)),!1)},o.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},o.prototype.onMouse=function(e){return!this.targetElement||(!!e.forwardedTouchEvent||(!e.cancelable||(!(!this.needsClick(this.targetElement)||this.cancelNextClick)||(e.stopImmediatePropagation?e.stopImmediatePropagation():e.propagationStopped=!0,e.stopPropagation(),e.preventDefault(),!1))))},o.prototype.onClick=function(e){var t;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===e.target.type&&0===e.detail||(t=this.onMouse(e),t||(this.targetElement=null),t)},o.prototype.destroy=function(){var e=this.layer;s&&(e.removeEventListener("mouseover",this.onMouse,!0),e.removeEventListener("mousedown",this.onMouse,!0),e.removeEventListener("mouseup",this.onMouse,!0)),e.removeEventListener("click",this.onClick,!0),e.removeEventListener("touchstart",this.onTouchStart,!1),e.removeEventListener("touchmove",this.onTouchMove,!1),e.removeEventListener("touchend",this.onTouchEnd,!1),e.removeEventListener("touchcancel",this.onTouchCancel,!1)},o.notNeeded=function(e){var t,n,i,o;if("undefined"==typeof window.ontouchstart)return!0;if(n=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!s)return!0;if(t=document.querySelector("meta[name=viewport]")){if(t.content.indexOf("user-scalable=no")!==-1)return!0;if(n>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(u&&(i=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),i[1]>=10&&i[2]>=3&&(t=document.querySelector("meta[name=viewport]")))){if(t.content.indexOf("user-scalable=no")!==-1)return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===e.style.msTouchAction||"manipulation"===e.style.touchAction||(o=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],!!(o>=27&&(t=document.querySelector("meta[name=viewport]"),t&&(t.content.indexOf("user-scalable=no")!==-1||document.documentElement.scrollWidth<=window.outerWidth)))||("none"===e.style.touchAction||"manipulation"===e.style.touchAction))},o.attach=function(e,t){return new o(e,t)},i=function(){return o}.call(t,n,t,e),!(void 0!==i&&(e.exports=i))}()},function(e,t,n){var i,o;!function(){var r=function(e){var t=new r.Index;return t.pipeline.add(r.trimmer,r.stopWordFilter,r.stemmer),e&&e.call(t,t),t};r.version="0.7.1",/*! + * lunr.utils + * Copyright (C) 2016 Oliver Nightingale + */ +r.utils={},r.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),r.utils.asString=function(e){return void 0===e||null===e?"":e.toString()},/*! + * lunr.EventEmitter + * Copyright (C) 2016 Oliver Nightingale + */ +r.EventEmitter=function(){this.events={}},r.EventEmitter.prototype.addListener=function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),n=e;if("function"!=typeof t)throw new TypeError("last argument must be a function");n.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},r.EventEmitter.prototype.removeListener=function(e,t){if(this.hasHandler(e)){var n=this.events[e].indexOf(t);this.events[e].splice(n,1),this.events[e].length||delete this.events[e]}},r.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){var t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)})}},r.EventEmitter.prototype.hasHandler=function(e){return e in this.events},/*! + * lunr.tokenizer + * Copyright (C) 2016 Oliver Nightingale + */ +r.tokenizer=function(e){return arguments.length&&null!=e&&void 0!=e?Array.isArray(e)?e.map(function(e){return r.utils.asString(e).toLowerCase()}):e.toString().trim().toLowerCase().split(r.tokenizer.seperator):[]},r.tokenizer.seperator=/[\s\-]+/,r.tokenizer.load=function(e){var t=this.registeredFunctions[e];if(!t)throw new Error("Cannot load un-registered function: "+e);return t},r.tokenizer.label="default",r.tokenizer.registeredFunctions={"default":r.tokenizer},r.tokenizer.registerFunction=function(e,t){t in this.registeredFunctions&&r.utils.warn("Overwriting existing tokenizer: "+t),e.label=t,this.registeredFunctions[t]=e},/*! + * lunr.Pipeline + * Copyright (C) 2016 Oliver Nightingale + */ +r.Pipeline=function(){this._stack=[]},r.Pipeline.registeredFunctions={},r.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&r.utils.warn("Overwriting existing registered function: "+t),e.label=t,r.Pipeline.registeredFunctions[e.label]=e},r.Pipeline.warnIfFunctionNotRegistered=function(e){var t=e.label&&e.label in this.registeredFunctions;t||r.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},r.Pipeline.load=function(e){var t=new r.Pipeline;return e.forEach(function(e){var n=r.Pipeline.registeredFunctions[e];if(!n)throw new Error("Cannot load un-registered function: "+e);t.add(n)}),t},r.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){r.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},r.Pipeline.prototype.after=function(e,t){r.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(n==-1)throw new Error("Cannot find existingFn");n+=1,this._stack.splice(n,0,t)},r.Pipeline.prototype.before=function(e,t){r.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(n==-1)throw new Error("Cannot find existingFn");this._stack.splice(n,0,t)},r.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},r.Pipeline.prototype.run=function(e){for(var t=[],n=e.length,i=this._stack.length,o=0;on.idx?n=n.next:(i+=t.val*n.val,t=t.next,n=n.next);return i},r.Vector.prototype.similarity=function(e){return this.dot(e)/(this.magnitude()*e.magnitude())},/*! + * lunr.SortedSet + * Copyright (C) 2016 Oliver Nightingale + */ +r.SortedSet=function(){this.length=0,this.elements=[]},r.SortedSet.load=function(e){var t=new this;return t.elements=e,t.length=e.length,t},r.SortedSet.prototype.add=function(){var e,t;for(e=0;e1;){if(r===e)return o;re&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o]}return r===e?o:-1},r.SortedSet.prototype.locationFor=function(e){for(var t=0,n=this.elements.length,i=n-t,o=t+Math.floor(i/2),r=this.elements[o];i>1;)re&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o];return r>e?o:ro-1||i>s-1)break;a[n]!==c[i]?a[n]c[i]&&i++:(t.add(a[n]),n++,i++)}return t},r.SortedSet.prototype.clone=function(){var e=new r.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},r.SortedSet.prototype.union=function(e){var t,n,i;this.length>=e.length?(t=this,n=e):(t=e,n=this),i=t.clone();for(var o=0,r=n.toArray();o0&&(i=1+Math.log(this.documentStore.length/n)),this._idfCache[t]=i},r.Index.prototype.search=function(e){var t=this.pipeline.run(this.tokenizerFn(e)),n=new r.Vector,i=[],o=this._fields.reduce(function(e,t){return e+t.boost},0),s=t.some(function(e){return this.tokenStore.has(e)},this);if(!s)return[];t.forEach(function(e,t,s){var a=1/s.length*this._fields.length*o,c=this,l=this.tokenStore.expand(e).reduce(function(t,i){var o=c.corpusTokens.indexOf(i),s=c.idf(i),l=1,u=new r.SortedSet;if(i!==e){var h=Math.max(3,i.length-e.length);l=1/Math.log(h)}o>-1&&n.insert(o,a*s*l);for(var d=c.tokenStore.get(i),f=Object.keys(d),p=f.length,m=0;m0&&this.el_[e-1].classList.add("md-nav__link--marked"),this.index_=e}else for(var n=this.index_;n>=0;n--){var i=document.querySelector(this.el_[n].hash);if(!(i.offsetTop>window.pageYOffset)){this.index_=n;break}n>0&&this.el_[n-1].classList.remove("md-nav__link--marked")}this.offset_=window.pageYOffset}},{key:"reset",value:function(){[].forEach.call(this.el_,function(e){e.classList.remove("md-nav__link--marked")})}},{key:"listen",value:function(){var e=this;["scroll","resize","orientationchange"].forEach(function(t){window.addEventListener(t,e.handler_,!1)}),this.update()}},{key:"unlisten",value:function(){var e=this;["scroll","resize","orientationchange"].forEach(function(t){window.removeEventListener(t,e.handler_,!1)}),this.reset()}}]),e}();t["default"]=o}]); \ No newline at end of file diff --git a/material/assets/javascripts/application-a233641b81.js b/material/assets/javascripts/application-a233641b81.js deleted file mode 100644 index e2f8bc10a..000000000 --- a/material/assets/javascripts/application-a233641b81.js +++ /dev/null @@ -1,8 +0,0 @@ -!function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return e[i].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var o=n(1),r=i(o),a=n(2),s=i(a),c=n(3),l=i(c),u=n(4);i(u);document.addEventListener("DOMContentLoaded",function(){Modernizr.addTest("ios",function(){return!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)}),Modernizr.addTest("standalone",function(){return!!navigator.standalone}),r["default"].attach(document.body);var e=window.matchMedia("(min-width: 1200px)"),t=function(){e.matches?n.listen():n.unlisten()},n=new s["default"](".md-sidebar--primary");t();var i=new s["default"](".md-sidebar--secondary");i.listen();var o=new l["default"](".md-sidebar--secondary .md-nav--secondary .md-nav__link");o.listen(),window.addEventListener("resize",t);var a=0,c=document.getElementById("search");c.addEventListener("click",function(e){var t=document.body.classList,n=!matchMedia("only screen and (min-width: 960px)").matches;t.contains("md-js__body--locked")?(t.remove("md-js__body--locked"),n&&setTimeout(function(){window.scrollTo(0,a)},100)):(a=window.scrollY,n&&setTimeout(function(){window.scrollTo(0,0)},400),setTimeout(function(){this.checked&&(n&&t.add("md-js__body--locked"),setTimeout(function(){document.getElementById("md-search").focus()},200))}.bind(this),450))});var u=document.querySelectorAll(".md-nav__item--nested > .md-nav__link");[].forEach.call(u,function(e){var t=e.nextElementSibling;t.style.maxHeight=t.getBoundingClientRect().height+"px",e.addEventListener("click",function(){var e=t.getBoundingClientRect().height;e?(console.log("closing"),t.style.maxHeight=e+"px",requestAnimationFrame(function(){t.classList.add("md-nav--transitioning"),t.style.maxHeight="0px"})):!function(){console.log("opening"),t.style.maxHeight="",t.classList.add("md-nav--toggled");var e=t.getBoundingClientRect().height;t.classList.remove("md-nav--toggled"),t.style.maxHeight="0px",requestAnimationFrame(function(){t.classList.add("md-nav--transitioning"),t.style.maxHeight=e+"px"})}()}),t.addEventListener("transitionend",function(){this.classList.remove("md-nav--transitioning"),this.getBoundingClientRect().height>0&&(this.style.maxHeight="100%")})}),fetch("https://api.github.com/repos/squidfunk/mkdocs-material").then(function(e){return e.json()}).then(function(e){var t=e.stargazers_count,n=e.forks_count,i=document.querySelectorAll(".md-source__facts");[].forEach.call(i,function(e){var i=document.createElement("li");i.className="md-source__fact md-source__fact--hidden",i.innerText=t+" Stars",e.appendChild(i),setTimeout(function(e){e.classList.remove("md-source__fact--hidden")},100,i),i=document.createElement("li"),i.className="md-source__fact md-source__fact--hidden",i.innerText=n+" Forks",e.appendChild(i),setTimeout(function(e){e.classList.remove("md-source__fact--hidden")},500,i)})})["catch"](function(e){console.log("parsing failed",e)})})},function(e,t,n){var i;!function(){"use strict";/** - * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs. - * - * @codingstandard ftlabs-jsv2 - * @copyright The Financial Times Limited [All Rights Reserved] - * @license MIT License (see LICENSE.txt) - */ -function o(e,t){function n(e,t){return function(){return e.apply(t,arguments)}}var i;if(t=t||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=t.touchBoundary||10,this.layer=e,this.tapDelay=t.tapDelay||200,this.tapTimeout=t.tapTimeout||700,!o.notNeeded(e)){for(var r=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],s=this,c=0,l=r.length;c=0,a=navigator.userAgent.indexOf("Android")>0&&!r,s=/iP(ad|hone|od)/.test(navigator.userAgent)&&!r,c=s&&/OS 4_\d(_\d)?/.test(navigator.userAgent),l=s&&/OS [6-7]_\d/.test(navigator.userAgent),u=navigator.userAgent.indexOf("BB10")>0;o.prototype.needsClick=function(e){switch(e.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(e.disabled)return!0;break;case"input":if(s&&"file"===e.type||e.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(e.className)},o.prototype.needsFocus=function(e){switch(e.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!a;case"input":switch(e.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!e.disabled&&!e.readOnly;default:return/\bneedsfocus\b/.test(e.className)}},o.prototype.sendClick=function(e,t){var n,i;document.activeElement&&document.activeElement!==e&&document.activeElement.blur(),i=t.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(e),!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,e.dispatchEvent(n)},o.prototype.determineEventType=function(e){return a&&"select"===e.tagName.toLowerCase()?"mousedown":"click"},o.prototype.focus=function(e){var t;s&&e.setSelectionRange&&0!==e.type.indexOf("date")&&"time"!==e.type&&"month"!==e.type?(t=e.value.length,e.setSelectionRange(t,t)):e.focus()},o.prototype.updateScrollParent=function(e){var t,n;if(t=e.fastClickScrollParent,!t||!t.contains(e)){n=e;do{if(n.scrollHeight>n.offsetHeight){t=n,e.fastClickScrollParent=n;break}n=n.parentElement}while(n)}t&&(t.fastClickLastScrollTop=t.scrollTop)},o.prototype.getTargetElementFromEventTarget=function(e){return e.nodeType===Node.TEXT_NODE?e.parentNode:e},o.prototype.onTouchStart=function(e){var t,n,i;if(e.targetTouches.length>1)return!0;if(t=this.getTargetElementFromEventTarget(e.target),n=e.targetTouches[0],s){if(i=window.getSelection(),i.rangeCount&&!i.isCollapsed)return!0;if(!c){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return e.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(t)}}return this.trackingClick=!0,this.trackingClickStart=e.timeStamp,this.targetElement=t,this.touchStartX=n.pageX,this.touchStartY=n.pageY,e.timeStamp-this.lastClickTimen||Math.abs(t.pageY-this.touchStartY)>n},o.prototype.onTouchMove=function(e){return!this.trackingClick||((this.targetElement!==this.getTargetElementFromEventTarget(e.target)||this.touchHasMoved(e))&&(this.trackingClick=!1,this.targetElement=null),!0)},o.prototype.findControl=function(e){return void 0!==e.control?e.control:e.htmlFor?document.getElementById(e.htmlFor):e.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},o.prototype.onTouchEnd=function(e){var t,n,i,o,r,u=this.targetElement;if(!this.trackingClick)return!0;if(e.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=e.timeStamp,n=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,l&&(r=e.changedTouches[0],u=document.elementFromPoint(r.pageX-window.pageXOffset,r.pageY-window.pageYOffset)||u,u.fastClickScrollParent=this.targetElement.fastClickScrollParent),i=u.tagName.toLowerCase(),"label"===i){if(t=this.findControl(u)){if(this.focus(u),a)return!1;u=t}}else if(this.needsFocus(u))return e.timeStamp-n>100||s&&window.top!==window&&"input"===i?(this.targetElement=null,!1):(this.focus(u),this.sendClick(u,e),s&&"select"===i||(this.targetElement=null,e.preventDefault()),!1);return!(!s||c||(o=u.fastClickScrollParent,!o||o.fastClickLastScrollTop===o.scrollTop))||(this.needsClick(u)||(e.preventDefault(),this.sendClick(u,e)),!1)},o.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},o.prototype.onMouse=function(e){return!this.targetElement||(!!e.forwardedTouchEvent||(!e.cancelable||(!(!this.needsClick(this.targetElement)||this.cancelNextClick)||(e.stopImmediatePropagation?e.stopImmediatePropagation():e.propagationStopped=!0,e.stopPropagation(),e.preventDefault(),!1))))},o.prototype.onClick=function(e){var t;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===e.target.type&&0===e.detail||(t=this.onMouse(e),t||(this.targetElement=null),t)},o.prototype.destroy=function(){var e=this.layer;a&&(e.removeEventListener("mouseover",this.onMouse,!0),e.removeEventListener("mousedown",this.onMouse,!0),e.removeEventListener("mouseup",this.onMouse,!0)),e.removeEventListener("click",this.onClick,!0),e.removeEventListener("touchstart",this.onTouchStart,!1),e.removeEventListener("touchmove",this.onTouchMove,!1),e.removeEventListener("touchend",this.onTouchEnd,!1),e.removeEventListener("touchcancel",this.onTouchCancel,!1)},o.notNeeded=function(e){var t,n,i,o;if("undefined"==typeof window.ontouchstart)return!0;if(n=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!a)return!0;if(t=document.querySelector("meta[name=viewport]")){if(t.content.indexOf("user-scalable=no")!==-1)return!0;if(n>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(u&&(i=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),i[1]>=10&&i[2]>=3&&(t=document.querySelector("meta[name=viewport]")))){if(t.content.indexOf("user-scalable=no")!==-1)return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===e.style.msTouchAction||"manipulation"===e.style.touchAction||(o=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],!!(o>=27&&(t=document.querySelector("meta[name=viewport]"),t&&(t.content.indexOf("user-scalable=no")!==-1||document.documentElement.scrollWidth<=window.outerWidth)))||("none"===e.style.touchAction||"manipulation"===e.style.touchAction))},o.attach=function(e,t){return new o(e,t)},i=function(){return o}.call(t,n,t,e),!(void 0!==i&&(e.exports=i))}()},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0&&this.el_[t-1].classList.add("md-nav__link--marked"),this.index_=t}else for(var i=this.index_;i>=0;i--){var o=document.querySelector(this.el_[i].hash);if(!(o.offsetTop>window.pageYOffset)){this.index_=i;break}i>0&&this.el_[i-1].classList.remove("md-nav__link--marked")}this.offset_=window.pageYOffset}},{key:"reset",value:function(){[].forEach.call(this.el_,function(e){e.classList.remove("md-nav__link--marked")})}},{key:"listen",value:function(){var e=this;["scroll","resize","orientationchange"].forEach(function(t){window.addEventListener(t,e.handler_,!1)}),this.update()}},{key:"unlisten",value:function(){var e=this;["scroll","resize","orientationchange"].forEach(function(t){window.removeEventListener(t,e.handler_,!1)}),this.reset()}}]),e}();t["default"]=o},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=C.elements;return"string"==typeof e?e.split(" "):e}function o(e,t){var n=C.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),C.elements=n+" "+e,l(t)}function i(e){var t=x[e[E]];return t||(t={},w++,e[E]=w,x[w]=t),t}function a(e,n,r){if(n||(n=t),v)return n.createElement(e);r||(r=i(n));var o;return o=r.cache[e]?r.cache[e].cloneNode():b.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!o.canHaveChildren||S.test(e)||o.tagUrn?o:r.frag.appendChild(o)}function s(e,n){if(e||(e=t),v)return e.createDocumentFragment();n=n||i(e);for(var o=n.frag.cloneNode(),a=0,s=r(),c=s.length;a+~])("+r().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),a="$1"+_+"\\:$2";o--;)t=n[o]=n[o].split("}"),t[t.length-1]=t[t.length-1].replace(i,a),n[o]=t.join("}");return n.join("{")}function p(e){for(var t=e.length;t--;)e[t].removeNode()}function m(e){function t(){clearTimeout(a._removeSheetTimer),r&&r.removeNode(!0),r=null}var r,o,a=i(e),s=e.namespaces,c=e.parentWindow;return!N||e.printShived?e:("undefined"==typeof s[_]&&s.add(_),c.attachEvent("onbeforeprint",function(){t();for(var i,a,s,c=e.styleSheets,l=[],f=c.length,p=Array(f);f--;)p[f]=c[f];for(;s=p.pop();)if(!s.disabled&&T.test(s.media)){try{i=s.imports,a=i.length}catch(m){a=0}for(f=0;f",h="hidden"in e,v=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){h=!0,v=!0}}();var C={elements:y.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:g,shivCSS:y.shivCSS!==!1,supportsUnknownElements:v,shivMethods:y.shivMethods!==!1,type:"default",shivDocument:l,createElement:a,createDocumentFragment:s,addElements:o};e.html5=C,l(t);var T=/^$|\b(?:all|print)\b/,_="html5shiv",N=!v&&function(){var n=t.documentElement;return!("undefined"==typeof t.namespaces||"undefined"==typeof t.parentWindow||"undefined"==typeof n.applyElement||"undefined"==typeof n.removeNode||"undefined"==typeof e.attachEvent)}();C.type+=" print",C.shivPrint=m,m(t),"object"==typeof module&&module.exports&&(module.exports=C)}("undefined"!=typeof e?e:this,t);var _={elem:l("modernizr")};E._q.push(function(){delete _.elem});var N={style:_.elem.style};E._q.unshift(function(){delete N.style});b.testProp=function(e,t,r){return h([e],n,t,r)};E.addTest("svg",!!t.createElementNS&&!!t.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect);var j=b.testStyles=f,k=function(){var e=navigator.userAgent,t=e.match(/applewebkit\/([0-9]+)/gi)&&parseFloat(RegExp.$1),n=e.match(/w(eb)?osbrowser/gi),r=e.match(/windows phone/gi)&&e.match(/iemobile\/([0-9])+/gi)&&parseFloat(RegExp.$1)>=9,o=t<533&&e.match(/android/gi);return n||o||r}();k?E.addTest("fontface",!1):j('@font-face {font-family:"font";src:url("https://")}',function(e,n){var r=t.getElementById("smodernizr"),o=r.sheet||r.styleSheet,i=o?o.cssRules&&o.cssRules[0]?o.cssRules[0].cssText:o.cssText||"":"",a=/src/i.test(i)&&0===i.indexOf(n.split(" ")[0]);E.addTest("fontface",a)});var z="Moz O ms Webkit",A=b._config.usePrefixes?z.split(" "):[];b._cssomPrefixes=A;var P=b._config.usePrefixes?z.toLowerCase().split(" "):[];b._domPrefixes=P,b.testAllProps=g,b.testAllProps=y;var F="CSS"in e&&"supports"in e.CSS,$="supportsCSS"in e;E.addTest("supports",F||$),E.addTest("csstransforms3d",function(){var e=!!y("perspective","1px",!0),t=E._config.usePrefixes;if(e&&(!t||"webkitPerspective"in C.style)){var n,r="#modernizr{width:0;height:0}";E.supports?n="@supports (perspective: 1px)":(n="@media (transform-3d)",t&&(n+=",(-webkit-transform-3d)")),n+="{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}",j(r+n,function(t){e=7===t.offsetWidth&&18===t.offsetHeight})}return e});var R=function(){function e(e,t){var o;return!!e&&(t&&"string"!=typeof t||(t=l(t||"div")),e="on"+e,o=e in t,!o&&r&&(t.setAttribute||(t=l("div")),t.setAttribute(e,""),o="function"==typeof t[e],t[e]!==n&&(t[e]=n),t.removeAttribute(e)),o)}var r=!("onblur"in t.documentElement);return e}();b.hasEvent=R,E.addTest("inputsearchevent",R("search")),E.addTest("json","JSON"in e&&"parse"in JSON&&"stringify"in JSON),E.addTest("checked",function(){return j("#modernizr {position:absolute} #modernizr input {margin-left:10px} #modernizr :checked {margin-left:20px;display:block}",function(e){var t=l("input");return t.setAttribute("type","checkbox"),t.setAttribute("checked","checked"),e.appendChild(t),20===t.offsetLeft})}),E.addTest("target",function(){var t=e.document;if(!("querySelectorAll"in t))return!1;try{return t.querySelectorAll(":target"),!0}catch(n){return!1}}),E.addTest("contains",r(String.prototype.contains,"function")),o(),i(x),delete b.addTest,delete b.addAsyncTest;for(var q=0;q",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=C.elements;return"string"==typeof e?e.split(" "):e}function o(e,t){var n=C.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),C.elements=n+" "+e,c(t)}function i(e){var t=x[e[b]];return t||(t={},w++,e[b]=w,x[w]=t),t}function a(e,n,r){if(n||(n=t),g)return n.createElement(e);r||(r=i(n));var o;return o=r.cache[e]?r.cache[e].cloneNode():E.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!o.canHaveChildren||S.test(e)||o.tagUrn?o:r.frag.appendChild(o)}function s(e,n){if(e||(e=t),g)return e.createDocumentFragment();n=n||i(e);for(var o=n.frag.cloneNode(),a=0,s=r(),l=s.length;a+~])("+r().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),a="$1"+_+"\\:$2";o--;)t=n[o]=n[o].split("}"),t[t.length-1]=t[t.length-1].replace(i,a),n[o]=t.join("}");return n.join("{")}function p(e){for(var t=e.length;t--;)e[t].removeNode()}function m(e){function t(){clearTimeout(a._removeSheetTimer),r&&r.removeNode(!0),r=null}var r,o,a=i(e),s=e.namespaces,l=e.parentWindow;return!N||e.printShived?e:("undefined"==typeof s[_]&&s.add(_),l.attachEvent("onbeforeprint",function(){t();for(var i,a,s,l=e.styleSheets,c=[],f=l.length,p=Array(f);f--;)p[f]=l[f];for(;s=p.pop();)if(!s.disabled&&T.test(s.media)){try{i=s.imports,a=i.length}catch(m){a=0}for(f=0;f",h="hidden"in e,g=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){h=!0,g=!0}}();var C={elements:y.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:v,shivCSS:y.shivCSS!==!1,supportsUnknownElements:g,shivMethods:y.shivMethods!==!1,type:"default",shivDocument:c,createElement:a,createDocumentFragment:s,addElements:o};e.html5=C,c(t);var T=/^$|\b(?:all|print)\b/,_="html5shiv",N=!g&&function(){var n=t.documentElement;return!("undefined"==typeof t.namespaces||"undefined"==typeof t.parentWindow||"undefined"==typeof n.applyElement||"undefined"==typeof n.removeNode||"undefined"==typeof e.attachEvent)}();C.type+=" print",C.shivPrint=m,m(t),"object"==typeof module&&module.exports&&(module.exports=C)}("undefined"!=typeof e?e:this,t);var _={elem:c("modernizr")};b._q.push(function(){delete _.elem});var N={style:_.elem.style};b._q.unshift(function(){delete N.style});E.testProp=function(e,t,r){return h([e],n,t,r)};b.addTest("svg",!!t.createElementNS&&!!t.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect);var j=E.testStyles=f,k=function(){var e=navigator.userAgent,t=e.match(/applewebkit\/([0-9]+)/gi)&&parseFloat(RegExp.$1),n=e.match(/w(eb)?osbrowser/gi),r=e.match(/windows phone/gi)&&e.match(/iemobile\/([0-9])+/gi)&&parseFloat(RegExp.$1)>=9,o=t<533&&e.match(/android/gi);return n||o||r}();k?b.addTest("fontface",!1):j('@font-face {font-family:"font";src:url("https://")}',function(e,n){var r=t.getElementById("smodernizr"),o=r.sheet||r.styleSheet,i=o?o.cssRules&&o.cssRules[0]?o.cssRules[0].cssText:o.cssText||"":"",a=/src/i.test(i)&&0===i.indexOf(n.split(" ")[0]);b.addTest("fontface",a)});var z="Moz O ms Webkit",P=E._config.usePrefixes?z.split(" "):[];E._cssomPrefixes=P;var A=E._config.usePrefixes?z.toLowerCase().split(" "):[];E._domPrefixes=A,E.testAllProps=v,E.testAllProps=y;var F="CSS"in e&&"supports"in e.CSS,$="supportsCSS"in e;b.addTest("supports",F||$),b.addTest("csstransforms3d",function(){var e=!!y("perspective","1px",!0),t=b._config.usePrefixes;if(e&&(!t||"webkitPerspective"in C.style)){var n,r="#modernizr{width:0;height:0}";b.supports?n="@supports (perspective: 1px)":(n="@media (transform-3d)",t&&(n+=",(-webkit-transform-3d)")),n+="{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}",j(r+n,function(t){e=7===t.offsetWidth&&18===t.offsetHeight})}return e}),b.addTest("json","JSON"in e&&"parse"in JSON&&"stringify"in JSON),b.addTest("checked",function(){return j("#modernizr {position:absolute} #modernizr input {margin-left:10px} #modernizr :checked {margin-left:20px;display:block}",function(e){var t=c("input");return t.setAttribute("type","checkbox"),t.setAttribute("checked","checked"),e.appendChild(t),20===t.offsetLeft})}),b.addTest("target",function(){var t=e.document;if(!("querySelectorAll"in t))return!1;try{return t.querySelectorAll(":target"),!0}catch(n){return!1}}),b.addTest("contains",r(String.prototype.contains,"function")),o(),i(x),delete E.addTest,delete E.addAsyncTest;for(var R=0;Rcode{font-size:inherit}.md-typeset>div>pre::-webkit-scrollbar,.md-typeset>pre>code::-webkit-scrollbar{width:.4rem;height:.4rem}.md-typeset>div>pre::-webkit-scrollbar-thumb,.md-typeset>pre>code::-webkit-scrollbar-thumb{background:rgba(0,0,0,.26)}.md-typeset kbd{display:inline-block;padding:.4rem .5rem .5rem;border:.1rem solid #c9c9c9;border-radius:.3rem;border-bottom-color:#bcbcbc;background-color:#fcfcfc;color:#555;font-size:85%;line-height:1rem;box-shadow:inset 0 -.1rem 0 #b0b0b0;vertical-align:.1rem;word-break:break-word}.md-typeset small{opacity:.75}.md-typeset sub,.md-typeset sup{margin-left:.1rem}.md-typeset blockquote{padding-left:1.2rem;border-left:.4rem solid rgba(0,0,0,.26);color:rgba(0,0,0,.54)}.md-typeset ul{list-style-type:disc}.md-typeset ol ol{list-style-type:lower-alpha}.md-typeset ol ol ol{list-style-type:lower-roman}.md-typeset ol,.md-typeset ul{margin-left:1rem;padding:0}.md-typeset ol li,.md-typeset ul li{margin-bottom:.5em;margin-left:2rem}.md-typeset ol li blockquote,.md-typeset ol li p,.md-typeset ul li blockquote,.md-typeset ul li p{margin:.5em 0}.md-typeset ol li:last-child,.md-typeset ul li:last-child{margin-bottom:0}.md-typeset ol li ol,.md-typeset ol li ul,.md-typeset ul li ol,.md-typeset ul li ul{margin-bottom:1rem;margin-left:1rem;padding-top:1rem}html{height:100%;font-size:62.5%}body{position:relative;min-height:100%}body.md-js__body--locked{height:100%;overflow:hidden}hr{display:block;height:.1rem;padding:0;border:0}.md-grid{max-width:120rem;margin-right:auto;margin-left:auto}.md-container,.md-main{overflow:auto}.md-main{margin-top:5.6rem}.md-main__inner{margin-top:3rem;margin-bottom:9.2rem;overflow:auto}.md-toggle{display:none}.md-overlay{position:fixed;top:0;width:0;height:0;-webkit-transition:width 0s .25s,height 0s .25s,opacity .25s;transition:width 0s .25s,height 0s .25s,opacity .25s;background:rgba(0,0,0,.54);opacity:0;z-index:2}.md-flex{display:table}.md-flex__cell{display:table-cell;position:relative;vertical-align:top}.md-flex__cell--shrink{width:0}.md-flex__cell--stretch{display:table;width:100%;table-layout:fixed}.md-flex__ellipsis{display:table-cell;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.md-content__inner{margin:2.4rem 1.6rem}.md-content__copyright{display:block}.md-header{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2);position:fixed;top:0;right:0;left:0;height:5.6rem;background:#3f51b5;color:#fff;z-index:1}.md-header-nav{padding:.4rem}.md-header-nav__icon{position:relative;-webkit-transition:opacity .25s;transition:opacity .25s;z-index:1}.md-header-nav__icon:hover{opacity:.7}.md-header-nav__title{padding:0 2rem;font-size:1.8rem;line-height:4.8rem}.md-header-nav__source{display:none}.md-footer{position:absolute;bottom:0;width:100%}.md-footer-pagination{background:rgba(0,0,0,.87);color:#fff}.md-footer-nav{padding:.4rem;overflow:auto}.md-footer-nav__link{padding-top:2.8rem;padding-bottom:.8rem;-webkit-transition:opacity .25s;transition:opacity .25s}.md-footer-nav__link:hover{opacity:.7}.md-footer-nav__link--prev{width:25%;float:left}.md-footer-nav__link--next{width:75%;float:right;text-align:right}.md-footer-nav__icon{-webkit-transition:background .25s;transition:background .25s}.md-footer-nav__title{position:relative;padding:0 .4rem;font-size:1.8rem;line-height:4.8rem}.md-footer-nav__direction{position:absolute;right:0;left:0;margin-top:-2rem;padding:0 .4rem;color:hsla(0,0%,100%,.7);font-size:1.5rem}.md-nav{font-size:1.28rem;line-height:1.3}.md-nav--secondary{border-left:.4rem solid #3f51b5}.md-nav__title{display:block;padding:1.2rem 1.2rem 0;font-weight:700;text-overflow:ellipsis;overflow:hidden}.md-nav__title:before{display:none;content:"arrow_back"}.md-nav__list{margin:0;padding:0;list-style:none}.md-nav__item{padding:.625em 1.2rem 0}.md-nav__item:last-child{padding-bottom:1.2rem}.md-nav__item .md-nav__item{padding-right:0}.md-nav__item .md-nav__item:last-child{padding-bottom:0}.md-nav__link{display:block;-webkit-transition:color .125s;transition:color .125s;text-overflow:ellipsis;cursor:pointer;overflow:hidden}.md-nav__item--nested>.md-nav__link:after{content:"expand_more"}html .md-nav__link[for=toc],html .md-nav__link[for=toc]+.md-nav__link:after,html .md-nav__link[for=toc]~.md-nav{display:none}.md-nav__link--marked{color:rgba(0,0,0,.54)}.md-nav__link--active,.md-nav__link:active,.md-nav__link:hover{color:#536dfe}.md-nav__source{display:none}.md-search{padding:.8rem .8rem 0}.no-js .md-search{display:none}.md-search__form{position:relative;border-radius:.2rem;text-align:right}.md-search__icon{position:absolute;top:.8rem;left:1.2rem;-webkit-transition:color .25s;transition:color .25s;font-size:2.4rem;cursor:pointer}.md-search__input{padding:0 1.6rem 0 6.4rem;border-radius:.2rem;text-overflow:ellipsis}.md-search__input+.md-search__icon,.md-search__input::-webkit-input-placeholder{color:rgba(0,0,0,.54)}.md-search__input+.md-search__icon,.md-search__input::-moz-placeholder{color:rgba(0,0,0,.54)}.md-search__input+.md-search__icon,.md-search__input:-ms-input-placeholder{color:rgba(0,0,0,.54)}.md-search__input+.md-search__icon,.md-search__input::placeholder{color:rgba(0,0,0,.54)}.md-sidebar{position:relative;width:24.2rem;float:left;overflow:visible}.md-sidebar.md-js__sidebar--locked{position:fixed;top:5.6rem}.md-sidebar--secondary{display:none}.md-sidebar__scrollwrap{margin:2.4rem .4rem;overflow-y:scroll}.js .md-sidebar__scrollwrap{position:absolute;top:0;right:0;bottom:0;left:0}.md-sidebar__scrollwrap::-webkit-scrollbar{width:.4rem;height:.4rem}.md-sidebar__scrollwrap::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.26)}.md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover{background-color:#536dfe}.md-source{display:block;-webkit-transition:opacity .25s;transition:opacity .25s;font-size:1.3rem;line-height:1.2;white-space:nowrap}.md-source:hover{opacity:.7}.md-source:before{display:inline-block;height:4.8rem;content:"";vertical-align:middle}.md-source--bitbucket:before,.md-source--github:before,.md-source--gitlab:before{width:4.8rem;background-repeat:no-repeat;background-position:50%;background-size:2.4rem 2.4rem}.md-source--bitbucket .md-source__repository,.md-source--github .md-source__repository,.md-source--gitlab .md-source__repository{margin-left:-4.4rem;padding-left:4rem}.md-source--bitbucket:before{background-image:url(../images/icons/bitbucket-white-42306ad0de.svg)}.md-source--github:before{background-image:url(../images/icons/github-white-1cfc8ff99e.svg)}.md-source--gitlab:before{background-image:url(../images/icons/gitlab-white-d65054b8fe.svg)}.md-source__repository{display:inline-block;max-width:100%;margin-left:.8rem;font-weight:700;text-overflow:ellipsis;overflow:hidden;vertical-align:middle}.md-source__facts{margin:0;padding:0;font-size:1.1rem;font-weight:700;opacity:.75;list-style-type:none}.md-source__fact{float:left;-webkit-transform:translateY(0);transform:translateY(0);-webkit-transition:opacity .25s,-webkit-transform .25s cubic-bezier(.1,.7,.1,1);transition:opacity .25s,-webkit-transform .25s cubic-bezier(.1,.7,.1,1);transition:opacity .25s,transform .25s cubic-bezier(.1,.7,.1,1);transition:opacity .25s,transform .25s cubic-bezier(.1,.7,.1,1),-webkit-transform .25s cubic-bezier(.1,.7,.1,1);opacity:1}.md-source__fact--hidden{-webkit-transform:translateY(100%);transform:translateY(100%);opacity:0}.md-source__fact:before{margin:0 .2rem;content:"\00B7"}.md-source__fact:first-child:before{display:none}.admonition{position:relative;margin:2rem 0;padding:.8rem 1.6rem;border-left:3.2rem solid #448aff;border-radius:.2rem;background:rgba(68,138,255,.05)}.admonition:before{display:block;position:absolute;top:.2rem;left:-2.6rem;float:left;color:#fff;font-family:Material Icons;font-size:2rem;font-weight:400;content:"edit";vertical-align:-.1em}.admonition-title{color:#2979ff;font-size:1.28rem;font-weight:700;line-height:2;text-transform:uppercase}html .admonition-title{margin-bottom:1.6rem}html .admonition-title+*{margin-top:1.6rem}.admonition :first-child{margin-top:0}.admonition :last-child{margin-bottom:0}.admonition.summary,.admonition.tldr{border-color:#00b0ff;background:rgba(0,176,255,.05)}.admonition.summary:before,.admonition.tldr:before{content:"subject"}.admonition.summary .admonition-title,.admonition.tldr .admonition-title{color:#00b0ff}.admonition.idea,.admonition.tip{border-color:#00bfa5;background:rgba(0,191,165,.05)}.admonition.idea:before,.admonition.tip:before{content:"whatshot"}.admonition.idea .admonition-title,.admonition.tip .admonition-title{color:#00bfa5}.admonition.check,.admonition.done,.admonition.success{border-color:#00e676;background:rgba(0,230,118,.05)}.admonition.check:before,.admonition.done:before,.admonition.success:before{content:"done"}.admonition.check .admonition-title,.admonition.done .admonition-title,.admonition.success .admonition-title{color:#00e676}.admonition.warn,.admonition.warning{border-color:#ff9100;background:rgba(255,145,0,.05)}.admonition.warn:before,.admonition.warning:before{content:"warning"}.admonition.warn .admonition-title,.admonition.warning .admonition-title{color:#ff9100}.admonition.fail,.admonition.failure,.admonition.missing{border-color:#ff5252;background:rgba(255,82,82,.05)}.admonition.fail:before,.admonition.failure:before,.admonition.missing:before{content:"clear"}.admonition.fail .admonition-title,.admonition.failure .admonition-title,.admonition.missing .admonition-title{color:#ff5252}.admonition.danger,.admonition.fatal{border-color:#ff1744;background:rgba(255,23,68,.05)}.admonition.danger:before,.admonition.fatal:before{content:"flash_on"}.admonition.danger .admonition-title,.admonition.fatal .admonition-title{color:#ff1744}.admonition.bug,.admonition.error{border-color:#f50057;background:rgba(245,0,87,.05)}.admonition.bug:before,.admonition.error:before{content:"bug_report"}.admonition.bug .admonition-title,.admonition.error .admonition-title{color:#f50057}.code .err,.codehilite .err{color:#a61717}.code .o,.codehilite .o{color:inherit}.code .ge,.codehilite .ge{color:#000}.code .gr,.codehilite .gr{color:#a00}.code .gh,.codehilite .gh{color:#999}.code .go,.codehilite .go{color:#888}.code .gp,.codehilite .gp{color:#555}.code .gs,.codehilite .gs{color:inherit}.code .gu,.codehilite .gu{color:#aaa}.code .gt,.codehilite .gt{color:#a00}.code .k,.code .kc,.code .kd,.code .kn,.code .kp,.codehilite .k,.codehilite .kc,.codehilite .kd,.codehilite .kn,.codehilite .kp{color:#a71d5d}.code .kr,.code .kt,.codehilite .kr,.codehilite .kt{color:#0086b3}.code .c,.code .cm,.codehilite .c,.codehilite .cm{color:#969896}.code .cp,.codehilite .cp{color:#666}.code .c1,.code .cs,.codehilite .c1,.codehilite .cs{color:#969896}.code .bp,.code .na,.code .nb,.code .nc,.code .nd,.code .ne,.code .nf,.code .ni,.code .nl,.code .nn,.code .no,.code .nt,.code .nv,.code .vc,.code .vg,.code .vi,.codehilite .bp,.codehilite .na,.codehilite .nb,.codehilite .nc,.codehilite .nd,.codehilite .ne,.codehilite .nf,.codehilite .ni,.codehilite .nl,.codehilite .nn,.codehilite .no,.codehilite .nt,.codehilite .nv,.codehilite .vc,.codehilite .vg,.codehilite .vi{color:#795da3}.code .ow,.codehilite .ow{color:inherit}.code .il,.code .m,.code .mf,.code .mh,.code .mi,.code .mo,.codehilite .il,.codehilite .m,.codehilite .mf,.codehilite .mh,.codehilite .mi,.codehilite .mo{color:#0086b3}.code .s,.code .s2,.code .sb,.code .sc,.code .sd,.code .se,.code .sh,.code .si,.code .sx,.codehilite .s,.codehilite .s2,.codehilite .sb,.codehilite .sc,.codehilite .sd,.codehilite .se,.codehilite .sh,.codehilite .si,.codehilite .sx{color:#183691}.code .sr,.codehilite .sr{color:#009926}.code .s1,.codehilite .s1{color:#d01040}.code .ss,.codehilite .ss{color:#990073}.code .gd,.codehilite .gd{background-color:#fdd}.code .gi,.codehilite .gi{background-color:#dfd}.code .w,.codehilite .w{color:transparent}.footnote{color:rgba(0,0,0,.54);font-size:80%}.footnote ol{margin-left:0}.footnote li:hover .footnote-backref,.footnote li:target .footnote-backref{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.footnote li:hover .footnote-backref:hover,.footnote li:target .footnote-backref{color:#536dfe}.footnote-ref:before{position:absolute;margin-top:-8rem;padding-top:8rem;content:"";pointer-events:none}.footnote-backref{position:absolute;-webkit-transform:translate3d(.5rem,0,0);transform:translate3d(.5rem,0,0);-webkit-transition:color .25s,opacity .125s .125s,-webkit-transform .25s .125s;transition:color .25s,opacity .125s .125s,-webkit-transform .25s .125s;transition:transform .25s .125s,color .25s,opacity .125s .125s;transition:transform .25s .125s,color .25s,opacity .125s .125s,-webkit-transform .25s .125s;color:rgba(0,0,0,.26);font-size:2rem;opacity:0;vertical-align:middle}.footnote-backref:first-letter{font-size:0}.footnote-backref:after{content:"keyboard_return"}.md-typeset .headerlink{display:inline-block;margin-left:1rem;-webkit-transform:translateY(.5rem);transform:translateY(.5rem);-webkit-transition:color .25s,opacity .125s .25s,-webkit-transform .25s .25s;transition:color .25s,opacity .125s .25s,-webkit-transform .25s .25s;transition:transform .25s .25s,color .25s,opacity .125s .25s;transition:transform .25s .25s,color .25s,opacity .125s .25s,-webkit-transform .25s .25s;color:rgba(0,0,0,.26);opacity:0}.md-typeset [id] .headerlink:focus,.md-typeset [id]:hover .headerlink,.md-typeset [id]:target .headerlink{-webkit-transform:translate(0);transform:translate(0);opacity:1}.md-typeset [id] .headerlink:focus,.md-typeset [id]:hover .headerlink:hover,.md-typeset [id]:target .headerlink{color:#536dfe}.md-typeset h1[id]:before{display:block;margin-top:-11rem;padding-top:11rem;content:""}.md-typeset h2[id]:before{display:block;margin-top:-8.2rem;padding-top:8.2rem;content:""}.md-typeset h3[id]:before{display:block;margin-top:-8.4rem;padding-top:8.4rem;content:""}.md-typeset h4[id]:before{display:block;margin-top:-8.6rem;padding-top:8.6rem;content:""}.md-typeset h5[id]:before,.md-typeset h6[id]:before{display:block;margin-top:-9rem;padding-top:9rem;content:""}.md-search__input:focus{border-radius:.3rem .3rem 0 0}.md-search-term{position:relative;padding:0 .8rem 0 4.8rem;line-height:4rem;font-size:1.6rem;-webkit-transition:background .25s;transition:background .25s;cursor:pointer}.md-search-term:before{position:absolute;content:"access_time";font-size:2.4rem;line-height:4rem;left:1.2rem;color:rgba(0,0,0,.26)}.md-search-term:hover{background:#eceef8}.checklist li{position:relative;list-style-type:none}.checklist li:before{position:absolute;-webkit-appearance:none;-moz-appearance:none;appearance:none;color:blue;content:"check_box";font-size:2.4rem}.checklist input[type=checkbox]:checked{width:20px}del.critic,ins.critic,mark{margin:0 .4rem;padding:.1rem 0;word-break:break-word;-webkit-box-decoration-break:clone;box-decoration-break:clone;border-radius:.2rem}ins.critic{background:#dfd;box-shadow:.4rem 0 0 #dfd,-.4rem 0 0 #dfd;text-decoration:none}del.critic{background:#fdd;box-shadow:.4rem 0 0 #fdd,-.4rem 0 0 #fdd}mark{background:#ff0;box-shadow:.4rem 0 0 #ff0,-.4rem 0 0 #ff0;overflow:auto}.critic.comment{margin:0 .4rem;padding:.1rem 0;border-radius:.2rem;background:#f0f0f0;color:#37474f;box-shadow:.4rem 0 0 #f0f0f0,-.4rem 0 0 #f0f0f0;-webkit-box-decoration-break:clone;box-decoration-break:clone}.critic.comment:before{color:rgba(0,0,0,.26);content:"chat";font-size:1.6rem;padding-right:.2rem;vertical-align:-.2rem}.md-button{float:right;margin-top:9px;font-size:13px;padding-left:2.6rem;font-weight:700;text-transform:uppercase}.task-list-item{list-style-type:none}.task-list-item input{margin:0 4px .25em -20px;vertical-align:middle}.task-list-item{position:relative}.task-list-item input[type=checkbox]{opacity:0}.task-list-item input[type=checkbox]+label{display:block;position:absolute;top:50%;left:-24px;width:16px;margin-top:-8px;height:16px;border-radius:2px;background:#ccc}.task-list-item input[type=checkbox]:checked+label:before{display:block;margin-top:-4px;margin-left:2px;font-size:1.2em;line-height:1;border-radius:2px;content:"✔";color:#1ebb52}.codehilite .hll{background:#ff0;display:block;margin:0 -16px;padding:0 16px}.md-search__output{overflow-y:auto}@media only screen and (max-width:44.9375em){.md-typeset>div>pre,.md-typeset>pre>code{margin:1em -1.6rem;padding:1rem 1.6rem;border-radius:0}.md-search__form{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2)}.md-search__icon{top:1.2rem}.md-search__icon:before{content:"arrow_back"}.md-search__input{width:100%;height:4.8rem;font-size:1.8rem}.md-search__inner{position:fixed;top:0;left:100%;width:100%;height:56px;opacity:0;z-index:2;-webkit-transform:translate3d(5%,0,0);transform:translate3d(5%,0,0);-webkit-transition:opacity .15s .15s,-webkit-transform .3s cubic-bezier(.1,.7,.1,1) .15s;transition:opacity .15s .15s,-webkit-transform .3s cubic-bezier(.1,.7,.1,1) .15s;transition:transform .3s cubic-bezier(.1,.7,.1,1) .15s,opacity .15s .15s;transition:transform .3s cubic-bezier(.1,.7,.1,1) .15s,opacity .15s .15s,-webkit-transform .3s cubic-bezier(.1,.7,.1,1) .15s}.md-toggle--search:checked~.md-header .md-search__inner{-webkit-transform:translateZ(0);transform:translateZ(0);left:0;opacity:1}.md-search__suggest{position:relative;z-index:2}}@media only screen and (min-width:100em){html{font-size:68.75%}}@media only screen and (min-width:125em){html{font-size:75%}}@media only screen and (max-width:74.9375em){.md-toggle--drawer:checked~.md-overlay{width:100%;height:100%;-webkit-transition:width 0s,height 0s,opacity .25s;transition:width 0s,height 0s,opacity .25s;opacity:1}.md-header-nav__icon--home{display:none}.md-nav--primary,.md-nav--primary .md-nav{display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;top:0;right:0;left:0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;z-index:1}.md-nav--primary{background:#fff}.md-nav--primary .md-nav__toggle~.md-nav{box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.4);left:.4rem;background:#fff}html .md-nav--primary .md-nav__title{position:relative;padding:.4rem 1.6rem .4rem 5.6rem;background:rgba(0,0,0,.07);color:rgba(0,0,0,.54);font-size:1.8rem;font-weight:400;line-height:4.8rem;white-space:nowrap;cursor:pointer}html .md-nav--primary .md-nav__title:before{display:block;position:absolute;left:.4rem;width:4rem;height:4rem;color:rgba(0,0,0,.54)}html .md-nav--primary .md-nav__title~.md-nav__list>.md-nav__item:first-child{border-top:0}.md-nav--primary .md-nav__list{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:scroll}.md-nav--primary .md-nav__item{padding:0;border-top:.1rem solid rgba(0,0,0,.07)}.md-nav--primary .md-nav__item--nested>.md-nav__link{padding-right:4.8rem}.md-nav--primary .md-nav__link{position:relative;padding:1.6rem}.md-nav--primary .md-nav__link:after{position:absolute;top:50%;right:1.2rem;-webkit-transform:translateY(-50%) rotate(-90deg);transform:translateY(-50%) rotate(-90deg);-webkit-transition:inherit;transition:inherit;color:rgba(0,0,0,.54);font-size:2.4rem}.md-nav--primary .md-nav__link:hover:after{color:#536dfe}.md-nav--primary .md-nav--secondary .md-nav{position:static}.md-nav--primary .md-nav--secondary .md-nav .md-nav__link{padding-left:2.8rem}.md-nav--primary .md-nav--secondary .md-nav .md-nav .md-nav__link{padding-left:4rem}.md-nav--primary .md-nav--secondary .md-nav .md-nav .md-nav .md-nav__link{padding-left:5.2rem}.md-nav--primary .md-nav--secondary .md-nav .md-nav .md-nav .md-nav .md-nav__link{padding-left:6.4rem}.md-nav__toggle~.md-nav{display:none}.csstransforms3d .md-nav__toggle~.md-nav{display:block;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);-webkit-transition:opacity .125s .05s,-webkit-transform .25s cubic-bezier(.8,0,.6,1);transition:opacity .125s .05s,-webkit-transform .25s cubic-bezier(.8,0,.6,1);transition:transform .25s cubic-bezier(.8,0,.6,1),opacity .125s .05s;transition:transform .25s cubic-bezier(.8,0,.6,1),opacity .125s .05s,-webkit-transform .25s cubic-bezier(.8,0,.6,1);opacity:0}.md-nav__toggle:checked~.md-nav{display:block}.csstransforms3d .md-nav__toggle:checked~.md-nav{-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition:opacity .125s .125s,-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:opacity .125s .125s,-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1),opacity .125s .125s;transition:transform .25s cubic-bezier(.4,0,.2,1),opacity .125s .125s,-webkit-transform .25s cubic-bezier(.4,0,.2,1);opacity:1}.md-nav .md-nav__item,.md-nav .md-nav__title{font-size:1.6rem;line-height:1.4}.md-sidebar--primary{position:fixed;top:0;left:-24.2rem;width:24.2rem;height:100%;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition:box-shadow .25s,-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:box-shadow .25s,-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1),box-shadow .25s;transition:transform .25s cubic-bezier(.4,0,.2,1),box-shadow .25s,-webkit-transform .25s cubic-bezier(.4,0,.2,1);background:#fff;z-index:2}.no-csstransforms3d .md-sidebar--primary{display:none}.md-toggle--drawer:checked~.md-container .md-sidebar--primary{box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.4);-webkit-transform:translate3d(24.2rem,0,0);transform:translate3d(24.2rem,0,0)}.no-csstransforms3d .md-toggle--drawer:checked~.md-container .md-sidebar--primary{display:block}.md-sidebar--primary .md-sidebar__scrollwrap{overflow:hidden;margin:0}}@media only screen and (min-width:60em){.md-content{margin-right:24.2rem}.md-header-nav__source{display:block;width:23rem;max-width:23rem;padding-right:1.2rem}.md-sidebar--secondary{display:block;float:right}.md-sidebar--secondary.md-js__sidebar--locked{margin-left:100%;-webkit-transform:translate(-100%);transform:translate(-100%)}}@media only screen and (min-width:75em){.md-content{margin-left:24.2rem}.md-content__inner{margin:2.4rem}.md-header-nav__icon--menu{display:none}.md-nav.md-nav--transitioning{-webkit-transition:max-height .25s cubic-bezier(.86,0,.07,1);transition:max-height .25s cubic-bezier(.86,0,.07,1)}.md-nav__toggle~.md-nav{max-height:0;overflow:hidden}.md-nav.md-nav--toggled,.md-nav__toggle:checked~.md-nav{max-height:100%}.md-nav__title+.md-nav__list .md-nav__title{display:none}.md-nav__item--nested>.md-nav__link:after{display:inline-block;-webkit-transform-origin:.45em .45em;transform-origin:.45em .45em;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;vertical-align:-.125em}.js .md-nav__item--nested>.md-nav__link:after{-webkit-transition:-webkit-transform .4s;transition:-webkit-transform .4s;transition:transform .4s;transition:transform .4s,-webkit-transform .4s}.md-nav__item--nested .md-nav__toggle:checked~.md-nav__link:after{-webkit-transform:rotateX(180deg);transform:rotateX(180deg)}.md-sidebar__inner{border-right:.1rem solid rgba(0,0,0,.07)}.md-search__output{box-shadow:0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12),0 3px 5px -1px rgba(0,0,0,.4);width:100%;max-height:0;opacity:0;-webkit-transition:opacity .4s,max-height .4s;transition:opacity .4s,max-height .4s;position:absolute;background:#fff;border-top:.1rem solid rgba(0,0,0,.07);text-align:left;border-radius:0 0 .3rem .3rem;z-index:-1}.md-js__search--locked .md-search__output{max-height:75vh;opacity:1}.md-search__output::-webkit-scrollbar{width:.4rem;height:.4rem}.md-search__output::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.26)}.md-search__output::-webkit-scrollbar-thumb:hover{background-color:#536dfe}.md-search__output{background:-webkit-linear-gradient(#fff 10%,hsla(0,0%,100%,0)),-webkit-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,.2) 20%,transparent 60%);background:linear-gradient(#fff 10%,hsla(0,0%,100%,0)),linear-gradient(180deg,rgba(0,0,0,.5),rgba(0,0,0,.2) 20%,transparent 60%);background-repeat:no-repeat;background-color:#fff;background-size:100% 20px,100% 5px;background-attachment:local,scroll}.md-search-result__meta{color:rgba(0,0,0,.54);padding-left:4.8rem;padding-right:1.6rem;line-height:4rem;font-size:1.28rem}.md-search-result__list{margin:0;padding:0;list-style-type:none;border-top:.1rem solid rgba(0,0,0,.07)}.md-search-result__link{overflow:auto;display:block;padding-left:4.8rem;padding-right:1.6rem}.md-search-result__link:hover{background:#ff0}.md-search-result__title{color:rgba(0,0,0,.87);font-size:1.6rem;line-height:1.4;margin-top:.5em}.md-search-result__description{color:rgba(0,0,0,.54);font-size:1.28rem;line-height:1.4;margin:.5em 0}}@media only screen and (min-width:45em){.md-header-nav__icon--search{display:none}.md-search{padding:.4rem;padding-right:3.2rem}.md-search__form{width:23rem;-webkit-transition:width .25s cubic-bezier(.1,.7,.1,1);transition:width .25s cubic-bezier(.1,.7,.1,1)}.md-js__search--locked .md-search__form{width:66.8rem}.md-search__input{width:100%;height:4rem;padding-left:4.8rem;-webkit-transition:background-color .25s,color .25s;transition:background-color .25s,color .25s;background:rgba(0,0,0,.26);color:#fff;font-size:1.6rem}.md-search__input+.md-search__icon,.md-search__input::-webkit-input-placeholder{-webkit-transition:color .25s;transition:color .25s;color:#fff}.md-search__input+.md-search__icon,.md-search__input::-moz-placeholder{-webkit-transition:color .25s;transition:color .25s;color:#fff}.md-search__input+.md-search__icon,.md-search__input:-ms-input-placeholder{-webkit-transition:color .25s;transition:color .25s;color:#fff}.md-search__input+.md-search__icon,.md-search__input::placeholder{-webkit-transition:color .25s;transition:color .25s;color:#fff}.md-search__input:hover{background:hsla(0,0%,100%,.12)}.md-js__search--locked .md-search__input{border-radius:.3rem .3rem 0 0;background:#fff;color:rgba(0,0,0,.87);text-overflow:none}.md-js__search--locked .md-search__input+.md-search__icon,.md-js__search--locked .md-search__input::-webkit-input-placeholder{color:rgba(0,0,0,.54)}.md-js__search--locked .md-search__input+.md-search__icon,.md-js__search--locked .md-search__input::-moz-placeholder{color:rgba(0,0,0,.54)}.md-js__search--locked .md-search__input+.md-search__icon,.md-js__search--locked .md-search__input:-ms-input-placeholder{color:rgba(0,0,0,.54)}.md-js__search--locked .md-search__input+.md-search__icon,.md-js__search--locked .md-search__input::placeholder{color:rgba(0,0,0,.54)}}@media only screen and (min-width:30em){.md-footer-nav__link{width:50%}}@media only screen and (max-width:29.9375em){.md-footer-nav__link--prev .md-footer-nav__title{display:none}}@media only screen and (max-width:59.9375em){.md-nav--secondary{border-left:0}html .md-nav__link[for=toc]{display:block}html .md-nav__link[for=toc]:after{-webkit-transform:translateY(-50%);transform:translateY(-50%);color:#536dfe;content:"toc"}html .md-nav__link[for=toc]+.md-nav__link{display:none}html .md-nav__link[for=toc]~.md-nav{display:-webkit-box;display:-ms-flexbox;display:flex}.md-nav__source{display:block;padding:.4rem;background:rgba(0,0,0,.87);color:#fff}}@media only screen and (min-width:60em) and (min-width:75em){.md-sidebar--secondary.md-js__sidebar--locked{margin-left:120rem}} \ No newline at end of file diff --git a/material/assets/stylesheets/application-d7ccfc4ec2.css b/material/assets/stylesheets/application-d7ccfc4ec2.css deleted file mode 100644 index 731d8b8bd..000000000 --- a/material/assets/stylesheets/application-d7ccfc4ec2.css +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";.checklist li:before,.critic.comment:before,.footnote-backref,.md-icon,.md-nav__link:after,.md-nav__title:before,.md-search-term:before{font-family:Material Icons;font-style:normal;font-variant:normal;font-weight:400;line-height:1;text-transform:none;white-space:nowrap;speak:none;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.md-footer-nav__icon,.md-header-nav__icon,.md-nav__title:before{display:inline-block;margin:.4rem;padding:.8rem;font-size:2.4rem;cursor:pointer}.md-icon--back:before{content:"arrow_back"}.md-icon--forward:before{content:"arrow_forward"}.md-icon--close:before{content:"close"}.md-icon--menu:before{content:"menu"}.md-icon--search:before{content:"search"}html{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}*,:after,:before{box-sizing:inherit;-moz-box-sizing:inherit;-webkit-box-sizing:inherit}html{-webkit-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none}body{margin:0}article,aside,figcaption,figure,footer,header,main,nav,section{display:block}hr{overflow:visible;box-sizing:content-box}a{color:inherit;text-decoration:none}a:active,a:hover{outline-width:0}a{-webkit-text-decoration-skip:objects}a,button,input,label{-webkit-tap-highlight-color:transparent}small,sub,sup{font-size:80%}sub,sup{position:relative;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}table{border-collapse:collapse;border-spacing:0}td,th{font-weight:400;text-align:left;vertical-align:top}button{padding:0;background:transparent;font-size:inherit}button,input{border:0;outline:0}body{color:rgba(0,0,0,.87);font-family:Roboto,Helvetica,Arial,sans-serif;font-weight:400;-webkit-font-feature-settings:"kern","onum","liga";font-feature-settings:"kern","onum","liga";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.no-fontface body{font-family:Helvetica Neue,Helvetica,Arial,sans-serif}code,kbd,pre{color:rgba(0,0,0,.87);font-family:Roboto Mono,Courier New,Courier,monospace;font-weight:400;-webkit-font-feature-settings:"kern","onum","liga";font-feature-settings:"kern","onum","liga"}.no-fontface code,.no-fontface kbd,.no-fontface pre{font-family:Courier New,Courier,monospace}.md-typeset{font-size:1.6rem;line-height:1.6}.md-typeset blockquote,.md-typeset ol,.md-typeset p,.md-typeset ul{margin:1em 0}.md-typeset h1{margin:0 0 4rem;color:rgba(0,0,0,.54);font-size:3.125rem;line-height:1.3}.md-typeset h1,.md-typeset h2{font-weight:300;letter-spacing:-.01em}.md-typeset h2{margin:4rem 0 1.6rem;font-size:2.5rem;line-height:1.4}.md-typeset h3{margin:3.2rem 0 1.6rem;font-size:2rem;font-weight:400;letter-spacing:-.01em;line-height:1.5}.md-typeset h2+h3{margin-top:1.6rem}.md-typeset h4{font-size:1.6rem}.md-typeset h4,.md-typeset h5,.md-typeset h6{margin:1.6rem 0;font-weight:700;letter-spacing:-.01em}.md-typeset h5,.md-typeset h6{color:rgba(0,0,0,.54);font-size:1.28rem}.md-typeset h5{text-transform:uppercase}.md-typeset hr{margin:2.4rem 0;border-bottom:.1rem dotted rgba(0,0,0,.26)}.md-typeset a{color:#3f51b5}.md-typeset a,.md-typeset a:before{-webkit-transition:color .125s;transition:color .125s}.md-typeset a:active,.md-typeset a:hover{color:#536dfe}.md-typeset code{margin:0 .4rem;padding:.1rem 0;border-radius:.2rem;background:#f7f7f7;color:#37474f;font-size:85%;box-shadow:.4rem 0 0 #f7f7f7,-.4rem 0 0 #f7f7f7;word-break:break-word;-webkit-box-decoration-break:clone;box-decoration-break:clone}.md-typeset h1 code,.md-typeset h2 code,.md-typeset h3 code,.md-typeset h4 code,.md-typeset h5 code,.md-typeset h6 code{margin:0;background:transparent;box-shadow:none}.md-typeset pre{margin:1em 0;padding:1rem 1.2rem;border-radius:.2rem;background:#f7f7f7;color:#37474f;font-size:85%;line-height:1.4;overflow:auto;-webkit-overflow-scrolling:touch}.md-typeset pre>code{font-size:inherit}.md-typeset>div>pre::-webkit-scrollbar,.md-typeset>pre>code::-webkit-scrollbar{width:.4rem;height:.4rem}.md-typeset>div>pre::-webkit-scrollbar-thumb,.md-typeset>pre>code::-webkit-scrollbar-thumb{background:rgba(0,0,0,.26)}.md-typeset kbd{display:inline-block;padding:.4rem .5rem .5rem;border:.1rem solid #c9c9c9;border-radius:.3rem;border-bottom-color:#bcbcbc;background-color:#fcfcfc;color:#555;font-size:85%;line-height:1rem;box-shadow:inset 0 -.1rem 0 #b0b0b0;vertical-align:.1rem;word-break:break-word}.md-typeset small{opacity:.75}.md-typeset sub,.md-typeset sup{margin-left:.1rem}.md-typeset blockquote{padding-left:1.2rem;border-left:.4rem solid rgba(0,0,0,.26);color:rgba(0,0,0,.54)}.md-typeset ul{list-style-type:disc}.md-typeset ol ol{list-style-type:lower-alpha}.md-typeset ol ol ol{list-style-type:lower-roman}.md-typeset ol,.md-typeset ul{margin-left:1rem;padding:0}.md-typeset ol li,.md-typeset ul li{margin-bottom:.5em;margin-left:2rem}.md-typeset ol li blockquote,.md-typeset ol li p,.md-typeset ul li blockquote,.md-typeset ul li p{margin:.5em 0}.md-typeset ol li:last-child,.md-typeset ul li:last-child{margin-bottom:0}.md-typeset ol li ol,.md-typeset ol li ul,.md-typeset ul li ol,.md-typeset ul li ul{margin-bottom:1rem;margin-left:1rem;padding-top:1rem}html{height:100%;font-size:62.5%}body{position:relative;min-height:100%}body.md-js__body--locked{height:100%;overflow:hidden}hr{display:block;height:.1rem;padding:0;border:0}.md-grid{max-width:120rem;margin-right:auto;margin-left:auto}.md-container,.md-main{overflow:auto}.md-main{margin-top:5.6rem}.md-main__inner{margin-top:3rem;margin-bottom:9.2rem;overflow:auto}.md-toggle{display:none}.md-overlay{position:fixed;top:0;width:0;height:0;-webkit-transition:width 0s .25s,height 0s .25s,opacity .25s;transition:width 0s .25s,height 0s .25s,opacity .25s;background:rgba(0,0,0,.54);opacity:0;z-index:2}.md-flex{display:table}.md-flex__cell{display:table-cell;position:relative;vertical-align:top}.md-flex__cell--shrink{width:0}.md-flex__cell--stretch{display:table;width:100%;table-layout:fixed}.md-flex__ellipsis{display:table-cell;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.md-content__inner{margin:2.4rem 1.6rem}.md-content__copyright{display:block}.md-header{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2);position:fixed;top:0;right:0;left:0;height:5.6rem;background:#3f51b5;color:#fff;z-index:1}.md-header-nav{padding:.4rem}.md-header-nav__icon{position:relative;-webkit-transition:opacity .25s;transition:opacity .25s;z-index:1}.md-header-nav__icon:hover{opacity:.7}.md-header-nav__title{padding:0 2rem;font-size:1.8rem;line-height:4.8rem}.md-header-nav__source{display:none}.md-footer{position:absolute;bottom:0;width:100%}.md-footer-pagination{background:rgba(0,0,0,.87);color:#fff}.md-footer-nav{padding:.4rem;overflow:auto}.md-footer-nav__link{padding-top:2.8rem;padding-bottom:.8rem;-webkit-transition:opacity .25s;transition:opacity .25s}.md-footer-nav__link:hover{opacity:.7}.md-footer-nav__link--prev{width:25%;float:left}.md-footer-nav__link--next{width:75%;float:right;text-align:right}.md-footer-nav__icon{-webkit-transition:background .25s;transition:background .25s}.md-footer-nav__title{position:relative;padding:0 .4rem;font-size:1.8rem;line-height:4.8rem}.md-footer-nav__direction{position:absolute;right:0;left:0;margin-top:-2rem;padding:0 .4rem;color:hsla(0,0%,100%,.7);font-size:1.5rem}.md-nav{font-size:1.28rem;line-height:1.3}.md-nav--secondary{border-left:.4rem solid #3f51b5}.md-nav__title{display:block;padding:1.2rem 1.2rem 0;font-weight:700;text-overflow:ellipsis;overflow:hidden}.md-nav__title:before{display:none;content:"arrow_back"}.md-nav__list{margin:0;padding:0;list-style:none}.md-nav__item{padding:.625em 1.2rem 0}.md-nav__item:last-child{padding-bottom:1.2rem}.md-nav__item .md-nav__item{padding-right:0}.md-nav__item .md-nav__item:last-child{padding-bottom:0}.md-nav__link{display:block;-webkit-transition:color .125s;transition:color .125s;text-overflow:ellipsis;cursor:pointer;overflow:hidden}.md-nav__item--nested>.md-nav__link:after{content:"expand_more"}html .md-nav__link[for=toc],html .md-nav__link[for=toc]+.md-nav__link:after,html .md-nav__link[for=toc]~.md-nav{display:none}.md-nav__link--marked{color:rgba(0,0,0,.54)}.md-nav__link--active,.md-nav__link:active,.md-nav__link:hover{color:#536dfe}.md-nav__source{display:none}.md-search{padding:.8rem .8rem 0}.md-search__overlay{display:none}.md-search__form{position:relative;border-radius:.2rem;text-align:right}.md-search__icon{position:absolute;top:.8rem;left:1.2rem;-webkit-transition:color .25s;transition:color .25s;font-size:2.4rem;cursor:pointer}.md-search__input{padding:0 1.6rem 0 6.4rem;border-radius:.2rem;text-overflow:ellipsis}.md-search__input+.md-search__icon,.md-search__input::-webkit-input-placeholder{color:rgba(0,0,0,.54)}.md-search__input+.md-search__icon,.md-search__input::-moz-placeholder{color:rgba(0,0,0,.54)}.md-search__input+.md-search__icon,.md-search__input:-ms-input-placeholder{color:rgba(0,0,0,.54)}.md-search__input+.md-search__icon,.md-search__input::placeholder{color:rgba(0,0,0,.54)}.md-sidebar{position:relative;width:24.2rem;float:left;overflow:visible}.md-sidebar.md-js__sidebar--locked{position:fixed;top:5.6rem}.md-sidebar--secondary{display:none}.md-sidebar__scrollwrap{margin:2.4rem .4rem;overflow-y:scroll}.js .md-sidebar__scrollwrap{position:absolute;top:0;right:0;bottom:0;left:0}.md-sidebar__scrollwrap::-webkit-scrollbar{width:.4rem;height:.4rem}.md-sidebar__scrollwrap::-webkit-scrollbar-thumb{background:rgba(0,0,0,.26)}.md-source{display:block;-webkit-transition:opacity .25s;transition:opacity .25s;font-size:1.3rem;line-height:1.2;white-space:nowrap}.md-source:hover{opacity:.7}.md-source--bitbucket:before,.md-source--github:before,.md-source--gitlab:before{display:inline-block;width:4.8rem;height:4.8rem;background-repeat:no-repeat;background-position:50%;background-size:2.4rem 2.4rem;content:"";vertical-align:middle}.md-source--bitbucket:before{background-image:url(../images/icons/bitbucket-white-42306ad0de.svg)}.md-source--github:before{background-image:url(../images/icons/github-white-1cfc8ff99e.svg)}.md-source--gitlab:before{background-image:url(../images/icons/gitlab-white-d65054b8fe.svg)}.md-source__repository{display:inline-block;max-width:100%;margin-left:-4.4rem;padding-left:4rem;font-weight:700;text-overflow:ellipsis;overflow:hidden;vertical-align:middle}.md-source__facts{margin:0;padding:0;font-size:1.1rem;font-weight:700;opacity:.75;list-style-type:none}.md-source__fact{float:left;-webkit-transform:translateY(0);transform:translateY(0);-webkit-transition:opacity .25s,-webkit-transform .25s cubic-bezier(.1,.7,.1,1);transition:opacity .25s,-webkit-transform .25s cubic-bezier(.1,.7,.1,1);transition:opacity .25s,transform .25s cubic-bezier(.1,.7,.1,1);transition:opacity .25s,transform .25s cubic-bezier(.1,.7,.1,1),-webkit-transform .25s cubic-bezier(.1,.7,.1,1);opacity:1}.md-source__fact--hidden{-webkit-transform:translateY(100%);transform:translateY(100%);opacity:0}.md-source__fact:before{margin:0 .2rem;content:"\00B7"}.md-source__fact:first-child:before{display:none}.admonition{position:relative;margin:2rem 0;padding:.8rem 1.6rem;border-left:3.2rem solid #448aff;border-radius:.2rem;background:rgba(68,138,255,.05)}.admonition:before{display:block;position:absolute;top:.2rem;left:-2.6rem;float:left;color:#fff;font-family:Material Icons;font-size:2rem;font-weight:400;content:"edit";vertical-align:-.1em}.admonition-title{color:#2979ff;font-size:1.28rem;font-weight:700;line-height:2;text-transform:uppercase}html .admonition-title{margin-bottom:1.6rem}html .admonition-title+*{margin-top:1.6rem}.admonition :first-child{margin-top:0}.admonition :last-child{margin-bottom:0}.admonition.summary,.admonition.tldr{border-color:#00b0ff;background:rgba(0,176,255,.05)}.admonition.summary:before,.admonition.tldr:before{content:"subject"}.admonition.summary .admonition-title,.admonition.tldr .admonition-title{color:#00b0ff}.admonition.idea,.admonition.tip{border-color:#00bfa5;background:rgba(0,191,165,.05)}.admonition.idea:before,.admonition.tip:before{content:"whatshot"}.admonition.idea .admonition-title,.admonition.tip .admonition-title{color:#00bfa5}.admonition.check,.admonition.done,.admonition.success{border-color:#00e676;background:rgba(0,230,118,.05)}.admonition.check:before,.admonition.done:before,.admonition.success:before{content:"done"}.admonition.check .admonition-title,.admonition.done .admonition-title,.admonition.success .admonition-title{color:#00e676}.admonition.warn,.admonition.warning{border-color:#ff9100;background:rgba(255,145,0,.05)}.admonition.warn:before,.admonition.warning:before{content:"warning"}.admonition.warn .admonition-title,.admonition.warning .admonition-title{color:#ff9100}.admonition.fail,.admonition.failure,.admonition.missing{border-color:#ff5252;background:rgba(255,82,82,.05)}.admonition.fail:before,.admonition.failure:before,.admonition.missing:before{content:"clear"}.admonition.fail .admonition-title,.admonition.failure .admonition-title,.admonition.missing .admonition-title{color:#ff5252}.admonition.danger,.admonition.fatal{border-color:#ff1744;background:rgba(255,23,68,.05)}.admonition.danger:before,.admonition.fatal:before{content:"flash_on"}.admonition.danger .admonition-title,.admonition.fatal .admonition-title{color:#ff1744}.admonition.bug,.admonition.error{border-color:#f50057;background:rgba(245,0,87,.05)}.admonition.bug:before,.admonition.error:before{content:"bug_report"}.admonition.bug .admonition-title,.admonition.error .admonition-title{color:#f50057}.code .err,.codehilite .err{color:#a61717}.code .o,.codehilite .o{color:inherit}.code .ge,.codehilite .ge{color:#000}.code .gr,.codehilite .gr{color:#a00}.code .gh,.codehilite .gh{color:#999}.code .go,.codehilite .go{color:#888}.code .gp,.codehilite .gp{color:#555}.code .gs,.codehilite .gs{color:inherit}.code .gu,.codehilite .gu{color:#aaa}.code .gt,.codehilite .gt{color:#a00}.code .k,.code .kc,.code .kd,.code .kn,.code .kp,.codehilite .k,.codehilite .kc,.codehilite .kd,.codehilite .kn,.codehilite .kp{color:#a71d5d}.code .kr,.code .kt,.codehilite .kr,.codehilite .kt{color:#0086b3}.code .c,.code .cm,.codehilite .c,.codehilite .cm{color:#969896}.code .cp,.codehilite .cp{color:#666}.code .c1,.code .cs,.codehilite .c1,.codehilite .cs{color:#969896}.code .bp,.code .na,.code .nb,.code .nc,.code .nd,.code .ne,.code .nf,.code .ni,.code .nl,.code .nn,.code .no,.code .nt,.code .nv,.code .vc,.code .vg,.code .vi,.codehilite .bp,.codehilite .na,.codehilite .nb,.codehilite .nc,.codehilite .nd,.codehilite .ne,.codehilite .nf,.codehilite .ni,.codehilite .nl,.codehilite .nn,.codehilite .no,.codehilite .nt,.codehilite .nv,.codehilite .vc,.codehilite .vg,.codehilite .vi{color:#795da3}.code .ow,.codehilite .ow{color:inherit}.code .il,.code .m,.code .mf,.code .mh,.code .mi,.code .mo,.codehilite .il,.codehilite .m,.codehilite .mf,.codehilite .mh,.codehilite .mi,.codehilite .mo{color:#0086b3}.code .s,.code .s2,.code .sb,.code .sc,.code .sd,.code .se,.code .sh,.code .si,.code .sx,.codehilite .s,.codehilite .s2,.codehilite .sb,.codehilite .sc,.codehilite .sd,.codehilite .se,.codehilite .sh,.codehilite .si,.codehilite .sx{color:#183691}.code .sr,.codehilite .sr{color:#009926}.code .s1,.codehilite .s1{color:#d01040}.code .ss,.codehilite .ss{color:#990073}.code .gd,.codehilite .gd{background-color:#fdd}.code .gi,.codehilite .gi{background-color:#dfd}.code .w,.codehilite .w{color:transparent}.footnote{color:rgba(0,0,0,.54);font-size:80%}.footnote ol{margin-left:0}.footnote li:hover .footnote-backref,.footnote li:target .footnote-backref{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.footnote li:hover .footnote-backref:hover,.footnote li:target .footnote-backref{color:#536dfe}.footnote-ref:before{position:absolute;margin-top:-8rem;padding-top:8rem;content:"";pointer-events:none}.footnote-backref{position:absolute;-webkit-transform:translate3d(.5rem,0,0);transform:translate3d(.5rem,0,0);-webkit-transition:color .25s,opacity .125s .125s,-webkit-transform .25s .125s;transition:color .25s,opacity .125s .125s,-webkit-transform .25s .125s;transition:transform .25s .125s,color .25s,opacity .125s .125s;transition:transform .25s .125s,color .25s,opacity .125s .125s,-webkit-transform .25s .125s;color:rgba(0,0,0,.26);font-size:2rem;opacity:0;vertical-align:middle}.footnote-backref:first-letter{font-size:0}.footnote-backref:after{content:"keyboard_return"}.md-typeset .headerlink{display:inline-block;margin-left:1rem;-webkit-transform:translate3d(0,.5rem,0);transform:translate3d(0,.5rem,0);-webkit-transition:color .25s,opacity .125s .25s,-webkit-transform .25s .25s;transition:color .25s,opacity .125s .25s,-webkit-transform .25s .25s;transition:transform .25s .25s,color .25s,opacity .125s .25s;transition:transform .25s .25s,color .25s,opacity .125s .25s,-webkit-transform .25s .25s;color:rgba(0,0,0,.26);opacity:0}.md-typeset [id] .headerlink:focus,.md-typeset [id]:hover .headerlink,.md-typeset [id]:target .headerlink{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.md-typeset [id] .headerlink:focus,.md-typeset [id]:hover .headerlink:hover,.md-typeset [id]:target .headerlink{color:#536dfe}.md-typeset h1[id]:before{display:block;margin-top:-11rem;padding-top:11rem;content:""}.md-typeset h2[id]:before{display:block;margin-top:-8.2rem;padding-top:8.2rem;content:""}.md-typeset h3[id]:before{display:block;margin-top:-8.4rem;padding-top:8.4rem;content:""}.md-typeset h4[id]:before{display:block;margin-top:-8.6rem;padding-top:8.6rem;content:""}.md-typeset h5[id]:before,.md-typeset h6[id]:before{display:block;margin-top:-9rem;padding-top:9rem;content:""}.md-search__suggest{box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.4);background:#fff;border-radius:0 0 .3rem .3rem;color:#000;text-align:left;border-top:.1rem solid rgba(0,0,0,.07);display:none;opacity:0;-webkit-transition:opacity .3s;transition:opacity .3s}.md-search__input:focus~.md-search__suggest{display:block;opacity:1}.md-search__input:focus{border-radius:.3rem .3rem 0 0}.md-search-term{position:relative;padding:0 .8rem 0 4.8rem;line-height:4rem;font-size:1.6rem;-webkit-transition:background .25s;transition:background .25s;cursor:pointer}.md-search-term:before{position:absolute;content:"access_time";font-size:2.4rem;line-height:4rem;left:1.2rem;color:rgba(0,0,0,.26)}.md-search-term:hover{background:#eceef8}.checklist li{position:relative;list-style-type:none}.checklist li:before{position:absolute;-webkit-appearance:none;-moz-appearance:none;appearance:none;color:blue;content:"check_box";font-size:2.4rem}.checklist input[type=checkbox]:checked{width:20px}del.critic,ins.critic,mark{margin:0 .4rem;padding:.1rem 0;word-break:break-word;-webkit-box-decoration-break:clone;box-decoration-break:clone;border-radius:.2rem}ins.critic{background:#dfd;box-shadow:.4rem 0 0 #dfd,-.4rem 0 0 #dfd;text-decoration:none}del.critic{background:#fdd;box-shadow:.4rem 0 0 #fdd,-.4rem 0 0 #fdd}mark{background:#ff0;box-shadow:.4rem 0 0 #ff0,-.4rem 0 0 #ff0;overflow:auto}.critic.comment{margin:0 .4rem;padding:.1rem 0;border-radius:.2rem;background:#f0f0f0;color:#37474f;box-shadow:.4rem 0 0 #f0f0f0,-.4rem 0 0 #f0f0f0;-webkit-box-decoration-break:clone;box-decoration-break:clone}.critic.comment:before{color:rgba(0,0,0,.26);content:"chat";font-size:1.6rem;padding-right:.2rem;vertical-align:-.2rem}.md-button{float:right;margin-top:9px;font-size:13px;padding-left:2.6rem;font-weight:700;text-transform:uppercase}.task-list-item{list-style-type:none}.task-list-item input{margin:0 4px .25em -20px;vertical-align:middle}.task-list-item{position:relative}.task-list-item input[type=checkbox]{opacity:0}.task-list-item input[type=checkbox]+label{display:block;position:absolute;top:50%;left:-24px;width:16px;margin-top:-8px;height:16px;border-radius:2px;background:#ccc}.task-list-item input[type=checkbox]:checked+label:before{display:block;margin-top:-4px;margin-left:2px;font-size:1.2em;line-height:1;border-radius:2px;content:"✔";color:#1ebb52}.codehilite .hll{background:#ff0;display:block;margin:0 -16px;padding:0 16px}@media only screen and (max-width:44.9375em){.md-typeset>div>pre,.md-typeset>pre>code{margin:1em -1.6rem;padding:1rem 1.6rem;border-radius:0}.md-search__overlay{display:block;position:absolute;top:.4rem;left:.4rem;width:4rem;height:4rem;-webkit-transform-origin:center;transform-origin:center;-webkit-transition:opacity .2s .2s,-webkit-transform .3s .1s;transition:opacity .2s .2s,-webkit-transform .3s .1s;transition:transform .3s .1s,opacity .2s .2s;transition:transform .3s .1s,opacity .2s .2s,-webkit-transform .3s .1s;border-radius:2rem;background:#eee;opacity:0;overflow:hidden;z-index:0}.md-toggle--search:checked~.md-header .md-search__overlay{-webkit-transform:scale(40);transform:scale(40);-webkit-transition:opacity .1s,-webkit-transform .4s;transition:opacity .1s,-webkit-transform .4s;transition:transform .4s,opacity .1s;transition:transform .4s,opacity .1s,-webkit-transform .4s;opacity:1;z-index:1}.md-search__form{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2)}.md-search__icon{top:1.2rem}.md-search__icon:before{content:"arrow_back"}.md-search__input{width:100%;height:4.8rem;font-size:1.8rem}.md-search__inner{position:fixed;top:0;left:100%;width:100%;height:56px;opacity:0;z-index:2;-webkit-transform:translate3d(5%,0,0);transform:translate3d(5%,0,0);-webkit-transition:opacity .15s .15s,-webkit-transform .3s cubic-bezier(.1,.7,.1,1) .15s;transition:opacity .15s .15s,-webkit-transform .3s cubic-bezier(.1,.7,.1,1) .15s;transition:transform .3s cubic-bezier(.1,.7,.1,1) .15s,opacity .15s .15s;transition:transform .3s cubic-bezier(.1,.7,.1,1) .15s,opacity .15s .15s,-webkit-transform .3s cubic-bezier(.1,.7,.1,1) .15s}.md-toggle--search:checked~.md-header .md-search__inner{-webkit-transform:translateZ(0);transform:translateZ(0);left:0;opacity:1}.md-search__suggest{position:relative;z-index:2}}@media only screen and (min-width:100em){html{font-size:68.75%}}@media only screen and (min-width:125em){html{font-size:75%}}@media only screen and (max-width:74.9375em){.md-toggle--drawer:checked~.md-overlay{width:100%;height:100%;-webkit-transition:width 0s,height 0s,opacity .25s;transition:width 0s,height 0s,opacity .25s;opacity:1}.md-nav--primary,.md-nav--primary .md-nav{display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;top:0;right:0;left:0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;z-index:1}.md-nav--primary{background:#fff}.md-nav--primary .md-nav__toggle~.md-nav{box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.4);left:.4rem;background:#fff}html .md-nav--primary .md-nav__title{position:relative;padding:.4rem 1.6rem .4rem 5.6rem;background:rgba(0,0,0,.07);color:rgba(0,0,0,.54);font-size:1.8rem;font-weight:400;line-height:4.8rem;white-space:nowrap;cursor:pointer}html .md-nav--primary .md-nav__title:before{display:block;position:absolute;left:.4rem;width:4rem;height:4rem;color:rgba(0,0,0,.54)}html .md-nav--primary .md-nav__title~.md-nav__list>.md-nav__item:first-child{border-top:0}.md-nav--primary .md-nav__list{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:scroll}.md-nav--primary .md-nav__item{padding:0;border-top:.1rem solid rgba(0,0,0,.07)}.md-nav--primary .md-nav__item--nested>.md-nav__link{padding-right:4.8rem}.md-nav--primary .md-nav__link{position:relative;padding:1.6rem}.md-nav--primary .md-nav__link:after{position:absolute;top:50%;right:1.2rem;-webkit-transform:translateY(-50%) rotate(-90deg);transform:translateY(-50%) rotate(-90deg);-webkit-transition:inherit;transition:inherit;color:rgba(0,0,0,.54);font-size:2.4rem}.md-nav--primary .md-nav__link:hover:after{color:#536dfe}.md-nav--primary .md-nav--secondary .md-nav{position:static}.md-nav--primary .md-nav--secondary .md-nav .md-nav__link{padding-left:2.8rem}.md-nav--primary .md-nav--secondary .md-nav .md-nav .md-nav__link{padding-left:4rem}.md-nav--primary .md-nav--secondary .md-nav .md-nav .md-nav .md-nav__link{padding-left:5.2rem}.md-nav--primary .md-nav--secondary .md-nav .md-nav .md-nav .md-nav .md-nav__link{padding-left:6.4rem}.md-nav__toggle~.md-nav{display:none}.csstransforms3d .md-nav__toggle~.md-nav{display:block;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);-webkit-transition:opacity .125s .05s,-webkit-transform .25s cubic-bezier(.8,0,.6,1);transition:opacity .125s .05s,-webkit-transform .25s cubic-bezier(.8,0,.6,1);transition:transform .25s cubic-bezier(.8,0,.6,1),opacity .125s .05s;transition:transform .25s cubic-bezier(.8,0,.6,1),opacity .125s .05s,-webkit-transform .25s cubic-bezier(.8,0,.6,1);opacity:0}.md-nav__toggle:checked~.md-nav{display:block}.csstransforms3d .md-nav__toggle:checked~.md-nav{-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition:opacity .125s .125s,-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:opacity .125s .125s,-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1),opacity .125s .125s;transition:transform .25s cubic-bezier(.4,0,.2,1),opacity .125s .125s,-webkit-transform .25s cubic-bezier(.4,0,.2,1);opacity:1}.md-nav .md-nav__item,.md-nav .md-nav__title{font-size:1.6rem;line-height:1.4}.md-sidebar--primary{position:fixed;top:0;left:-24.2rem;width:24.2rem;height:100%;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition:box-shadow .25s,-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:box-shadow .25s,-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1),box-shadow .25s;transition:transform .25s cubic-bezier(.4,0,.2,1),box-shadow .25s,-webkit-transform .25s cubic-bezier(.4,0,.2,1);background:#fff;z-index:2}.no-csstransforms3d .md-sidebar--primary{display:none}.md-toggle--drawer:checked~.md-container .md-sidebar--primary{box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.4);-webkit-transform:translate3d(24.2rem,0,0);transform:translate3d(24.2rem,0,0)}.no-csstransforms3d .md-toggle--drawer:checked~.md-container .md-sidebar--primary{display:block}.md-sidebar--primary .md-sidebar__scrollwrap{overflow:hidden;margin:0}}@media only screen and (min-width:60em){.md-content{margin-right:24.2rem}.md-header-nav__source{display:block;width:23rem;max-width:23rem;padding-right:1.2rem}.md-sidebar--secondary{display:block;float:right}.md-sidebar--secondary.md-js__sidebar--locked{margin-left:100%;-webkit-transform:translate(-100%);transform:translate(-100%)}}@media only screen and (min-width:75em){.md-content{margin-left:24.2rem}.md-content__inner{margin:2.4rem}.md-nav.md-nav--transitioning{-webkit-transition:max-height .4s cubic-bezier(.86,0,.07,1);transition:max-height .4s cubic-bezier(.86,0,.07,1)}.md-nav__toggle~.md-nav{max-height:0;overflow:hidden}.md-nav.md-nav--toggled,.md-nav__toggle:checked~.md-nav{max-height:100%}.md-nav__title+.md-nav__list .md-nav__title{display:none}.md-nav__item--nested>.md-nav__link:after{display:inline-block;-webkit-transform-origin:.45em .485em;transform-origin:.45em .485em;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-transition:-webkit-transform .4s;transition:-webkit-transform .4s;transition:transform .4s;transition:transform .4s,-webkit-transform .4s;vertical-align:-.125em}.md-nav__item--nested .md-nav__toggle:checked~.md-nav__link:after{-webkit-transform:rotateX(180deg);transform:rotateX(180deg)}.md-sidebar__inner{border-right:.1rem solid rgba(0,0,0,.07)}}@media only screen and (min-width:45em){.md-header-nav__icon.md-icon--search{display:none}.md-search{padding:.4rem;padding-right:3.2rem}.md-search__input{width:23rem;height:4rem;padding-left:4.8rem;-webkit-transition:width .25s cubic-bezier(.1,.7,.1,1),background-color .25s,color .25s;transition:width .25s cubic-bezier(.1,.7,.1,1),background-color .25s,color .25s;background:rgba(0,0,0,.26);color:#fff;font-size:1.6rem}.md-search__input+.md-search__icon,.md-search__input::-webkit-input-placeholder{-webkit-transition:color .25s;transition:color .25s;color:#fff}.md-search__input+.md-search__icon,.md-search__input::-moz-placeholder{-webkit-transition:color .25s;transition:color .25s;color:#fff}.md-search__input+.md-search__icon,.md-search__input:-ms-input-placeholder{-webkit-transition:color .25s;transition:color .25s;color:#fff}.md-search__input+.md-search__icon,.md-search__input::placeholder{-webkit-transition:color .25s;transition:color .25s;color:#fff}.md-search__input:hover{background:hsla(0,0%,100%,.12)}.md-search__input:focus{width:66.8rem;background:#fff;color:rgba(0,0,0,.87);text-overflow:none}.md-search__input:focus+.md-search__icon,.md-search__input:focus::-webkit-input-placeholder{color:rgba(0,0,0,.54)}.md-search__input:focus+.md-search__icon,.md-search__input:focus::-moz-placeholder{color:rgba(0,0,0,.54)}.md-search__input:focus+.md-search__icon,.md-search__input:focus:-ms-input-placeholder{color:rgba(0,0,0,.54)}.md-search__input:focus+.md-search__icon,.md-search__input:focus::placeholder{color:rgba(0,0,0,.54)}}@media only screen and (min-width:30em){.md-footer-nav__link{width:50%}}@media only screen and (max-width:29.9375em){.md-footer-nav__link--prev .md-footer-nav__title{display:none}}@media only screen and (max-width:59.9375em){.md-nav--secondary{border-left:0}html .md-nav__link[for=toc]{display:block}html .md-nav__link[for=toc]:after{-webkit-transform:translateY(-50%);transform:translateY(-50%);color:#536dfe;content:"toc"}html .md-nav__link[for=toc]+.md-nav__link{display:none}html .md-nav__link[for=toc]~.md-nav{display:-webkit-box;display:-ms-flexbox;display:flex}.md-nav__source{display:block;padding:.4rem;background:rgba(0,0,0,.87);color:#fff}}@media only screen and (min-width:60em) and (min-width:75em){.md-sidebar--secondary.md-js__sidebar--locked{margin-left:120rem}} \ No newline at end of file diff --git a/material/base.html b/material/base.html index fb15817ba..109fe6428 100644 --- a/material/base.html +++ b/material/base.html @@ -88,10 +88,10 @@ {% include "partials/footer.html" %} - + {% for path in extra_javascript %} {% endfor %} diff --git a/material/partials/header.html b/material/partials/header.html index c402c0c59..460cafe75 100644 --- a/material/partials/header.html +++ b/material/partials/header.html @@ -2,7 +2,14 @@ \ No newline at end of file + diff --git a/package.json b/package.json index 96a246a76..61ef6921b 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "private": true, "dependencies": { "fastclick": "^1.0.6", + "lunr": "^0.7.1", "material-design-color": "^2.3.1", "material-shadows": "^3.0.0", "modularscale-sass": "^2.1.1", @@ -26,12 +27,14 @@ }, "devDependencies": { "autoprefixer": "^6.3.2", + "babel-eslint": "^6.1.2", "babel-loader": "^6.2.4", "babel-preset-es2015": "^6.13.2", "css-mqpacker": "^4.0.0", "del": "^2.2.0", + "eslint": "^3.6.1", + "eslint-loader": "^1.5.0", "gulp": "^3.9.1", - "gulp-add-src": "^0.2.0", "gulp-changed": "^1.3.2", "gulp-concat": "^2.6.0", "gulp-cssnano": "^2.1.1", diff --git a/src/assets/javascripts/application.js b/src/assets/javascripts/application.js index 305af4437..cd2b8f197 100644 --- a/src/assets/javascripts/application.js +++ b/src/assets/javascripts/application.js @@ -20,221 +20,313 @@ * IN THE SOFTWARE. */ -'use strict'; - /* ---------------------------------------------------------------------------- * Imports * ------------------------------------------------------------------------- */ -import FastClick from 'fastclick'; -import Sidebar from './components/sidebar'; -import ScrollSpy from './components/scrollspy'; -import Expander from './components/expander'; +import FastClick from "fastclick" +import lunr from "lunr" + +// import Expander from "./components/expander" +import Sidebar from "./components/sidebar" +import ScrollSpy from "./components/scrollspy" + +// import Search from './components/search'; /* ---------------------------------------------------------------------------- * Application * ------------------------------------------------------------------------- */ /* Initialize application upon DOM ready */ -document.addEventListener('DOMContentLoaded', function() { - 'use strict'; +document.addEventListener("DOMContentLoaded", () => { /* Test for iOS */ - Modernizr.addTest('ios', function() { - return !!navigator.userAgent.match(/(iPad|iPhone|iPod)/g); - }); + Modernizr.addTest("ios", () => { + return !!navigator.userAgent.match(/(iPad|iPhone|iPod)/g) + }) /* Test for web application context */ - Modernizr.addTest('standalone', function() { - return !!navigator.standalone; - }); + Modernizr.addTest("standalone", () => { + return !!navigator.standalone + }) /* Attack FastClick to mitigate 300ms delay on touch devices */ - FastClick.attach(document.body); + FastClick.attach(document.body) + const width = window.matchMedia("(min-width: 1200px)") - var width = window.matchMedia("(min-width: 1200px)"); - var handler = function() { + const sidebar = new Sidebar(".md-sidebar--primary") + const handler = function() { if (width.matches) { - sidebar.listen(); + sidebar.listen() } else { - sidebar.unlisten(); + sidebar.unlisten() } } + handler() // check listen! - var sidebar = new Sidebar('.md-sidebar--primary'); - handler(); // check listen! + const toc = new Sidebar(".md-sidebar--secondary") + toc.listen() - var toc = new Sidebar('.md-sidebar--secondary'); - toc.listen(); + const spy = + new ScrollSpy(".md-sidebar--secondary .md-nav--secondary .md-nav__link") + spy.listen() - var spy = new ScrollSpy('.md-sidebar--secondary .md-nav--secondary .md-nav__link'); - spy.listen(); + window.addEventListener("resize", handler) - window.addEventListener('resize', handler); + const query = document.getElementById("query") + query.addEventListener("focus", () => { + document.querySelector(".md-search").classList.add("md-js__search--locked") + }) /* Intercept click on search mode toggle */ - var offset = 0; - var toggle = document.getElementById('search'); - toggle.addEventListener('click', function(e) { - var list = document.body.classList; - var lock = !matchMedia('only screen and (min-width: 960px)').matches; + let offset = 0 + const toggle = document.getElementById("search") + toggle.addEventListener("click", ev => { + const list = document.body.classList + const lock = !matchMedia("only screen and (min-width: 960px)").matches /* Exiting search mode */ - if (list.contains('md-js__body--locked')) { - list.remove('md-js__body--locked'); + if (list.contains("md-js__body--locked")) { + list.remove("md-js__body--locked") /* Scroll to former position, but wait for 100ms to prevent flashes on iOS. A short timeout seems to do the trick */ if (lock) - setTimeout(function() { - window.scrollTo(0, offset); - }, 100); + setTimeout(() => { + window.scrollTo(0, offset) + }, 100) /* Entering search mode */ } else { - offset = window.scrollY; + offset = window.scrollY /* First timeout: scroll to top after transition, to omit flickering */ if (lock) - setTimeout(function() { - window.scrollTo(0, 0); - }, 400); + setTimeout(() => { + window.scrollTo(0, 0) + }, 400) /* Second timeout: Lock body after finishing transition and scrolling to top and focus input field. Sadly, the focus event is not dispatched on iOS Safari and there's nothing we can do about it. */ - setTimeout(function() { + setTimeout(() => { /* This additional check is necessary to handle fast subsequent clicks on the toggle and the timeout to lock the body must be cancelled */ - if (this.checked) { + if (ev.target.checked) { if (lock) - list.add('md-js__body--locked'); - setTimeout(function() { - document.getElementById('md-search').focus(); - }, 200); + list.add("md-js__body--locked") + setTimeout(() => { + document.getElementById("md-search").focus() + }, 200) } - }.bind(this), 450); + }, 450) } - }); + }) // var toc = new Sidebar('.md-sidebar--secondary'); // toc.listen(); - var toggles = document.querySelectorAll('.md-nav__item--nested > .md-nav__link'); - [].forEach.call(toggles, (toggle) => { - let nav = toggle.nextElementSibling; + const toggles = + document.querySelectorAll(".md-nav__item--nested > .md-nav__link"); + [].forEach.call(toggles, togglex => { + const nav = togglex.nextElementSibling // 1. - nav.style.maxHeight = nav.getBoundingClientRect().height + 'px'; + nav.style.maxHeight = `${nav.getBoundingClientRect().height}px` - toggle.addEventListener('click', function () { - let first = nav.getBoundingClientRect().height; + togglex.addEventListener("click", () => { + const first = nav.getBoundingClientRect().height if (first) { - console.log('closing'); - nav.style.maxHeight = first + 'px'; // reset! + // console.log('closing'); + nav.style.maxHeight = `${first}px` // reset! requestAnimationFrame(() => { - nav.classList.add('md-nav--transitioning'); - nav.style.maxHeight = '0px'; - }); + nav.classList.add("md-nav--transitioning") + nav.style.maxHeight = "0px" + }) } else { - console.log('opening'); + // console.log('opening'); /* Toggle and read height */ - nav.style.maxHeight = ''; + nav.style.maxHeight = "" - nav.classList.add('md-nav--toggled'); - let last = nav.getBoundingClientRect().height; - nav.classList.remove('md-nav--toggled'); + nav.classList.add("md-nav--toggled") + const last = nav.getBoundingClientRect().height + nav.classList.remove("md-nav--toggled") // Initial state - nav.style.maxHeight = '0px'; + nav.style.maxHeight = "0px" /* Enable animations */ requestAnimationFrame(() => { - nav.classList.add('md-nav--transitioning'); - nav.style.maxHeight = last + 'px'; - }); + nav.classList.add("md-nav--transitioning") + nav.style.maxHeight = `${last}px` + }) } - }); + }) // Capture the end with transitionend - nav.addEventListener('transitionend', function() { - this.classList.remove('md-nav--transitioning'); - if (this.getBoundingClientRect().height > 0) { - this.style.maxHeight = '100%'; + nav.addEventListener("transitionend", ev => { + ev.target.classList.remove("md-nav--transitioning") + if (ev.target.getBoundingClientRect().height > 0) { + ev.target.style.maxHeight = "100%" } - }); - }); - - // document.querySelector('[for="nav-3"]').addEventListener('click', function() { - // var el = document.querySelector('[for="nav-3"] + nav'); - // - // // TODO: do via class and disable transforms!!! - // el.style.maxHeight = '100%'; // class !? - // - // var rect = el.getBoundingClientRect(); - // - // console.log(rect); - // - // el.style.maxHeight = '0px'; - // requestAnimationFrame(function() { - // el.classList.add('md-nav--transitioning'); - // el.style.maxHeight = rect.height + 'px'; - // }); - // - // // Capture the end with transitionend - // el.addEventListener('transitionend', function() { - // el.classList.remove('md-nav--transitioning'); - // }); - // }); - + }) + }) // setTimeout(function() { - fetch('https://api.github.com/repos/squidfunk/mkdocs-material') - .then(function(response) { + fetch("https://api.github.com/repos/squidfunk/mkdocs-material") + .then(response => { return response.json() - }).then(function(data) { - var stars = data.stargazers_count; - var forks = data.forks_count; + }) + .then(data => { + const stars = data.stargazers_count + const forks = data.forks_count // store in session!!! - var lists = document.querySelectorAll('.md-source__facts'); - [].forEach.call(lists, function(list) { - // list.innerHTML += '
  • ' + stars + ' Stars
  • \n'; - // list.innerHTML += '
  • ' + forks + ' Forks
  • \n'; + const lists = document.querySelectorAll(".md-source__facts"); // TODO 2x list in drawer and header + [].forEach.call(lists, list => { - var li = document.createElement('li'); - li.className = 'md-source__fact md-source__fact--hidden'; - li.innerText = stars + ' Stars'; - list.appendChild(li); + let li = document.createElement("li") + li.className = "md-source__fact md-source__fact--hidden" + li.innerText = `${stars} Stars` + list.appendChild(li) + setTimeout(lix => { + lix.classList.remove("md-source__fact--hidden") + }, 100, li) - setTimeout(function(li) { - li.classList.remove('md-source__fact--hidden'); - }, 100, li); + li = document.createElement("li") + li.className = "md-source__fact md-source__fact--hidden" + li.innerText = `${forks} Forks` + list.appendChild(li) - li = document.createElement('li'); - li.className = 'md-source__fact md-source__fact--hidden'; - li.innerText = forks + ' Forks'; - list.appendChild(li); - - setTimeout(function(li) { - li.classList.remove('md-source__fact--hidden'); - }, 500, li); + setTimeout(lix => { + lix.classList.remove("md-source__fact--hidden") + }, 500, li) }) - // setTimeout(function() { // li.classList.remove('md-source__fact--hidden'); // }, 100); - }).catch(function(ex) { - console.log('parsing failed', ex) - }); + }) + .catch(() => { + // console.log("parsing failed", ex) + + }) + + // setTimeout(function() { + fetch("/mkdocs/search_index.json") // TODO: prepend BASE URL!!! + .then(response => { + return response.json() + }) + .then(data => { + // console.log(data) + + /* Create index */ + const index = lunr(() => { + /* eslint-disable no-invalid-this, lines-around-comment */ + this.field("title", {boost: 10}) + this.field("text") + this.ref("location") + /* eslint-enable no-invalid-this, lines-around-comment */ + }) + + /* Index articles */ + const articles = {} + data.docs.forEach(article => { + + // TODO: match for two whitespaces, then replace unnecessary whitespace after string + article.text = article.text.replace(/\s(\.,\:)\s/gi, (string, g1) => { + return `${g1} ` + }) + // TODO: window.baseUrl sucks... + article.location = window.baseUrl + article.location + articles[article.location] = article + index.add(article) + }) + + /* Register keyhandler to execute search on key up */ + const queryx = document.getElementById("query") + queryx.addEventListener("keyup", () => { + const container = document.querySelector(".md-search-result__list") + while (container.firstChild) + container.removeChild(container.firstChild) + + // /* Abort, if the query is empty */ + // var bar = document.querySelector('.bar.search'); + // if (!query.value.length) { + // while (meta.firstChild) + // meta.removeChild(meta.firstChild); + // + // /* Restore state */ + // bar.classList.remove('non-empty'); + // return; + // } + + /* Show reset button */ + // bar.classList.add('non-empty'); + + /* Execute search */ + const results = index.search(query.value) + results.forEach(result => { + const article = articles[result.ref] + + /* Create a link referring to the article */ + const link = document.createElement("a") + link.classList.add("md-search-result__link") + link.href = article.location + + // /* Create article container */ + const li = document.createElement("li") + li.classList.add("md-search-result__item") + li.appendChild(link) + + /* Create title element */ + const title = document.createElement("div") + title.classList.add("md-search-result__title") + + // article.title.split(//) + + title.innerHTML = article.title + link.appendChild(title) + + /* Create text element */ + const text = document.createElement("p") + text.classList.add("md-search-result__description") + text.innerHTML = article.text // .truncate(140); + link.appendChild(text) + + container.appendChild(li) + }) + + /* Show number of search results */ + // var number = document.createElement('strong'); + + const meta = document.querySelector(".md-search-result__meta") + meta.innerHTML = `${results.length} search result${ + results.length !== 1 + ? "s" + : ""}` + + /* Update number */ + // while (meta.firstChild) + // meta.removeChild(meta.firstChild); + // meta.appendChild(number); + }) + + // setTimeout(function() { + // li.classList.remove('md-source__fact--hidden'); + // }, 100); + + }) + .catch(() => { + // console.log("parsing failed", ex) + }) // }, 1000); -}); \ No newline at end of file +}) diff --git a/src/assets/javascripts/components/expander.js b/src/assets/javascripts/components/expander.js index 0375f65cc..b0d77b97e 100644 --- a/src/assets/javascripts/components/expander.js +++ b/src/assets/javascripts/components/expander.js @@ -20,8 +20,6 @@ * IN THE SOFTWARE. */ -'use strict'; - /* ---------------------------------------------------------------------------- * Navigation expander * ------------------------------------------------------------------------- */ @@ -35,59 +33,59 @@ class Expander { * @param {(string|HTMLElement)} el - Selector or HTML element */ constructor(el) { - this.el_ = (typeof el === 'string') ? document.querySelector(el) : el; + this.el_ = (typeof el === "string") + ? document.querySelector(el) + : el /* Event listener */ this.handler_ = ev => { - this.update(ev); - }; - }; + this.update(ev) + } + } /** * Update state of expandable element * * @param {Event} ev - Event + * @return {void} */ - update(ev) { - console.log("foo"); - }; + update() {} /** * Reset state of expandable element + * + * @return {void} */ - reset() { - // this.el_.classList.remove('md-js__sidebar--locked'); - // this.el_.style.height = ''; - // - // /* Reset parameters */ - // this.height_ = 0; - // this.locked_ = false; - }; + reset() {} /** * Register listener for all relevant events + * + * @return {void} */ listen() { - ['click'].forEach(name => { - window.addEventListener(name, this.handler_, false); - }); - }; + ["click"].forEach(name => { + window.addEventListener(name, this.handler_, false) + }) + } /** * Unregister listener for all relevant events + * + * @return {void} */ unlisten() { - ['click'].forEach(name => { - window.removeEventListener(name, this.handler_, false); - }); + ["click"].forEach(name => { + window.removeEventListener(name, this.handler_, false) + }) /* Perform reset */ - this.reset(); - }; + this.reset() + } } /* ---------------------------------------------------------------------------- * Exports * ------------------------------------------------------------------------- */ -export default Expander; \ No newline at end of file +export default Expander diff --git a/src/assets/javascripts/components/scrollspy.js b/src/assets/javascripts/components/scrollspy.js index 1a58a4b58..bd43d22f5 100644 --- a/src/assets/javascripts/components/scrollspy.js +++ b/src/assets/javascripts/components/scrollspy.js @@ -20,8 +20,6 @@ * IN THE SOFTWARE. */ -'use strict'; - /* ---------------------------------------------------------------------------- * Sidebar scroll-spy * ------------------------------------------------------------------------- */ @@ -35,87 +33,96 @@ class ScrollSpy { * @param {(string|HTMLCollection)} el - Selector or HTML elements */ constructor(el) { - this.el_ = (typeof el === 'string') ? document.querySelectorAll(el) : el; + this.el_ = (typeof el === "string") + ? document.querySelectorAll(el) + : el /* Initialize index for currently active element */ - this.index_ = 0; - this.offset_ = window.pageYOffset; + this.index_ = 0 + this.offset_ = window.pageYOffset /* Event listener */ this.handler_ = ev => { - this.update(ev); - }; + this.update(ev) + } } /** * Update state of sidebar and hash * - * @param {Event} ev - Event + * @param {Event} ev - Event (omitted) + * @return {void} */ - update(ev) { + update() { /* Scroll direction is down */ if (this.offset_ <= window.pageYOffset) { for (let i = this.index_ + 1; i < this.el_.length; i++) { - let anchor = document.querySelector(this.el_[i].hash); // TODO: improve performance by caching + const anchor = document.querySelector(this.el_[i].hash) // TODO: improve performance by caching if (anchor.offsetTop <= window.pageYOffset) { if (i > 0) - this.el_[i - 1].classList.add('md-nav__link--marked'); - this.index_ = i; + this.el_[i - 1].classList.add("md-nav__link--marked") + this.index_ = i } else { - break; + break } } /* Scroll direction is up */ } else { for (let i = this.index_; i >= 0; i--) { - let anchor = document.querySelector(this.el_[i].hash); + const anchor = document.querySelector(this.el_[i].hash) if (anchor.offsetTop > window.pageYOffset) { if (i > 0) - this.el_[i - 1].classList.remove('md-nav__link--marked'); + this.el_[i - 1].classList.remove("md-nav__link--marked") } else { - this.index_ = i; - break; + this.index_ = i + break } } } /* Remember current offset for next cycle */ - this.offset_ = window.pageYOffset; + this.offset_ = window.pageYOffset } /** * Reset state of sidebar + * + * @return {void} */ reset() { [].forEach.call(this.el_, el => { - el.classList.remove('md-nav__link--marked'); - }); + el.classList.remove("md-nav__link--marked") + }) } /** * Register listener for all relevant events + * + * @return {void} */ listen() { - ['scroll', 'resize', 'orientationchange'].forEach(name => { - window.addEventListener(name, this.handler_, false); - }); + ["scroll", "resize", "orientationchange"].forEach(name => { + window.addEventListener(name, this.handler_, false) + }) /* Initial update */ - this.update(); + this.update() } /** * Unregister listener for all relevant events + * + * @return {void} */ unlisten() { - ['scroll', 'resize', 'orientationchange'].forEach(name => { - window.removeEventListener(name, this.handler_, false); - }); + ["scroll", "resize", "orientationchange"].forEach(name => { + window.removeEventListener(name, this.handler_, false) + }) /* Perform reset */ - this.reset(); + this.reset() } } @@ -123,4 +130,4 @@ class ScrollSpy { * Exports * ------------------------------------------------------------------------- */ -export default ScrollSpy; \ No newline at end of file +export default ScrollSpy diff --git a/src/assets/javascripts/components/search.js b/src/assets/javascripts/components/search.js new file mode 100644 index 000000000..40fb7c92c --- /dev/null +++ b/src/assets/javascripts/components/search.js @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2016 Martin Donath + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +"use strict" + +/* ---------------------------------------------------------------------------- + * Search + * ------------------------------------------------------------------------- */ + +class Search { + + /** + * Constructor + * + * @constructor + * @param {(string|HTMLElement)} el - Selector or HTML element + */ + constructor(el) { + this.el_ = (typeof el === "string") ? document.querySelector(el) : el + + /* Event listener */ + this.handler_ = ev => { + this.update(ev) + } + } + + /** + * Update state and height of sidebar + * + * @param {Event} ev - Event + * @return {void} + */ + update() { + + } + + /** + * Reset state and height of sidebar + * + * @return {void} + */ + reset() { + + } + + /** + * Register listener for all relevant events + * + * @return {void} + */ + listen() { + // ['scroll', 'resize', 'orientationchange'].forEach(name => { + // window.addEventListener(name, this.handler_, false); + // }); + + /* Initial update */ + this.update() + } + + /** + * Unregister listener for all relevant events + * + * @return {void} + */ + unlisten() { + // ['scroll', 'resize', 'orientationchange'].forEach(name => { + // window.removeEventListener(name, this.handler_, false); + // }); + + /* Perform reset */ + this.reset() + } +} + +/* ---------------------------------------------------------------------------- + * Exports + * ------------------------------------------------------------------------- */ + +export default Search diff --git a/src/assets/javascripts/components/sidebar.js b/src/assets/javascripts/components/sidebar.js index 24aa5c512..25baf7c9a 100644 --- a/src/assets/javascripts/components/sidebar.js +++ b/src/assets/javascripts/components/sidebar.js @@ -20,8 +20,6 @@ * IN THE SOFTWARE. */ -'use strict'; - /* ---------------------------------------------------------------------------- * Sidebar sticky-scroll handler * ------------------------------------------------------------------------- */ @@ -35,101 +33,110 @@ class Sidebar { * @param {(string|HTMLElement)} el - Selector or HTML element */ constructor(el) { - this.el_ = (typeof el === 'string') ? document.querySelector(el) : el; + this.el_ = (typeof el === "string") + ? document.querySelector(el) + : el /* Grab inner and outer container */ - this.inner_ = this.el_.parentNode; - this.outer_ = this.el_.parentNode.parentNode; + this.inner_ = this.el_.parentNode + this.outer_ = this.el_.parentNode.parentNode /* Initialize parameters */ - this.height_ = 0; - this.locked_ = false; + this.height_ = 0 + this.locked_ = false /* Event listener */ this.handler_ = ev => { - this.update(ev); - }; - }; + this.update(ev) + } + } /** * Update state and height of sidebar * * @param {Event} ev - Event + * @return {void} */ - update(ev) { - let bounds = this.inner_.getBoundingClientRect(); - let parent = this.outer_.offsetTop; + update() { + const bounds = this.inner_.getBoundingClientRect() + const parent = this.outer_.offsetTop /* Determine top and bottom offsets */ - let top = bounds.top + window.pageYOffset, - bottom = bounds.bottom + window.pageYOffset; + const top = bounds.top + window.pageYOffset, + bottom = bounds.bottom + window.pageYOffset /* Determine current y-offset at top and bottom of window */ - let upper = window.pageYOffset, - lower = window.pageYOffset + window.innerHeight; + const upper = window.pageYOffset, + lower = window.pageYOffset + window.innerHeight /* Calculate new bounds */ - let offset = top - upper; - let height = window.innerHeight - Math.max(lower - bottom, 0) - - Math.max(offset, parent); + const offset = top - upper + const height = window.innerHeight - Math.max(lower - bottom, 0) + - Math.max(offset, parent) /* If height changed, update element */ - if (height != this.height_) - this.el_.style.height = (this.height_ = height) + 'px'; + if (height !== this.height_) + this.el_.style.height = `${this.height_ = height}px` /* Sidebar should be locked, as we're below parent offset */ if (offset < parent) { if (!this.locked_) { - this.el_.classList.add('md-js__sidebar--locked'); - this.locked_ = true; + this.el_.classList.add("md-js__sidebar--locked") + this.locked_ = true } /* Sidebar should be unlocked, if locked */ } else if (this.locked_) { - this.el_.classList.remove('md-js__sidebar--locked'); - this.locked_ = false; + this.el_.classList.remove("md-js__sidebar--locked") + this.locked_ = false } - }; + } /** * Reset state and height of sidebar + * + * @return {void} */ reset() { - this.el_.classList.remove('md-js__sidebar--locked'); - this.el_.style.height = ''; + this.el_.classList.remove("md-js__sidebar--locked") + this.el_.style.height = "" /* Reset parameters */ - this.height_ = 0; - this.locked_ = false; - }; + this.height_ = 0 + this.locked_ = false + } /** * Register listener for all relevant events + * + * @return {void} */ listen() { - ['scroll', 'resize', 'orientationchange'].forEach(name => { - window.addEventListener(name, this.handler_, false); - }); + ["scroll", "resize", "orientationchange"].forEach(name => { + window.addEventListener(name, this.handler_, false) + }) /* Initial update */ - this.update(); - }; + this.update() + } /** * Unregister listener for all relevant events + * + * @return {void} */ unlisten() { - ['scroll', 'resize', 'orientationchange'].forEach(name => { - window.removeEventListener(name, this.handler_, false); - }); + ["scroll", "resize", "orientationchange"].forEach(name => { + window.removeEventListener(name, this.handler_, false) + }) /* Perform reset */ - this.reset(); - }; + this.reset() + } } /* ---------------------------------------------------------------------------- * Exports * ------------------------------------------------------------------------- */ -export default Sidebar; \ No newline at end of file +export default Sidebar diff --git a/src/assets/stylesheets/_shame.scss b/src/assets/stylesheets/_shame.scss index 416127671..87575c9f8 100644 --- a/src/assets/stylesheets/_shame.scss +++ b/src/assets/stylesheets/_shame.scss @@ -24,29 +24,162 @@ // Nothing to see here, move along // ---------------------------------------------------------------------------- -.md-search__suggest { - @include z-depth(8); +@include break-from-device(screen) { - background: $md-color-white; - border-radius: 0 0 px2rem(3px) px2rem(3px); - color: #000000; - text-align: left; - border-top: px2rem(1px) solid $md-color-black--lightest; - display: none; // TODO: doesnt work due to display: none; - opacity: 0; + // .md-search__form { + // background: red; + // width: 23.0rem; + // transition: width 0.6s; + // + // .md-js__search--locked & { + // background: blue; + // width: 66.8rem; + // } + // } - // overflow: auto; - transition: opacity .3s; - // pointer-events: none; + // .md-search__input { + // width: 100% !important; + // } + + .md-search__output { + @include z-depth(6); + + width: 100%; + max-height: 0vh; // TODO: can this be done in percent!?!?!? + opacity: 0; + transition: opacity .4s, max-height .4s; + .md-js__search--locked & { + max-height: 75vh; + opacity: 1; + } + + position: absolute; // must be absolute, or header nav will stretch + background: $md-color-white; + // color: red; + border-top: px2rem(1px) solid $md-color-black--lightest; // TODO: box-shadow inset! + text-align: left; // TODO: wrap with another div for this effect + border-radius: 0 0 px2rem(3px) px2rem(3px); + z-index: -1; + + // Override native scrollbar styles + &::-webkit-scrollbar { + width: 0.4rem; + height: 0.4rem; + + // Style scrollbar thumb + &-thumb { + background-color: $md-color-black--lighter; + + // Hovered scrollbar thumb + &:hover { + background-color: $md-color-accent; + } + } + } + } + + // Scroll shadow! + .md-search__output { + + background: + linear-gradient(white 10%, rgba(255,255,255,0)), // cover + linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.2) 20%, rgba(0, 0, 0, 0) 60%); // shadow + background-repeat: no-repeat; + background-color: white; + background-size: 100% 20px, 100% 5px; + + /* Opera doesn't support this in the shorthand */ + background-attachment: local, scroll; + } + + .md-search-result { - .md-search__input:focus ~ & { - // animation: anima .3s; - display: block; - opacity: 1; + &__meta { + color: $md-color-black--light; + padding-left: 4.8rem; + padding-right: 1.6rem; + line-height: 4.0rem; + font-size: ms(-1); + + } + + &__list { + margin: 0; + padding: 0; + list-style-type: none; + border-top: px2rem(1px) solid $md-color-black--lightest; + } + + &__item { + // background: yellow; + + // border-top: px2rem(1px) solid $md-color-black--lightest; + } + + + &__link { + overflow: auto; + display: block; + padding-left: 4.8rem; + padding-right: 1.6rem; + + &:hover { + background: yellow; + } + } + + &__title { + color: $md-color-black; + font-size: ms(0); + line-height: 1.4; + margin-top: 0.5em; + } + + &__description { + color: $md-color-black--light; + font-size: ms(-1); + line-height: 1.4; + margin: 0.5em 0;; + } } } +// .md-nav--secondary > .md-nav__title { +// // -webkit-overflow-scrolling: touch; +// @include z-depth(1); +// } + + +// // add light border for more contrast +// .md-typeset pre { +// border: 1px solid rgba(0,0,0,0.0125); +// } + + +// .md-search__suggest { +// +// +// background: $md-color-white; +// border-radius: 0 0 px2rem(3px) px2rem(3px); +// color: #000000; +// text-align: left; +// border-top: px2rem(1px) solid $md-color-black--lightest; +// display: none; // TODO: doesnt work due to display: none; +// opacity: 0; +// +// // overflow: auto; +// transition: opacity .3s; +// // pointer-events: none; +// +// +// .md-search__input:focus ~ & { +// // animation: anima .3s; +// display: block; +// opacity: 1; +// } +// } + .md-search__input:focus { border-radius: px2rem(3px) px2rem(3px) 0 0; } @@ -100,6 +233,14 @@ } } + + + + + + + + .checklist { li { @@ -253,4 +394,8 @@ mark { display: block; margin: 0 -16px; padding: 0 16px; +} + +.md-search__output { + overflow-y: auto; // necessary for rounded borders } \ No newline at end of file diff --git a/src/assets/stylesheets/base/_icons.scss b/src/assets/stylesheets/base/_icons.scss index a987234ee..69236a55a 100644 --- a/src/assets/stylesheets/base/_icons.scss +++ b/src/assets/stylesheets/base/_icons.scss @@ -59,9 +59,7 @@ @each $ligature, $name in ( "arrow_back": "back", "arrow_forward": "forward", - "close": "close", - "menu": "menu", - "search": "search" + "close": "close" ) { &--#{$name}::before { content: $ligature; diff --git a/src/assets/stylesheets/extensions/_permalinks.scss b/src/assets/stylesheets/extensions/_permalinks.scss index d32d9b1f1..4b6b5bafe 100644 --- a/src/assets/stylesheets/extensions/_permalinks.scss +++ b/src/assets/stylesheets/extensions/_permalinks.scss @@ -31,7 +31,7 @@ .headerlink { display: inline-block; margin-left: 1.0rem; - transform: translate3d(0, 0.5rem, 0); + transform: translate(0, 0.5rem); transition: transform 0.25s 0.25s, color 0.25s, opacity 0.125s 0.25s; @@ -46,7 +46,7 @@ &:hover .headerlink, &:target .headerlink, & .headerlink:focus { - transform: translate3d(0, 0, 0); + transform: translate(0, 0); opacity: 1; } diff --git a/src/assets/stylesheets/layout/_header.scss b/src/assets/stylesheets/layout/_header.scss index b52613c41..1b8a4c836 100644 --- a/src/assets/stylesheets/layout/_header.scss +++ b/src/assets/stylesheets/layout/_header.scss @@ -55,11 +55,29 @@ opacity: 0.7; } - // [tablet +]: Hide the search icon from tablet + // [tablet +]: Hide the search icon @include break-from-device(tablet) { // Search icon - &.md-icon--search { + &--search { + display: none; + } + } + + // [tablet -]: Hide the home icon + @include break-to-device(tablet) { + + // Home icon + &--home { + display: none; + } + } + + // [screen +]: Hide the menu icon + @include break-from-device(screen) { + + // Menu icon + &--menu { display: none; } } diff --git a/src/assets/stylesheets/layout/_nav.scss b/src/assets/stylesheets/layout/_nav.scss index b647b40cb..82b7b13c2 100644 --- a/src/assets/stylesheets/layout/_nav.scss +++ b/src/assets/stylesheets/layout/_nav.scss @@ -97,7 +97,7 @@ } // Hide link to table of contents by default - this will only match the - // table of contents inside the drawer below and including tablet portrait. + // table of contents inside the drawer below and including tablet portrait html &[for="toc"] { display: none; @@ -159,7 +159,7 @@ } // List title - higher specificity is necessary to ensure that the title - // inside the drawer is always styled accordingly. + // inside the drawer is always styled accordingly html & .md-nav__title { position: relative; padding: 0.4rem 1.6rem 0.4rem 5.6rem; @@ -296,7 +296,7 @@ } // Show link to table of contents - higher specificity is necessary to - // display the table of contents inside the drawer. + // display the table of contents inside the drawer html &__link[for="toc"] { display: block; @@ -331,9 +331,9 @@ @include break-from-device(screen) { // Animation is only possible if JavaScript is available, as the max-height - // property must be calculated before transitioning. + // property must be calculated before transitioning &.md-nav--transitioning { - transition: max-height 0.4s cubic-bezier(0.86, 0.0, 0.07, 1.0); + transition: max-height 0.25s cubic-bezier(0.86, 0.0, 0.07, 1.0); } // Hide nested navigation by default @@ -363,10 +363,15 @@ // Item contains a nested list .md-nav__item--nested > &::after { display: inline-block; - transform-origin: 0.45em 0.485em; + transform-origin: 0.45em 0.45em; transform-style: preserve-3d; - transition: transform 0.4s; vertical-align: -0.125em; + + // Only animate icon when JavaScript is available, as the height can + // not be animated anyway, and better no fun than half the fun + .js & { + transition: transform 0.4s; + } } // Rotate icon for expanded lists diff --git a/src/assets/stylesheets/layout/_search.scss b/src/assets/stylesheets/layout/_search.scss index 12167d732..b818ff868 100644 --- a/src/assets/stylesheets/layout/_search.scss +++ b/src/assets/stylesheets/layout/_search.scss @@ -26,46 +26,50 @@ // Application search .md-search { - // position: relative; padding: 0.8rem 0.8rem 0; + // Hide search, in case JavaScript is not available. + .no-js & { + display: none; + } + // [tablet +]: Header-embedded search @include break-from-device(tablet) { padding: 0.4rem; padding-right: 3.2rem; } - // Search overlay - &__overlay { - display: none; - - // [mobile -]: Only show overlay on mobile - @include break-to-device(mobile) { - display: block; - position: absolute; - top: 0.4rem; - left: 0.4rem; - width: 4.0rem; - height: 4.0rem; - transform-origin: center; - transition: transform 0.3s 0.1s, - opacity 0.2s 0.2s; - border-radius: 2.0rem; // TODO: correct? - background: #EEEEEE; - opacity: 0; - overflow: hidden; - z-index: 0; - - // Expanded overlay - .md-toggle--search:checked ~ .md-header & { - transform: scale(40); - transition: transform 0.4s, - opacity 0.1s; - opacity: 1; - z-index: 1; - } - } - } + // // Search overlay + // &__overlay { + // display: none; + // + // // [mobile -]: Only show overlay on mobile + // @include break-to-device(mobile) { + // display: block; + // position: absolute; + // top: 0.4rem; + // left: 0.4rem; + // width: 4.0rem; + // height: 4.0rem; + // transform-origin: center; + // transition: transform 0.3s 0.1s, + // opacity 0.2s 0.2s; + // border-radius: 2.0rem; // TODO: correct? + // background: #EEEEEE; + // opacity: 0; + // overflow: hidden; + // z-index: 0; + // + // // Expanded overlay + // .md-toggle--search:checked ~ .md-header & { + // transform: scale(40); + // transition: transform 0.4s, + // opacity 0.1s; + // opacity: 1; + // z-index: 1; + // } + // } + // } // Search form &__form { @@ -77,6 +81,17 @@ @include break-to-device(mobile) { @include z-depth(2); } + + // [tablet +]: Header-embedded search + @include break-from-device(tablet) { + width: 23.0rem; + transition: width 0.25s cubic-bezier(0.1, 0.7, 0.1, 1.0); + + // Active search field + .md-js__search--locked & { + width: 66.8rem; + } + } } // Icon @@ -120,11 +135,10 @@ // [tablet +]: Header-embedded search @include break-from-device(tablet) { - width: 23.0rem; + width: 100%; height: 4.0rem; padding-left: 4.8rem; - transition: width 0.25s cubic-bezier(0.1, 0.7, 0.1, 1.0), - background-color 0.25s, + transition: background-color 0.25s, color 0.25s; background: $md-color-black--lighter; color: $md-color-white; @@ -143,8 +157,8 @@ } // Active search field - &:focus { - width: 66.8rem; + .md-js__search--locked & { + border-radius: px2rem(3px) px2rem(3px) 0 0; background: $md-color-white; color: $md-color-black; text-overflow: none; diff --git a/src/assets/stylesheets/layout/_sidebar.scss b/src/assets/stylesheets/layout/_sidebar.scss index 413ed8904..ceff9d385 100644 --- a/src/assets/stylesheets/layout/_sidebar.scss +++ b/src/assets/stylesheets/layout/_sidebar.scss @@ -130,7 +130,12 @@ // Style scrollbar thumb &-thumb { - background: $md-color-black--lighter; + background-color: $md-color-black--lighter; + + // Hovered scrollbar thumb + &:hover { + background-color: $md-color-accent; + } } } } diff --git a/src/assets/stylesheets/layout/_source.scss b/src/assets/stylesheets/layout/_source.scss index 3b4bd42f4..d0d485e64 100644 --- a/src/assets/stylesheets/layout/_source.scss +++ b/src/assets/stylesheets/layout/_source.scss @@ -37,6 +37,14 @@ opacity: 0.7; } + // Necessary for vertical alignment + &::before { + display: inline-block; + height: 4.8rem; + content: ""; + vertical-align: middle; + } + // Repository is hosted on platform &--bitbucket, &--github, @@ -44,14 +52,16 @@ // Platform icon &::before { - display: inline-block; width: 4.8rem; - height: 4.8rem; background-repeat: no-repeat; background-position: center; background-size: $md-icon-size $md-icon-size; - content: ""; - vertical-align: middle; + } + + // Adjust repository information for platform icon + .md-source__repository { + margin-left: -4.4rem; + padding-left: 4.0rem; } } @@ -74,8 +84,7 @@ &__repository { display: inline-block; max-width: 100%; - margin-left: -4.4rem; - padding-left: 4.0rem; + margin-left: 0.8rem; font-weight: 700; text-overflow: ellipsis; overflow: hidden; diff --git a/src/base.html b/src/base.html index 3ee18c79e..9d8d23672 100644 --- a/src/base.html +++ b/src/base.html @@ -170,8 +170,8 @@ {% for path in extra_javascript %} diff --git a/src/partials/header.html b/src/partials/header.html index fa104062f..478a773b8 100644 --- a/src/partials/header.html +++ b/src/partials/header.html @@ -27,10 +27,20 @@ \ No newline at end of file +