From 7f2444174fe3bb7ac409e287cd17ef5d390cdc48 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sun, 7 Aug 2016 18:01:56 +0200 Subject: [PATCH 001/202] Initial commit of rework --- CHANGELOG | 20 + Gulpfile.js | 88 ++- bower.json | 9 +- docs/getting-started.md | 24 +- docs/index.md | 4 +- docs/specimen.md | 106 ++++ material/404.html | 1 + material/__init__.py | 0 .../javascripts/application-997097ee0c.js | 1 - .../javascripts/application-a7f7c32389.js | 8 + material/assets/javascripts/application.js | 9 +- .../javascripts/modernizr-4ab42b99fd.js | 1 - .../javascripts/modernizr-d1e05123d4.js | 1 + material/assets/javascripts/modernizr.js | 2 +- .../stylesheets/application-20d5debb47.css | 1 - .../stylesheets/application-fe75383308.css | 1 + material/assets/stylesheets/application.css | 2 +- .../stylesheets/palettes-05ab2406df.css | 1 - material/assets/stylesheets/palettes.css | 1 - material/base.html | 179 ++---- material/drawer.html | 69 --- material/footer.html | 66 +- material/header.html | 67 +-- material/manifest.json | 7 +- material/nav-item.html | 32 + material/nav.html | 45 +- material/toc-item.html | 12 + material/toc.html | 17 + mkdocs.yml | 13 +- package.json | 8 + src/404.html | 1 + src/assets/javascripts/application.js | 500 +-------------- .../javascripts/components/scrollspy.js | 127 ++++ src/assets/javascripts/components/sidebar.js | 131 ++++ src/assets/javascripts/standalone.js | 49 -- src/assets/stylesheets/_config.scss | 82 +++ src/assets/stylesheets/_highlight.scss | 74 --- src/assets/stylesheets/_palette.scss | 47 -- src/assets/stylesheets/application.scss | 28 +- .../_animation.scss => base/_icons.scss} | 43 +- src/assets/stylesheets/{ => base}/_reset.scss | 54 +- src/assets/stylesheets/base/_typeset.scss | 334 +++++++++++ .../_admonition.scss} | 7 +- .../stylesheets/extensions/_codehilite.scss | 133 ++++ .../_permalinks.scss} | 58 +- src/assets/stylesheets/fonts/_icon.scss | 144 ----- .../{mixins => helpers}/_break.scss | 109 ++-- .../_typography.scss => helpers/_px2em.scss} | 44 +- src/assets/stylesheets/layout/_base.scss | 171 ++++++ .../_typography.scss => layout/_content.scss} | 52 +- src/assets/stylesheets/layout/_footer.scss | 134 +++++ .../_animation.scss => layout/_header.scss} | 84 +-- .../_animation.scss => layout/_nav.scss} | 106 ++-- src/assets/stylesheets/layout/_sidebar.scss | 166 +++++ src/assets/stylesheets/modules/_base.scss | 26 - src/assets/stylesheets/modules/_drawer.scss | 26 - src/assets/stylesheets/modules/_search.scss | 26 - .../modules/article/_appearance.scss | 190 ------ .../stylesheets/modules/article/_layout.scss | 567 ------------------ .../stylesheets/modules/base/_appearance.scss | 138 ----- .../stylesheets/modules/base/_layout.scss | 363 ----------- .../stylesheets/modules/base/_typography.scss | 58 -- .../modules/drawer/_appearance.scss | 143 ----- .../stylesheets/modules/drawer/_layout.scss | 305 ---------- .../modules/search/_animation.scss | 134 ----- .../modules/search/_appearance.scss | 139 ----- .../stylesheets/modules/search/_layout.scss | 218 ------- .../modules/search/_typography.scss | 29 - src/assets/stylesheets/palettes.scss | 221 ------- src/base.html | 273 +++------ src/drawer.html | 96 --- src/footer.html | 103 ++-- src/header.html | 134 ++--- src/nav-item.html | 68 +++ src/nav.html | 79 +-- src/toc-item.html | 38 ++ src/toc.html | 49 ++ 77 files changed, 2405 insertions(+), 4491 deletions(-) create mode 100644 docs/specimen.md create mode 100644 material/404.html delete mode 100644 material/__init__.py delete mode 100644 material/assets/javascripts/application-997097ee0c.js create mode 100644 material/assets/javascripts/application-a7f7c32389.js delete mode 100644 material/assets/javascripts/modernizr-4ab42b99fd.js create mode 100644 material/assets/javascripts/modernizr-d1e05123d4.js delete mode 100644 material/assets/stylesheets/application-20d5debb47.css create mode 100644 material/assets/stylesheets/application-fe75383308.css delete mode 100644 material/assets/stylesheets/palettes-05ab2406df.css delete mode 100644 material/assets/stylesheets/palettes.css delete mode 100644 material/drawer.html create mode 100644 material/nav-item.html create mode 100644 material/toc-item.html create mode 100644 material/toc.html create mode 100644 src/404.html create mode 100644 src/assets/javascripts/components/scrollspy.js create mode 100644 src/assets/javascripts/components/sidebar.js delete mode 100644 src/assets/javascripts/standalone.js create mode 100644 src/assets/stylesheets/_config.scss delete mode 100644 src/assets/stylesheets/_highlight.scss delete mode 100644 src/assets/stylesheets/_palette.scss rename src/assets/stylesheets/{modules/article/_animation.scss => base/_icons.scss} (66%) rename src/assets/stylesheets/{ => base}/_reset.scss (76%) create mode 100644 src/assets/stylesheets/base/_typeset.scss rename src/assets/stylesheets/{modules/_article.scss => extensions/_admonition.scss} (86%) create mode 100644 src/assets/stylesheets/extensions/_codehilite.scss rename src/assets/stylesheets/{_print.scss => extensions/_permalinks.scss} (68%) delete mode 100644 src/assets/stylesheets/fonts/_icon.scss rename src/assets/stylesheets/{mixins => helpers}/_break.scss (70%) rename src/assets/stylesheets/{modules/article/_typography.scss => helpers/_px2em.scss} (67%) create mode 100644 src/assets/stylesheets/layout/_base.scss rename src/assets/stylesheets/{modules/drawer/_typography.scss => layout/_content.scss} (69%) create mode 100644 src/assets/stylesheets/layout/_footer.scss rename src/assets/stylesheets/{modules/base/_animation.scss => layout/_header.scss} (63%) rename src/assets/stylesheets/{modules/drawer/_animation.scss => layout/_nav.scss} (57%) create mode 100644 src/assets/stylesheets/layout/_sidebar.scss delete mode 100644 src/assets/stylesheets/modules/_base.scss delete mode 100644 src/assets/stylesheets/modules/_drawer.scss delete mode 100644 src/assets/stylesheets/modules/_search.scss delete mode 100644 src/assets/stylesheets/modules/article/_appearance.scss delete mode 100644 src/assets/stylesheets/modules/article/_layout.scss delete mode 100644 src/assets/stylesheets/modules/base/_appearance.scss delete mode 100644 src/assets/stylesheets/modules/base/_layout.scss delete mode 100644 src/assets/stylesheets/modules/base/_typography.scss delete mode 100644 src/assets/stylesheets/modules/drawer/_appearance.scss delete mode 100644 src/assets/stylesheets/modules/drawer/_layout.scss delete mode 100644 src/assets/stylesheets/modules/search/_animation.scss delete mode 100644 src/assets/stylesheets/modules/search/_appearance.scss delete mode 100644 src/assets/stylesheets/modules/search/_layout.scss delete mode 100644 src/assets/stylesheets/modules/search/_typography.scss delete mode 100644 src/assets/stylesheets/palettes.scss delete mode 100644 src/drawer.html create mode 100644 src/nav-item.html create mode 100644 src/toc-item.html create mode 100644 src/toc.html diff --git a/CHANGELOG b/CHANGELOG index 95881f06a..4b382d2ff 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,23 @@ +mkdocs-material-0.2.4 (2016-06-26) + + * Fixed improperly set default favicon + * Fixed #33: Protocol relative URL for web fonts doesn't work with file:// + * Fixed #34: IE11 on Windows 7 doesn't honor max-width on main tag + * Fixed #35: Add styling for blockquotes + +mkdocs-material-0.2.3 (2016-05-16) + + * Fixed #25: Highlight inline fenced blocks + * Fixed #26: Better highlighting for keystrokes + * Fixed #30: Suboptimal syntax highlighting for PHP + +mkdocs-material-0.2.2 (2016-03-20) + + * Fixed #15: Document pygments dependency for codehilite + * Fixed #16: Favicon could not be set through mkdocs.yml + * Fixed #17: Put version into own container for styling + * Fixed #20: Fix rounded borders for tables + mkdocs-material-0.2.1 (2016-03-12) * Fixed #10: Invisible header after closing search bar with ESC key diff --git a/Gulpfile.js b/Gulpfile.js index e759bf410..13fc4133a 100755 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -41,14 +41,17 @@ var minimage = require('gulp-image-optimization'); 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 rev = require('gulp-rev'); var sass = require('gulp-sass'); 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 webpack = require('webpack'); /* ---------------------------------------------------------------------------- * Locals @@ -72,9 +75,10 @@ gulp.src = function() { util.log(util.colors.red( 'Error (' + error.plugin + '): ' + error.message )); + var file = error.relativePath.split('/').pop(); notifier.notify({ - title: 'Error (' + error.plugin + ')', - message: error.message.split('\n')[0] + title: 'Error (' + error.plugin + '): ' + file, + message: error.messageOriginal }); this.emit('end'); })); @@ -93,9 +97,9 @@ gulp.task('assets:stylesheets', function() { .pipe( sass({ includePaths: [ - 'bower_components/bourbon/app/assets/stylesheets/', - 'bower_components/quantum-colors/', - 'bower_components/quantum-shadows/' + 'bower_components/modular-scale/stylesheets', + 'bower_components/quantum-colors', + 'bower_components/quantum-shadows' ] })) .pipe( @@ -105,29 +109,60 @@ gulp.task('assets:stylesheets', function() { ])) .pipe(gulpif(args.sourcemaps, sourcemaps.write())) .pipe(gulpif(args.production, mincss())) - .pipe(gulp.dest('material/assets/stylesheets/')); + .pipe(gulp.dest('material/assets/stylesheets')); }); /* - * Build javascripts from Bower components and source. + * Build javascripts by transpiling ES6 with babel. */ gulp.task('assets:javascripts', function() { - return gulp.src([ - - /* Bower components */ - 'bower_components/classlist/classList.js', - 'bower_components/fastclick/lib/fastclick.js', - 'bower_components/pegasus/dist/pegasus.js', - 'bower_components/lunr.js/lunr.js', - - /* Application javascripts */ - 'src/assets/javascripts/application.js', - 'src/assets/javascripts/standalone.js' - ]).pipe(gulpif(args.sourcemaps, sourcemaps.init())) - .pipe(concat('application.js')) - .pipe(gulpif(args.sourcemaps, sourcemaps.write())) - .pipe(gulpif(args.production, uglify())) - .pipe(gulp.dest('material/assets/javascripts/')); + return gulp.src('src/assets/javascripts/**/*.js') + .pipe( + stream({ + entry: 'application.js', + output: { + filename: 'application.js' + }, + module: { + loaders: [{ + loader: 'babel-loader', + test: path.join(__dirname, 'src/assets/javascripts'), + query: { + presets: 'es2015' + } + }] + }, + plugins: [ + new webpack.NoErrorsPlugin(), + new webpack.ResolverPlugin( + new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin( + '.bower.json', ['main'] + ) + ) + ].concat( + args.production ? [ + new webpack.optimize.UglifyJsPlugin({ + compress: { + warnings: false + } + }) + ] : []), + stats: { + colors: true + }, + resolve: { + modulesDirectories: [ + 'src/assets/javascripts', + 'node_modules', + 'bower_components' + ], + extensions: [ + '', '.js' + ] + }, + devtool: args.sourcemaps ? 'source-map' : '' + })) + .pipe(gulp.dest('material/assets/javascripts')); }); /* @@ -138,8 +173,8 @@ gulp.task('assets:modernizr', [ 'assets:javascripts' ], function() { return gulp.src([ - 'material/assets/stylesheets/application.css', - 'material/assets/javascripts/application.js' + 'material/assets/stylesheets/*.css', + 'material/assets/javascripts/*.js' ]).pipe( modernizr({ options: [ @@ -150,7 +185,6 @@ gulp.task('assets:modernizr', [ 'testProp' /* Test for properties */ ] })) - .pipe(addsrc.append('bower_components/respond/dest/respond.src.js')) .pipe(concat('modernizr.js')) .pipe(gulpif(args.production, uglify())) .pipe(gulp.dest('material/assets/javascripts')); @@ -168,7 +202,7 @@ gulp.task('assets:static', function() { interlaced: true }))) .pipe(addsrc.append('src/assets/{fonts,images}/*.{ico,eot,svg,ttf,woff}')) - .pipe(gulp.dest('material/assets/')); + .pipe(gulp.dest('material/assets')); }); /* diff --git a/bower.json b/bower.json index c43fd6fe4..c812ef7f4 100644 --- a/bower.json +++ b/bower.json @@ -16,15 +16,8 @@ "node_modules" ], "private": true, - "dependencies": { - "classlist": "^2014.12.13", - "fastclick": "^1.0.6", - "lunr.js": "^0.6.0", - "pegasus": "^0.3.2", - "respond": "^1.4.2" - }, "devDependencies": { - "bourbon": "^4.2.6", + "modular-scale": "^2.1.1", "quantum-colors": "^1.0.1", "quantum-shadows": "^1.0.0" } diff --git a/docs/getting-started.md b/docs/getting-started.md index cf6cd16f4..40825b89f 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -123,8 +123,6 @@ _deep purple_, _indigo_, _blue_, _light blue_, _cyan_, _teal_, _green_, _light green_, _lime_, _yellow_, _amber_, _orange_, _deep orange_, _brown_, _grey_ and _blue grey_. The last three colors can only be used as a primary color. -![Material Screenshot](images/colors.png) - If the color is set via this configuration, an additional CSS file called `palettes.css` is included that defines the color palettes. If you want to keep things lean, clone the repository and recompile the theme with your @@ -203,14 +201,14 @@ MkDocs supports several [Markdown extensions][]. The following extensions are not enabled by default (see the link for which are enabled by default), so you have to switch them on explicitly. -### CodeHilite (recommended) +### CodeHilite recommended This extensions adds code highlighting to fenced code blocks. It might not be the best code highlighter, but it works without JavaScript and on the server: ``` yaml markdown_extensions: - - codehilite(css_class=code) + - codehilite ``` If you want more extensive highlighting, you can use a JavaScript library like @@ -257,20 +255,28 @@ The Material template adds a neutral color for the `note` class and a red color for the `warning` class. You can also add a custom title: ``` markdown -!!! warning "Don't try this at home" - If you do, you will regret it. +!!! warning + MkDocs supports several [Markdown extensions][]. The following extensions are + not enabled by default (see the link for which are enabled by default), so you + have to switch them on explicitly. ``` This will print: -!!! warning "Don't try this at home" - If you do, you will regret it. +!!! warning + MkDocs supports several [Markdown extensions][]. The following extensions are + not enabled by default (see the link for which are enabled by default), so you + have to switch them on explicitly. More colors can be freely defined. +> MkDocs supports several [Markdown extensions][]. The following extensions are +> not enabled by default (see the link for which are enabled by default), so you +> have to switch them on explicitly. + ## Full example -Below is a full example configuration for a mkdocs.yml: +Below is a full example configuration for a `mkdocs.yml`: ``` yaml # Project information diff --git a/docs/index.md b/docs/index.md index 9fdad9c4f..5fbc03212 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -# Material for MkDocs +# Material for MkDocs ## Beautiful documentation @@ -7,8 +7,6 @@ towards project documentation. It is built using Google's [material design][] guidelines, full responsive, optimized for touch and pointer devices as well as all sorts of screen sizes. -![Material Screenshot](images/screen.png) - Material is very lightweight – it is built from scratch using Javascript and CSS that weighs less than 30kb (minified, gzipped and excluding Google Fonts and Analytics). Yet, it is highly customizable and degrades gracefully in older diff --git a/docs/specimen.md b/docs/specimen.md new file mode 100644 index 000000000..e920c8c4b --- /dev/null +++ b/docs/specimen.md @@ -0,0 +1,106 @@ +# Specimen + +## Typography + +### Body copy + +Material's typographical system follows the idea of __vertical rhythm__, which +means it tries to establish a _consistent visual rhythm_ to the content of the +page to make reading pleasant and easy on the eyes. It's a simple concept but +rather hard to implement correctly. Luckily, the Material theme has already +done this for you, so sit back, relax, and start writing your documentation. + +Naturally, the Material theme defines __bold__ and _italic_ styles, makes it +easy to write `fenced inline code blocks`, [links](#) and Keyboard ++ Commands. + +### Headings w/ or w/o secondary text + +Besides the default HTML headings `

` to `

`, the representational +classes `.h2` to `.h6` are defined to allow easy inline styling. The `

` +should be only defined once and is integrated into the collapsing header. + +Secondary text can be introduced to all headings (including `

`) by using +the `` tag directly inside Markdown. + +## Blockquotes + +> Text can also be written in blockquotes, for example to paraphrase +> something or someone. +> +> > And blockquotes can be nested? +> +> This is correct. Furthermore, they can contain __bold__ and _italic_ text, +> `fenced inline code blocks`, [links](#), headings and all kind of stuff. + +## Lists + +### Ordered lists + +### Unordered lists + +## Code + +### Listing + +Pre-formatted code blocks can host code examples and use the pygments extension +(if installed and enabled in `mkdocs.yml`) for syntax highlighting: + +``` c +/*! + * Scan a buffer for a valid variable-sized integer. + * + * This function checks if an underrun might happen reading a variable-sized + * integer from a buffer. Only underruns can be checked using this method, + * overflows may still happen, but are properly reported by the unpack + * functions. SSE2 intrinsics are used if the compiler supports it. + * + * \param[in] data[] Source buffer + * \param[in] left Remaining bytes + * \return Bytes read + */ +extern size_t +pb_varint_scan(const uint8_t data[], size_t left) { + assert(data && left); + left = left > 10 ? 10 : left; + +#ifdef __SSE2__ + + /* Mapping: remaining bytes ==> bitmask */ + static const int mask_map[] = { + 0x0000, 0x0001, 0x0003, 0x0007, + 0x000F, 0x001F, 0x003F, 0x007F, + 0x00FF, 0x01FF, 0x03FF + }; + + /* Load buffer into 128-bit integer and create high-bit mask */ + __m128i temp = _mm_loadu_si128((const __m128i *)data); + __m128i high = _mm_set1_epi8(0x80); + + /* Intersect and extract mask with high-bits set */ + int mask = _mm_movemask_epi8(_mm_and_si128(temp, high)); + mask = (mask & mask_map[left]) ^ mask_map[left]; + + /* Count trailing zeroes */ + return mask ? __builtin_ctz(mask) + 1 : 0; + +#else + + /* Linear scan */ + size_t size = 0; + while (data[size++] & 0x80) + if (!--left) + return 0; + return size; + +#endif /* __SSE2__ */ + +} +``` + +### Inline + +Code can also be written within `fenced inline code blocks`, however syntax +highlighting will only work on code listings. + +## Tables \ No newline at end of file diff --git a/material/404.html b/material/404.html new file mode 100644 index 000000000..2fd9f9570 --- /dev/null +++ b/material/404.html @@ -0,0 +1 @@ +TBD \ No newline at end of file diff --git a/material/__init__.py b/material/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/material/assets/javascripts/application-997097ee0c.js b/material/assets/javascripts/application-997097ee0c.js deleted file mode 100644 index 1199f2e1d..000000000 --- a/material/assets/javascripts/application-997097ee0c.js +++ /dev/null @@ -1 +0,0 @@ -function pegasus(t,e){return e=new XMLHttpRequest,e.open("GET",t),t=[],e.onreadystatechange=e.then=function(n,o,i,r){if(n&&n.call&&(t=[,n,o]),4==e.readyState&&(i=t[0|e.status/200])){try{r=JSON.parse(e.responseText)}catch(s){r=null}i(r,e)}},e.send(),e}if("document"in self&&("classList"in document.createElement("_")?!function(){"use strict";var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var n,o=arguments.length;for(n=0;o>n;n++)t=arguments[n],e.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}t=null}():!function(t){"use strict";if("Element"in t){var e="classList",n="prototype",o=t.Element[n],i=Object,r=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},s=Array[n].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},a=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},c=function(t,e){if(""===e)throw new a("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(e))throw new a("INVALID_CHARACTER_ERR","String contains an invalid character");return s.call(t,e)},l=function(t){for(var e=r.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],o=0,i=n.length;i>o;o++)this.push(n[o]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},u=l[n]=[],d=function(){return new l(this)};if(a[n]=Error[n],u.item=function(t){return this[t]||null},u.contains=function(t){return t+="",-1!==c(this,t)},u.add=function(){var t,e=arguments,n=0,o=e.length,i=!1;do t=e[n]+"",-1===c(this,t)&&(this.push(t),i=!0);while(++nc;c++)a[s[c]]=i(a[s[c]],a);n&&(e.addEventListener("mouseover",this.onMouse,!0),e.addEventListener("mousedown",this.onMouse,!0),e.addEventListener("mouseup",this.onMouse,!0)),e.addEventListener("click",this.onClick,!0),e.addEventListener("touchstart",this.onTouchStart,!1),e.addEventListener("touchmove",this.onTouchMove,!1),e.addEventListener("touchend",this.onTouchEnd,!1),e.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(e.removeEventListener=function(t,n,o){var i=Node.prototype.removeEventListener;"click"===t?i.call(e,t,n.hijacked||n,o):i.call(e,t,n,o)},e.addEventListener=function(t,n,o){var i=Node.prototype.addEventListener;"click"===t?i.call(e,t,n.hijacked||(n.hijacked=function(t){t.propagationStopped||n(t)}),o):i.call(e,t,n,o)}),"function"==typeof e.onclick&&(r=e.onclick,e.addEventListener("click",function(t){r(t)},!1),e.onclick=null)}}var e=navigator.userAgent.indexOf("Windows Phone")>=0,n=navigator.userAgent.indexOf("Android")>0&&!e,o=/iP(ad|hone|od)/.test(navigator.userAgent)&&!e,i=o&&/OS 4_\d(_\d)?/.test(navigator.userAgent),r=o&&/OS [6-7]_\d/.test(navigator.userAgent),s=navigator.userAgent.indexOf("BB10")>0;t.prototype.needsClick=function(t){switch(t.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(t.disabled)return!0;break;case"input":if(o&&"file"===t.type||t.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(t.className)},t.prototype.needsFocus=function(t){switch(t.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!n;case"input":switch(t.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!t.disabled&&!t.readOnly;default:return/\bneedsfocus\b/.test(t.className)}},t.prototype.sendClick=function(t,e){var n,o;document.activeElement&&document.activeElement!==t&&document.activeElement.blur(),o=e.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(t),!0,!0,window,1,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,t.dispatchEvent(n)},t.prototype.determineEventType=function(t){return n&&"select"===t.tagName.toLowerCase()?"mousedown":"click"},t.prototype.focus=function(t){var e;o&&t.setSelectionRange&&0!==t.type.indexOf("date")&&"time"!==t.type&&"month"!==t.type?(e=t.value.length,t.setSelectionRange(e,e)):t.focus()},t.prototype.updateScrollParent=function(t){var e,n;if(e=t.fastClickScrollParent,!e||!e.contains(t)){n=t;do{if(n.scrollHeight>n.offsetHeight){e=n,t.fastClickScrollParent=n;break}n=n.parentElement}while(n)}e&&(e.fastClickLastScrollTop=e.scrollTop)},t.prototype.getTargetElementFromEventTarget=function(t){return t.nodeType===Node.TEXT_NODE?t.parentNode:t},t.prototype.onTouchStart=function(t){var e,n,r;if(t.targetTouches.length>1)return!0;if(e=this.getTargetElementFromEventTarget(t.target),n=t.targetTouches[0],o){if(r=window.getSelection(),r.rangeCount&&!r.isCollapsed)return!0;if(!i){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return t.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(e)}}return this.trackingClick=!0,this.trackingClickStart=t.timeStamp,this.targetElement=e,this.touchStartX=n.pageX,this.touchStartY=n.pageY,t.timeStamp-this.lastClickTimen||Math.abs(e.pageY-this.touchStartY)>n?!0:!1},t.prototype.onTouchMove=function(t){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(t.target)||this.touchHasMoved(t))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},t.prototype.findControl=function(t){return void 0!==t.control?t.control:t.htmlFor?document.getElementById(t.htmlFor):t.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},t.prototype.onTouchEnd=function(t){var e,s,a,c,l,u=this.targetElement;if(!this.trackingClick)return!0;if(t.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=t.timeStamp,s=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,r&&(l=t.changedTouches[0],u=document.elementFromPoint(l.pageX-window.pageXOffset,l.pageY-window.pageYOffset)||u,u.fastClickScrollParent=this.targetElement.fastClickScrollParent),a=u.tagName.toLowerCase(),"label"===a){if(e=this.findControl(u)){if(this.focus(u),n)return!1;u=e}}else if(this.needsFocus(u))return t.timeStamp-s>100||o&&window.top!==window&&"input"===a?(this.targetElement=null,!1):(this.focus(u),this.sendClick(u,t),o&&"select"===a||(this.targetElement=null,t.preventDefault()),!1);return o&&!i&&(c=u.fastClickScrollParent,c&&c.fastClickLastScrollTop!==c.scrollTop)?!0:(this.needsClick(u)||(t.preventDefault(),this.sendClick(u,t)),!1)},t.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},t.prototype.onMouse=function(t){return this.targetElement?t.forwardedTouchEvent?!0:t.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(t.stopImmediatePropagation?t.stopImmediatePropagation():t.propagationStopped=!0,t.stopPropagation(),t.preventDefault(),!1):!0:!0},t.prototype.onClick=function(t){var e;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===t.target.type&&0===t.detail?!0:(e=this.onMouse(t),e||(this.targetElement=null),e)},t.prototype.destroy=function(){var t=this.layer;n&&(t.removeEventListener("mouseover",this.onMouse,!0),t.removeEventListener("mousedown",this.onMouse,!0),t.removeEventListener("mouseup",this.onMouse,!0)),t.removeEventListener("click",this.onClick,!0),t.removeEventListener("touchstart",this.onTouchStart,!1),t.removeEventListener("touchmove",this.onTouchMove,!1),t.removeEventListener("touchend",this.onTouchEnd,!1),t.removeEventListener("touchcancel",this.onTouchCancel,!1)},t.notNeeded=function(t){var e,o,i,r;if("undefined"==typeof window.ontouchstart)return!0;if(o=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!n)return!0;if(e=document.querySelector("meta[name=viewport]")){if(-1!==e.content.indexOf("user-scalable=no"))return!0;if(o>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(s&&(i=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),i[1]>=10&&i[2]>=3&&(e=document.querySelector("meta[name=viewport]")))){if(-1!==e.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===t.style.msTouchAction||"manipulation"===t.style.touchAction?!0:(r=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],r>=27&&(e=document.querySelector("meta[name=viewport]"),e&&(-1!==e.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===t.style.touchAction||"manipulation"===t.style.touchAction?!0:!1)},t.attach=function(e,n){return new t(e,n)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return t}):"undefined"!=typeof module&&module.exports?(module.exports=t.attach,module.exports.FastClick=t):window.FastClick=t}(),function(){var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.6.0",t.utils={},t.utils.warn=function(t){return function(e){t.console&&console.warn&&console.warn(e)}}(this),t.utils.asString=function(t){return void 0===t||null===t?"":t.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),n=t;if("function"!=typeof e)throw new TypeError("last argument must be a function");n.forEach(function(t){this.hasHandler(t)||(this.events[t]=[]),this.events[t].push(e)},this)},t.EventEmitter.prototype.removeListener=function(t,e){if(this.hasHandler(t)){var n=this.events[t].indexOf(e);this.events[t].splice(n,1),this.events[t].length||delete this.events[t]}},t.EventEmitter.prototype.emit=function(t){if(this.hasHandler(t)){var e=Array.prototype.slice.call(arguments,1);this.events[t].forEach(function(t){t.apply(void 0,e)})}},t.EventEmitter.prototype.hasHandler=function(t){return t in this.events},t.tokenizer=function(e){return arguments.length&&null!=e&&void 0!=e?Array.isArray(e)?e.map(function(e){return t.utils.asString(e).toLowerCase()}):e.toString().trim().toLowerCase().split(t.tokenizer.seperator):[]},t.tokenizer.seperator=/[\s\-]+/,t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var o=t.Pipeline.registeredFunctions[e];if(!o)throw new Error("Cannot load un-registered function: "+e);n.add(o)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var o=this._stack.indexOf(e);if(-1==o)throw new Error("Cannot find existingFn");o+=1,this._stack.splice(o,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var o=this._stack.indexOf(e);if(-1==o)throw new Error("Cannot find existingFn");this._stack.splice(o,0,n)},t.Pipeline.prototype.remove=function(t){var e=this._stack.indexOf(t);-1!=e&&this._stack.splice(e,1)},t.Pipeline.prototype.run=function(t){for(var e=[],n=t.length,o=this._stack.length,i=0;n>i;i++){for(var r=t[i],s=0;o>s&&(r=this._stack[s](r,i,t),void 0!==r&&""!==r);s++);void 0!==r&&""!==r&&e.push(r)}return e},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},t.Vector.Node=function(t,e,n){this.idx=t,this.val=e,this.next=n},t.Vector.prototype.insert=function(e,n){this._magnitude=void 0;var o=this.list;if(!o)return this.list=new t.Vector.Node(e,n,o),this.length++;if(en.idx?n=n.next:(o+=e.val*n.val,e=e.next,n=n.next);return o},t.Vector.prototype.similarity=function(t){return this.dot(t)/(this.magnitude()*t.magnitude())},t.SortedSet=function(){this.length=0,this.elements=[]},t.SortedSet.load=function(t){var e=new this;return e.elements=t,e.length=t.length,e},t.SortedSet.prototype.add=function(){var t,e;for(t=0;t1;){if(r===t)return i;t>r&&(e=i),r>t&&(n=i),o=n-e,i=e+Math.floor(o/2),r=this.elements[i]}return r===t?i:-1},t.SortedSet.prototype.locationFor=function(t){for(var e=0,n=this.elements.length,o=n-e,i=e+Math.floor(o/2),r=this.elements[i];o>1;)t>r&&(e=i),r>t&&(n=i),o=n-e,i=e+Math.floor(o/2),r=this.elements[i];return r>t?i:t>r?i+1:void 0},t.SortedSet.prototype.intersect=function(e){for(var n=new t.SortedSet,o=0,i=0,r=this.length,s=e.length,a=this.elements,c=e.elements;;){if(o>r-1||i>s-1)break;a[o]!==c[i]?a[o]c[i]&&i++:(n.add(a[o]),o++,i++)}return n},t.SortedSet.prototype.clone=function(){var e=new t.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},t.SortedSet.prototype.union=function(t){var e,n,o;return this.length>=t.length?(e=this,n=t):(e=t,n=this),o=e.clone(),o.add.apply(o,n.toArray()),o},t.SortedSet.prototype.toJSON=function(){return this.toArray()},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.Store,this.tokenStore=new t.TokenStore,this.corpusTokens=new t.SortedSet,this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var t=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,t)},t.Index.prototype.off=function(t,e){return this.eventEmitter.removeListener(t,e)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;return n._fields=e.fields,n._ref=e.ref,n.documentStore=t.Store.load(e.documentStore),n.tokenStore=t.TokenStore.load(e.tokenStore),n.corpusTokens=t.SortedSet.load(e.corpusTokens),n.pipeline=t.Pipeline.load(e.pipeline),n},t.Index.prototype.field=function(t,e){var e=e||{},n={name:t,boost:e.boost||1};return this._fields.push(n),this},t.Index.prototype.ref=function(t){return this._ref=t,this},t.Index.prototype.add=function(e,n){var o={},i=new t.SortedSet,r=e[this._ref],n=void 0===n?!0:n;this._fields.forEach(function(n){var r=this.pipeline.run(t.tokenizer(e[n.name]));o[n.name]=r,t.SortedSet.prototype.add.apply(i,r)},this),this.documentStore.set(r,i),t.SortedSet.prototype.add.apply(this.corpusTokens,i.toArray());for(var s=0;s0&&(o=1+Math.log(this.documentStore.length/n)),this._idfCache[e]=o},t.Index.prototype.search=function(e){var n=this.pipeline.run(t.tokenizer(e)),o=new t.Vector,i=[],r=this._fields.reduce(function(t,e){return t+e.boost},0),s=n.some(function(t){return this.tokenStore.has(t)},this);if(!s)return[];n.forEach(function(e,n,s){var a=1/s.length*this._fields.length*r,c=this,l=this.tokenStore.expand(e).reduce(function(n,i){var r=c.corpusTokens.indexOf(i),s=c.idf(i),l=1,u=new t.SortedSet;if(i!==e){var d=Math.max(3,i.length-e.length);l=1/Math.log(d)}r>-1&&o.insert(r,a*s*l);for(var h=c.tokenStore.get(i),f=Object.keys(h),p=f.length,m=0;p>m;m++)u.add(h[f[m]].ref);return n.union(u)},new t.SortedSet);i.push(l)},this);var a=i.reduce(function(t,e){return t.intersect(e)});return a.map(function(t){return{ref:t,score:o.similarity(this.documentVector(t))}},this).sort(function(t,e){return e.score-t.score})},t.Index.prototype.documentVector=function(e){for(var n=this.documentStore.get(e),o=n.length,i=new t.Vector,r=0;o>r;r++){var s=n.elements[r],a=this.tokenStore.get(s)[e].tf,c=this.idf(s);i.insert(this.corpusTokens.indexOf(s),a*c)}return i},t.Index.prototype.toJSON=function(){return{version:t.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},t.Store=function(){this.store={},this.length=0},t.Store.load=function(e){var n=new this;return n.length=e.length,n.store=Object.keys(e.store).reduce(function(n,o){return n[o]=t.SortedSet.load(e.store[o]),n},{}),n},t.Store.prototype.set=function(t,e){this.has(t)||this.length++,this.store[t]=e},t.Store.prototype.get=function(t){return this.store[t]},t.Store.prototype.has=function(t){return t in this.store},t.Store.prototype.remove=function(t){this.has(t)&&(delete this.store[t],this.length--)},t.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},t.stemmer=function(){var t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},e={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",o="[aeiouy]",i=n+"[^aeiouy]*",r=o+"[aeiou]*",s="^("+i+")?"+r+i,a="^("+i+")?"+r+i+"("+r+")?$",c="^("+i+")?"+r+i+r+i,l="^("+i+")?"+o,u=new RegExp(s),d=new RegExp(c),h=new RegExp(a),f=new RegExp(l),p=/^(.+?)(ss|i)es$/,m=/^(.+?)([^s])s$/,v=/^(.+?)eed$/,g=/^(.+?)(ed|ing)$/,y=/.$/,w=/(at|bl|iz)$/,S=new RegExp("([^aeiouylsz])\\1$"),k=new RegExp("^"+i+o+"[^aeiouwxy]$"),E=/^(.+?[^aeiou])y$/,x=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,b=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,T=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,C=/^(.+?)(s|t)(ion)$/,L=/^(.+?)e$/,_=/ll$/,A=new RegExp("^"+i+o+"[^aeiouwxy]$"),O=function(n){var o,i,r,s,a,c,l;if(n.length<3)return n;if(r=n.substr(0,1),"y"==r&&(n=r.toUpperCase()+n.substr(1)),s=p,a=m,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),s=v,a=g,s.test(n)){var O=s.exec(n);s=u,s.test(O[1])&&(s=y,n=n.replace(s,""))}else if(a.test(n)){var O=a.exec(n);o=O[1],a=f,a.test(o)&&(n=o,a=w,c=S,l=k,a.test(n)?n+="e":c.test(n)?(s=y,n=n.replace(s,"")):l.test(n)&&(n+="e"))}if(s=E,s.test(n)){var O=s.exec(n);o=O[1],n=o+"i"}if(s=x,s.test(n)){var O=s.exec(n);o=O[1],i=O[2],s=u,s.test(o)&&(n=o+t[i])}if(s=b,s.test(n)){var O=s.exec(n);o=O[1],i=O[2],s=u,s.test(o)&&(n=o+e[i])}if(s=T,a=C,s.test(n)){var O=s.exec(n);o=O[1],s=d,s.test(o)&&(n=o)}else if(a.test(n)){var O=a.exec(n);o=O[1]+O[2],a=d,a.test(o)&&(n=o)}if(s=L,s.test(n)){var O=s.exec(n);o=O[1],s=d,a=h,c=A,(s.test(o)||a.test(o)&&!c.test(o))&&(n=o)}return s=_,a=d,s.test(n)&&a.test(n)&&(s=y,n=n.replace(s,"")),"y"==r&&(n=r.toLowerCase()+n.substr(1)),n};return O}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.generateStopWordFilter=function(t){var e=t.reduce(function(t,e){return t[e]=e,t},{});return function(t){return t&&e[t]!==t?t:void 0}},t.stopWordFilter=t.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(t){return t.replace(/^\W+/,"").replace(/\W+$/,"")},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.TokenStore=function(){this.root={docs:{}},this.length=0},t.TokenStore.load=function(t){var e=new this;return e.root=t.root,e.length=t.length,e},t.TokenStore.prototype.add=function(t,e,n){var n=n||this.root,o=t.charAt(0),i=t.slice(1);return o in n||(n[o]={docs:{}}),0===i.length?(n[o].docs[e.ref]=e,void(this.length+=1)):this.add(i,e,n[o])},t.TokenStore.prototype.has=function(t){if(!t)return!1;for(var e=this.root,n=0;nt){for(;" "!=this[t]&&--t>0;);return this.substring(0,t)+"…"}return this},HTMLElement.prototype.wrap=function(t){t.length||(t=[t]);for(var e=t.length-1;e>=0;e--){var n=e>0?this.cloneNode(!0):this,o=t[e],i=o.parentNode,r=o.nextSibling;n.appendChild(o),r?i.insertBefore(n,r):i.appendChild(n)}},document.addEventListener("DOMContentLoaded",function(){"use strict";Modernizr.addTest("ios",function(){return!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)}),Modernizr.addTest("standalone",function(){return!!navigator.standalone}),FastClick.attach(document.body);var t=document.getElementById("toggle-search"),e=(document.getElementById("reset-search"),document.querySelector(".drawer")),n=document.querySelectorAll(".anchor"),o=document.querySelector(".search .field"),i=document.querySelector(".query"),r=document.querySelector(".results .meta");Array.prototype.forEach.call(n,function(t){t.querySelector("a").addEventListener("click",function(){document.getElementById("toggle-drawer").checked=!1,document.body.classList.remove("toggle-drawer")})});var s=window.pageYOffset,a=function(){var t=window.pageYOffset+window.innerHeight,n=Math.max(0,window.innerHeight-e.offsetHeight);t>document.body.clientHeight-(96-n)?"absolute"!=e.style.position&&(e.style.position="absolute",e.style.top=null,e.style.bottom=0):e.offsetHeighte.offsetTop+e.offsetHeight?(e.style.position="fixed",e.style.top=null,e.style.bottom="-96px"):window.pageYOffsets?e.style.top&&(e.style.position="absolute",e.style.top=Math.max(0,s)+"px",e.style.bottom=null):e.style.bottom&&(e.style.position="absolute",e.style.top=t-e.offsetHeight+"px",e.style.bottom=null),s=Math.max(0,window.pageYOffset)},c=function(){var t=document.querySelector(".main");window.removeEventListener("scroll",a),matchMedia("only screen and (max-width: 959px)").matches?(e.style.position=null,e.style.top=null,e.style.bottom=null):e.offsetHeight+96o;o++)t1e4?n=(n/1e3).toFixed(0)+"k":n>1e3&&(n=(n/1e3).toFixed(1)+"k");var o=document.querySelector(".repo-stars .count");o.innerHTML=n},function(t,e){console.error(t,e.status)})}),"standalone"in window.navigator&&window.navigator.standalone){var node,remotes=!1;document.addEventListener("click",function(t){for(node=t.target;"A"!==node.nodeName&&"HTML"!==node.nodeName;)node=node.parentNode;"href"in node&&-1!==node.href.indexOf("http")&&(-1!==node.href.indexOf(document.location.host)||remotes)&&(t.preventDefault(),document.location.href=node.href)},!1)} \ No newline at end of file diff --git a/material/assets/javascripts/application-a7f7c32389.js b/material/assets/javascripts/application-a7f7c32389.js new file mode 100644 index 000000000..f95f41d54 --- /dev/null +++ b/material/assets/javascripts/application-a7f7c32389.js @@ -0,0 +1,8 @@ +!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);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-nav--toc .md-nav__item a");o.listen(),window.addEventListener("resize",t)})},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}]); \ No newline at end of file diff --git a/material/assets/javascripts/application.js b/material/assets/javascripts/application.js index 1199f2e1d..f95f41d54 100644 --- a/material/assets/javascripts/application.js +++ b/material/assets/javascripts/application.js @@ -1 +1,8 @@ -function pegasus(t,e){return e=new XMLHttpRequest,e.open("GET",t),t=[],e.onreadystatechange=e.then=function(n,o,i,r){if(n&&n.call&&(t=[,n,o]),4==e.readyState&&(i=t[0|e.status/200])){try{r=JSON.parse(e.responseText)}catch(s){r=null}i(r,e)}},e.send(),e}if("document"in self&&("classList"in document.createElement("_")?!function(){"use strict";var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var n,o=arguments.length;for(n=0;o>n;n++)t=arguments[n],e.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}t=null}():!function(t){"use strict";if("Element"in t){var e="classList",n="prototype",o=t.Element[n],i=Object,r=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},s=Array[n].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},a=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},c=function(t,e){if(""===e)throw new a("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(e))throw new a("INVALID_CHARACTER_ERR","String contains an invalid character");return s.call(t,e)},l=function(t){for(var e=r.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],o=0,i=n.length;i>o;o++)this.push(n[o]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},u=l[n]=[],d=function(){return new l(this)};if(a[n]=Error[n],u.item=function(t){return this[t]||null},u.contains=function(t){return t+="",-1!==c(this,t)},u.add=function(){var t,e=arguments,n=0,o=e.length,i=!1;do t=e[n]+"",-1===c(this,t)&&(this.push(t),i=!0);while(++nc;c++)a[s[c]]=i(a[s[c]],a);n&&(e.addEventListener("mouseover",this.onMouse,!0),e.addEventListener("mousedown",this.onMouse,!0),e.addEventListener("mouseup",this.onMouse,!0)),e.addEventListener("click",this.onClick,!0),e.addEventListener("touchstart",this.onTouchStart,!1),e.addEventListener("touchmove",this.onTouchMove,!1),e.addEventListener("touchend",this.onTouchEnd,!1),e.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(e.removeEventListener=function(t,n,o){var i=Node.prototype.removeEventListener;"click"===t?i.call(e,t,n.hijacked||n,o):i.call(e,t,n,o)},e.addEventListener=function(t,n,o){var i=Node.prototype.addEventListener;"click"===t?i.call(e,t,n.hijacked||(n.hijacked=function(t){t.propagationStopped||n(t)}),o):i.call(e,t,n,o)}),"function"==typeof e.onclick&&(r=e.onclick,e.addEventListener("click",function(t){r(t)},!1),e.onclick=null)}}var e=navigator.userAgent.indexOf("Windows Phone")>=0,n=navigator.userAgent.indexOf("Android")>0&&!e,o=/iP(ad|hone|od)/.test(navigator.userAgent)&&!e,i=o&&/OS 4_\d(_\d)?/.test(navigator.userAgent),r=o&&/OS [6-7]_\d/.test(navigator.userAgent),s=navigator.userAgent.indexOf("BB10")>0;t.prototype.needsClick=function(t){switch(t.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(t.disabled)return!0;break;case"input":if(o&&"file"===t.type||t.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(t.className)},t.prototype.needsFocus=function(t){switch(t.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!n;case"input":switch(t.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!t.disabled&&!t.readOnly;default:return/\bneedsfocus\b/.test(t.className)}},t.prototype.sendClick=function(t,e){var n,o;document.activeElement&&document.activeElement!==t&&document.activeElement.blur(),o=e.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(t),!0,!0,window,1,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,t.dispatchEvent(n)},t.prototype.determineEventType=function(t){return n&&"select"===t.tagName.toLowerCase()?"mousedown":"click"},t.prototype.focus=function(t){var e;o&&t.setSelectionRange&&0!==t.type.indexOf("date")&&"time"!==t.type&&"month"!==t.type?(e=t.value.length,t.setSelectionRange(e,e)):t.focus()},t.prototype.updateScrollParent=function(t){var e,n;if(e=t.fastClickScrollParent,!e||!e.contains(t)){n=t;do{if(n.scrollHeight>n.offsetHeight){e=n,t.fastClickScrollParent=n;break}n=n.parentElement}while(n)}e&&(e.fastClickLastScrollTop=e.scrollTop)},t.prototype.getTargetElementFromEventTarget=function(t){return t.nodeType===Node.TEXT_NODE?t.parentNode:t},t.prototype.onTouchStart=function(t){var e,n,r;if(t.targetTouches.length>1)return!0;if(e=this.getTargetElementFromEventTarget(t.target),n=t.targetTouches[0],o){if(r=window.getSelection(),r.rangeCount&&!r.isCollapsed)return!0;if(!i){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return t.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(e)}}return this.trackingClick=!0,this.trackingClickStart=t.timeStamp,this.targetElement=e,this.touchStartX=n.pageX,this.touchStartY=n.pageY,t.timeStamp-this.lastClickTimen||Math.abs(e.pageY-this.touchStartY)>n?!0:!1},t.prototype.onTouchMove=function(t){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(t.target)||this.touchHasMoved(t))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},t.prototype.findControl=function(t){return void 0!==t.control?t.control:t.htmlFor?document.getElementById(t.htmlFor):t.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},t.prototype.onTouchEnd=function(t){var e,s,a,c,l,u=this.targetElement;if(!this.trackingClick)return!0;if(t.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=t.timeStamp,s=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,r&&(l=t.changedTouches[0],u=document.elementFromPoint(l.pageX-window.pageXOffset,l.pageY-window.pageYOffset)||u,u.fastClickScrollParent=this.targetElement.fastClickScrollParent),a=u.tagName.toLowerCase(),"label"===a){if(e=this.findControl(u)){if(this.focus(u),n)return!1;u=e}}else if(this.needsFocus(u))return t.timeStamp-s>100||o&&window.top!==window&&"input"===a?(this.targetElement=null,!1):(this.focus(u),this.sendClick(u,t),o&&"select"===a||(this.targetElement=null,t.preventDefault()),!1);return o&&!i&&(c=u.fastClickScrollParent,c&&c.fastClickLastScrollTop!==c.scrollTop)?!0:(this.needsClick(u)||(t.preventDefault(),this.sendClick(u,t)),!1)},t.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},t.prototype.onMouse=function(t){return this.targetElement?t.forwardedTouchEvent?!0:t.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(t.stopImmediatePropagation?t.stopImmediatePropagation():t.propagationStopped=!0,t.stopPropagation(),t.preventDefault(),!1):!0:!0},t.prototype.onClick=function(t){var e;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===t.target.type&&0===t.detail?!0:(e=this.onMouse(t),e||(this.targetElement=null),e)},t.prototype.destroy=function(){var t=this.layer;n&&(t.removeEventListener("mouseover",this.onMouse,!0),t.removeEventListener("mousedown",this.onMouse,!0),t.removeEventListener("mouseup",this.onMouse,!0)),t.removeEventListener("click",this.onClick,!0),t.removeEventListener("touchstart",this.onTouchStart,!1),t.removeEventListener("touchmove",this.onTouchMove,!1),t.removeEventListener("touchend",this.onTouchEnd,!1),t.removeEventListener("touchcancel",this.onTouchCancel,!1)},t.notNeeded=function(t){var e,o,i,r;if("undefined"==typeof window.ontouchstart)return!0;if(o=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!n)return!0;if(e=document.querySelector("meta[name=viewport]")){if(-1!==e.content.indexOf("user-scalable=no"))return!0;if(o>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(s&&(i=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),i[1]>=10&&i[2]>=3&&(e=document.querySelector("meta[name=viewport]")))){if(-1!==e.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===t.style.msTouchAction||"manipulation"===t.style.touchAction?!0:(r=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],r>=27&&(e=document.querySelector("meta[name=viewport]"),e&&(-1!==e.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===t.style.touchAction||"manipulation"===t.style.touchAction?!0:!1)},t.attach=function(e,n){return new t(e,n)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return t}):"undefined"!=typeof module&&module.exports?(module.exports=t.attach,module.exports.FastClick=t):window.FastClick=t}(),function(){var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.6.0",t.utils={},t.utils.warn=function(t){return function(e){t.console&&console.warn&&console.warn(e)}}(this),t.utils.asString=function(t){return void 0===t||null===t?"":t.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),n=t;if("function"!=typeof e)throw new TypeError("last argument must be a function");n.forEach(function(t){this.hasHandler(t)||(this.events[t]=[]),this.events[t].push(e)},this)},t.EventEmitter.prototype.removeListener=function(t,e){if(this.hasHandler(t)){var n=this.events[t].indexOf(e);this.events[t].splice(n,1),this.events[t].length||delete this.events[t]}},t.EventEmitter.prototype.emit=function(t){if(this.hasHandler(t)){var e=Array.prototype.slice.call(arguments,1);this.events[t].forEach(function(t){t.apply(void 0,e)})}},t.EventEmitter.prototype.hasHandler=function(t){return t in this.events},t.tokenizer=function(e){return arguments.length&&null!=e&&void 0!=e?Array.isArray(e)?e.map(function(e){return t.utils.asString(e).toLowerCase()}):e.toString().trim().toLowerCase().split(t.tokenizer.seperator):[]},t.tokenizer.seperator=/[\s\-]+/,t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var o=t.Pipeline.registeredFunctions[e];if(!o)throw new Error("Cannot load un-registered function: "+e);n.add(o)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var o=this._stack.indexOf(e);if(-1==o)throw new Error("Cannot find existingFn");o+=1,this._stack.splice(o,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var o=this._stack.indexOf(e);if(-1==o)throw new Error("Cannot find existingFn");this._stack.splice(o,0,n)},t.Pipeline.prototype.remove=function(t){var e=this._stack.indexOf(t);-1!=e&&this._stack.splice(e,1)},t.Pipeline.prototype.run=function(t){for(var e=[],n=t.length,o=this._stack.length,i=0;n>i;i++){for(var r=t[i],s=0;o>s&&(r=this._stack[s](r,i,t),void 0!==r&&""!==r);s++);void 0!==r&&""!==r&&e.push(r)}return e},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},t.Vector.Node=function(t,e,n){this.idx=t,this.val=e,this.next=n},t.Vector.prototype.insert=function(e,n){this._magnitude=void 0;var o=this.list;if(!o)return this.list=new t.Vector.Node(e,n,o),this.length++;if(en.idx?n=n.next:(o+=e.val*n.val,e=e.next,n=n.next);return o},t.Vector.prototype.similarity=function(t){return this.dot(t)/(this.magnitude()*t.magnitude())},t.SortedSet=function(){this.length=0,this.elements=[]},t.SortedSet.load=function(t){var e=new this;return e.elements=t,e.length=t.length,e},t.SortedSet.prototype.add=function(){var t,e;for(t=0;t1;){if(r===t)return i;t>r&&(e=i),r>t&&(n=i),o=n-e,i=e+Math.floor(o/2),r=this.elements[i]}return r===t?i:-1},t.SortedSet.prototype.locationFor=function(t){for(var e=0,n=this.elements.length,o=n-e,i=e+Math.floor(o/2),r=this.elements[i];o>1;)t>r&&(e=i),r>t&&(n=i),o=n-e,i=e+Math.floor(o/2),r=this.elements[i];return r>t?i:t>r?i+1:void 0},t.SortedSet.prototype.intersect=function(e){for(var n=new t.SortedSet,o=0,i=0,r=this.length,s=e.length,a=this.elements,c=e.elements;;){if(o>r-1||i>s-1)break;a[o]!==c[i]?a[o]c[i]&&i++:(n.add(a[o]),o++,i++)}return n},t.SortedSet.prototype.clone=function(){var e=new t.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},t.SortedSet.prototype.union=function(t){var e,n,o;return this.length>=t.length?(e=this,n=t):(e=t,n=this),o=e.clone(),o.add.apply(o,n.toArray()),o},t.SortedSet.prototype.toJSON=function(){return this.toArray()},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.Store,this.tokenStore=new t.TokenStore,this.corpusTokens=new t.SortedSet,this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var t=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,t)},t.Index.prototype.off=function(t,e){return this.eventEmitter.removeListener(t,e)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;return n._fields=e.fields,n._ref=e.ref,n.documentStore=t.Store.load(e.documentStore),n.tokenStore=t.TokenStore.load(e.tokenStore),n.corpusTokens=t.SortedSet.load(e.corpusTokens),n.pipeline=t.Pipeline.load(e.pipeline),n},t.Index.prototype.field=function(t,e){var e=e||{},n={name:t,boost:e.boost||1};return this._fields.push(n),this},t.Index.prototype.ref=function(t){return this._ref=t,this},t.Index.prototype.add=function(e,n){var o={},i=new t.SortedSet,r=e[this._ref],n=void 0===n?!0:n;this._fields.forEach(function(n){var r=this.pipeline.run(t.tokenizer(e[n.name]));o[n.name]=r,t.SortedSet.prototype.add.apply(i,r)},this),this.documentStore.set(r,i),t.SortedSet.prototype.add.apply(this.corpusTokens,i.toArray());for(var s=0;s0&&(o=1+Math.log(this.documentStore.length/n)),this._idfCache[e]=o},t.Index.prototype.search=function(e){var n=this.pipeline.run(t.tokenizer(e)),o=new t.Vector,i=[],r=this._fields.reduce(function(t,e){return t+e.boost},0),s=n.some(function(t){return this.tokenStore.has(t)},this);if(!s)return[];n.forEach(function(e,n,s){var a=1/s.length*this._fields.length*r,c=this,l=this.tokenStore.expand(e).reduce(function(n,i){var r=c.corpusTokens.indexOf(i),s=c.idf(i),l=1,u=new t.SortedSet;if(i!==e){var d=Math.max(3,i.length-e.length);l=1/Math.log(d)}r>-1&&o.insert(r,a*s*l);for(var h=c.tokenStore.get(i),f=Object.keys(h),p=f.length,m=0;p>m;m++)u.add(h[f[m]].ref);return n.union(u)},new t.SortedSet);i.push(l)},this);var a=i.reduce(function(t,e){return t.intersect(e)});return a.map(function(t){return{ref:t,score:o.similarity(this.documentVector(t))}},this).sort(function(t,e){return e.score-t.score})},t.Index.prototype.documentVector=function(e){for(var n=this.documentStore.get(e),o=n.length,i=new t.Vector,r=0;o>r;r++){var s=n.elements[r],a=this.tokenStore.get(s)[e].tf,c=this.idf(s);i.insert(this.corpusTokens.indexOf(s),a*c)}return i},t.Index.prototype.toJSON=function(){return{version:t.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},t.Store=function(){this.store={},this.length=0},t.Store.load=function(e){var n=new this;return n.length=e.length,n.store=Object.keys(e.store).reduce(function(n,o){return n[o]=t.SortedSet.load(e.store[o]),n},{}),n},t.Store.prototype.set=function(t,e){this.has(t)||this.length++,this.store[t]=e},t.Store.prototype.get=function(t){return this.store[t]},t.Store.prototype.has=function(t){return t in this.store},t.Store.prototype.remove=function(t){this.has(t)&&(delete this.store[t],this.length--)},t.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},t.stemmer=function(){var t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},e={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",o="[aeiouy]",i=n+"[^aeiouy]*",r=o+"[aeiou]*",s="^("+i+")?"+r+i,a="^("+i+")?"+r+i+"("+r+")?$",c="^("+i+")?"+r+i+r+i,l="^("+i+")?"+o,u=new RegExp(s),d=new RegExp(c),h=new RegExp(a),f=new RegExp(l),p=/^(.+?)(ss|i)es$/,m=/^(.+?)([^s])s$/,v=/^(.+?)eed$/,g=/^(.+?)(ed|ing)$/,y=/.$/,w=/(at|bl|iz)$/,S=new RegExp("([^aeiouylsz])\\1$"),k=new RegExp("^"+i+o+"[^aeiouwxy]$"),E=/^(.+?[^aeiou])y$/,x=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,b=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,T=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,C=/^(.+?)(s|t)(ion)$/,L=/^(.+?)e$/,_=/ll$/,A=new RegExp("^"+i+o+"[^aeiouwxy]$"),O=function(n){var o,i,r,s,a,c,l;if(n.length<3)return n;if(r=n.substr(0,1),"y"==r&&(n=r.toUpperCase()+n.substr(1)),s=p,a=m,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),s=v,a=g,s.test(n)){var O=s.exec(n);s=u,s.test(O[1])&&(s=y,n=n.replace(s,""))}else if(a.test(n)){var O=a.exec(n);o=O[1],a=f,a.test(o)&&(n=o,a=w,c=S,l=k,a.test(n)?n+="e":c.test(n)?(s=y,n=n.replace(s,"")):l.test(n)&&(n+="e"))}if(s=E,s.test(n)){var O=s.exec(n);o=O[1],n=o+"i"}if(s=x,s.test(n)){var O=s.exec(n);o=O[1],i=O[2],s=u,s.test(o)&&(n=o+t[i])}if(s=b,s.test(n)){var O=s.exec(n);o=O[1],i=O[2],s=u,s.test(o)&&(n=o+e[i])}if(s=T,a=C,s.test(n)){var O=s.exec(n);o=O[1],s=d,s.test(o)&&(n=o)}else if(a.test(n)){var O=a.exec(n);o=O[1]+O[2],a=d,a.test(o)&&(n=o)}if(s=L,s.test(n)){var O=s.exec(n);o=O[1],s=d,a=h,c=A,(s.test(o)||a.test(o)&&!c.test(o))&&(n=o)}return s=_,a=d,s.test(n)&&a.test(n)&&(s=y,n=n.replace(s,"")),"y"==r&&(n=r.toLowerCase()+n.substr(1)),n};return O}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.generateStopWordFilter=function(t){var e=t.reduce(function(t,e){return t[e]=e,t},{});return function(t){return t&&e[t]!==t?t:void 0}},t.stopWordFilter=t.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(t){return t.replace(/^\W+/,"").replace(/\W+$/,"")},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.TokenStore=function(){this.root={docs:{}},this.length=0},t.TokenStore.load=function(t){var e=new this;return e.root=t.root,e.length=t.length,e},t.TokenStore.prototype.add=function(t,e,n){var n=n||this.root,o=t.charAt(0),i=t.slice(1);return o in n||(n[o]={docs:{}}),0===i.length?(n[o].docs[e.ref]=e,void(this.length+=1)):this.add(i,e,n[o])},t.TokenStore.prototype.has=function(t){if(!t)return!1;for(var e=this.root,n=0;nt){for(;" "!=this[t]&&--t>0;);return this.substring(0,t)+"…"}return this},HTMLElement.prototype.wrap=function(t){t.length||(t=[t]);for(var e=t.length-1;e>=0;e--){var n=e>0?this.cloneNode(!0):this,o=t[e],i=o.parentNode,r=o.nextSibling;n.appendChild(o),r?i.insertBefore(n,r):i.appendChild(n)}},document.addEventListener("DOMContentLoaded",function(){"use strict";Modernizr.addTest("ios",function(){return!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)}),Modernizr.addTest("standalone",function(){return!!navigator.standalone}),FastClick.attach(document.body);var t=document.getElementById("toggle-search"),e=(document.getElementById("reset-search"),document.querySelector(".drawer")),n=document.querySelectorAll(".anchor"),o=document.querySelector(".search .field"),i=document.querySelector(".query"),r=document.querySelector(".results .meta");Array.prototype.forEach.call(n,function(t){t.querySelector("a").addEventListener("click",function(){document.getElementById("toggle-drawer").checked=!1,document.body.classList.remove("toggle-drawer")})});var s=window.pageYOffset,a=function(){var t=window.pageYOffset+window.innerHeight,n=Math.max(0,window.innerHeight-e.offsetHeight);t>document.body.clientHeight-(96-n)?"absolute"!=e.style.position&&(e.style.position="absolute",e.style.top=null,e.style.bottom=0):e.offsetHeighte.offsetTop+e.offsetHeight?(e.style.position="fixed",e.style.top=null,e.style.bottom="-96px"):window.pageYOffsets?e.style.top&&(e.style.position="absolute",e.style.top=Math.max(0,s)+"px",e.style.bottom=null):e.style.bottom&&(e.style.position="absolute",e.style.top=t-e.offsetHeight+"px",e.style.bottom=null),s=Math.max(0,window.pageYOffset)},c=function(){var t=document.querySelector(".main");window.removeEventListener("scroll",a),matchMedia("only screen and (max-width: 959px)").matches?(e.style.position=null,e.style.top=null,e.style.bottom=null):e.offsetHeight+96o;o++)t1e4?n=(n/1e3).toFixed(0)+"k":n>1e3&&(n=(n/1e3).toFixed(1)+"k");var o=document.querySelector(".repo-stars .count");o.innerHTML=n},function(t,e){console.error(t,e.status)})}),"standalone"in window.navigator&&window.navigator.standalone){var node,remotes=!1;document.addEventListener("click",function(t){for(node=t.target;"A"!==node.nodeName&&"HTML"!==node.nodeName;)node=node.parentNode;"href"in node&&-1!==node.href.indexOf("http")&&(-1!==node.href.indexOf(document.location.host)||remotes)&&(t.preventDefault(),document.location.href=node.href)},!1)} \ No newline at end of file +!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);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-nav--toc .md-nav__item a");o.listen(),window.addEventListener("resize",t)})},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}]); \ No newline at end of file diff --git a/material/assets/javascripts/modernizr-4ab42b99fd.js b/material/assets/javascripts/modernizr-4ab42b99fd.js deleted file mode 100644 index e82c90988..000000000 --- a/material/assets/javascripts/modernizr-4ab42b99fd.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t,n){function r(e,t){return typeof e===t}function i(){var e,t,n,i,o,a,s;for(var l in x)if(x.hasOwnProperty(l)){if(e=[],t=x[l],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;nf;f++)if(h=e[f],g=_.style[h],l(h,"-")&&(h=m(h)),_.style[h]!==n){if(o||r(i,"undefined"))return a(),"pfx"==t?h:!0;try{_.style[h]=i}catch(y){}if(_.style[h]!=g)return a(),"pfx"==t?h:!0}return a(),!1}function g(e,t,n){var i;for(var o in e)if(e[o]in t)return n===!1?e[o]:(i=t[e[o]],r(i,"function")?s(i,n||t):i);return!1}function v(e,t,n,i,o){var a=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+P.join(a+" ")+a).split(" ");return r(t,"string")||r(t,"undefined")?h(s,t,i,o):(s=(e+" "+A.join(a+" ")+a).split(" "),g(s,t,n))}function y(e,t,r){return v(e,n,n,t,r)}var x=[],E={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){x.push({name:e,fn:t,options:n})},addAsyncTest:function(e){x.push({name:null,fn:e})}},S=function(){};S.prototype=E,S=new S;var b,w=[],C=t.documentElement,T="svg"===C.nodeName.toLowerCase();!function(){var e={}.hasOwnProperty;b=r(e,"undefined")||r(e.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),E._l={},E.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),S.hasOwnProperty(e)&&setTimeout(function(){S._trigger(e,S[e])},0)},E._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout(function(){var e,r;for(e=0;e",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=C.elements;return"string"==typeof e?e.split(" "):e}function i(e,t){var n=C.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),C.elements=n+" "+e,u(t)}function o(e){var t=w[e[S]];return t||(t={},b++,e[S]=b,w[b]=t),t}function a(e,n,r){if(n||(n=t),g)return n.createElement(e);r||(r=o(n));var i;return i=r.cache[e]?r.cache[e].cloneNode():E.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!i.canHaveChildren||x.test(e)||i.tagUrn?i:r.frag.appendChild(i)}function s(e,n){if(e||(e=t),g)return e.createDocumentFragment();n=n||o(e);for(var i=n.frag.cloneNode(),a=0,s=r(),l=s.length;l>a;a++)i.createElement(s[a]);return i}function l(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return C.shivMethods?a(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(C,t.frag)}function u(e){e||(e=t);var r=o(e);return!C.shivCSS||h||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),g||l(e,r),e}function c(e){for(var t,n=e.getElementsByTagName("*"),i=n.length,o=RegExp("^(?:"+r().join("|")+")$","i"),a=[];i--;)t=n[i],o.test(t.nodeName)&&a.push(t.applyElement(f(t)));return a}function f(e){for(var t,n=e.attributes,r=n.length,i=e.ownerDocument.createElement(N+":"+e.nodeName);r--;)t=n[r],t.specified&&i.setAttribute(t.nodeName,t.nodeValue);return i.style.cssText=e.style.cssText,i}function d(e){for(var t,n=e.split("{"),i=n.length,o=RegExp("(^|[\\s,>+~])("+r().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),a="$1"+N+"\\:$2";i--;)t=n[i]=n[i].split("}"),t[t.length-1]=t[t.length-1].replace(o,a),n[i]=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,i,a=o(e),s=e.namespaces,l=e.parentWindow;return!_||e.printShived?e:("undefined"==typeof s[N]&&s.add(N),l.attachEvent("onbeforeprint",function(){t();for(var o,a,s,l=e.styleSheets,u=[],f=l.length,p=Array(f);f--;)p[f]=l[f];for(;s=p.pop();)if(!s.disabled&&T.test(s.media)){try{o=s.imports,a=o.length}catch(m){a=0}for(f=0;a>f;f++)p.push(o[f]);try{u.push(s.cssText)}catch(m){}}u=d(u.reverse().join("")),i=c(e),r=n(e,u)}),l.attachEvent("onafterprint",function(){p(i),clearTimeout(a._removeSheetTimer),a._removeSheetTimer=setTimeout(t,500)}),e.printShived=!0,e)}var h,g,v="3.7.3",y=e.html5||{},x=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,E=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,S="_html5shiv",b=0,w={};!function(){try{var e=t.createElement("a");e.innerHTML="",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:u,createElement:a,createDocumentFragment:s,addElements:i};e.html5=C,u(t);var T=/^$|\b(?:all|print)\b/,N="html5shiv",_=!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 N={elem:u("modernizr")};S._q.push(function(){delete N.elem});var _={style:N.elem.style};S._q.unshift(function(){delete _.style});var z=(E.testProp=function(e,t,r){return h([e],n,t,r)},function(){function e(e,t){var i;return e?(t&&"string"!=typeof t||(t=u(t||"div")),e="on"+e,i=e in t,!i&&r&&(t.setAttribute||(t=u("div")),t.setAttribute(e,""),i="function"==typeof t[e],t[e]!==n&&(t[e]=n),t.removeAttribute(e)),i):!1}var r=!("onblur"in t.documentElement);return e}());E.hasEvent=z,S.addTest("inputsearchevent",z("search"));var k=E.testStyles=f,$=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,i=533>t&&e.match(/android/gi);return n||i||r}();$?S.addTest("fontface",!1):k('@font-face {font-family:"font";src:url("https://")}',function(e,n){var r=t.getElementById("smodernizr"),i=r.sheet||r.styleSheet,o=i?i.cssRules&&i.cssRules[0]?i.cssRules[0].cssText:i.cssText||"":"",a=/src/i.test(o)&&0===o.indexOf(n.split(" ")[0]);S.addTest("fontface",a)});var j="Moz O ms Webkit",P=E._config.usePrefixes?j.split(" "):[];E._cssomPrefixes=P;var A=E._config.usePrefixes?j.toLowerCase().split(" "):[];E._domPrefixes=A,E.testAllProps=v,E.testAllProps=y;var R="CSS"in e&&"supports"in e.CSS,F="supportsCSS"in e;S.addTest("supports",R||F),S.addTest("csstransforms3d",function(){var e=!!y("perspective","1px",!0),t=S._config.usePrefixes;if(e&&(!t||"webkitPerspective"in C.style)){var n,r="#modernizr{width:0;height:0}";S.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}}",k(r+n,function(t){e=7===t.offsetWidth&&18===t.offsetHeight})}return e}),S.addTest("json","JSON"in e&&"parse"in JSON&&"stringify"in JSON),S.addTest("checked",function(){return k("#modernizr {position:absolute} #modernizr input {margin-left:10px} #modernizr :checked {margin-left:20px;display:block}",function(e){var t=u("input");return t.setAttribute("type","checkbox"),t.setAttribute("checked","checked"),e.appendChild(t),20===t.offsetLeft})}),S.addTest("target",function(){var t=e.document;if(!("querySelectorAll"in t))return!1;try{return t.querySelectorAll(":target"),!0}catch(n){return!1}}),S.addTest("contains",r(String.prototype.contains,"function")),i(),o(w),delete E.addTest,delete E.addAsyncTest;for(var M=0;M #mq-test-1 { width: 42px; }',r.insertBefore(o,i),n=42===a.offsetWidth,r.removeChild(o),{matches:n,media:e}}}(e.document)}(this),function(e){"use strict";function t(){E(!0)}var n={};e.respond=n,n.update=function(){};var r=[],i=function(){var t=!1;try{t=new e.XMLHttpRequest}catch(n){t=new e.ActiveXObject("Microsoft.XMLHTTP")}return function(){return t}}(),o=function(e,t){var n=i();n&&(n.open("GET",e,!0),n.onreadystatechange=function(){4!==n.readyState||200!==n.status&&304!==n.status||t(n.responseText)},4!==n.readyState&&n.send(null))};if(n.ajax=o,n.queue=r,n.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},n.mediaQueriesSupported=e.matchMedia&&null!==e.matchMedia("only all")&&e.matchMedia("only all").matches,!n.mediaQueriesSupported){var a,s,l,u=e.document,c=u.documentElement,f=[],d=[],p=[],m={},h=30,g=u.getElementsByTagName("head")[0]||c,v=u.getElementsByTagName("base")[0],y=g.getElementsByTagName("link"),x=function(){var e,t=u.createElement("div"),n=u.body,r=c.style.fontSize,i=n&&n.style.fontSize,o=!1;return t.style.cssText="position:absolute;font-size:1em;width:1em",n||(n=o=u.createElement("body"),n.style.background="none"),c.style.fontSize="100%",n.style.fontSize="100%",n.appendChild(t),o&&c.insertBefore(n,c.firstChild),e=t.offsetWidth,o?c.removeChild(n):n.removeChild(t),c.style.fontSize=r,i&&(n.style.fontSize=i),e=l=parseFloat(e)},E=function(t){var n="clientWidth",r=c[n],i="CSS1Compat"===u.compatMode&&r||u.body[n]||r,o={},m=y[y.length-1],v=(new Date).getTime();if(t&&a&&h>v-a)return e.clearTimeout(s),void(s=e.setTimeout(E,h));a=v;for(var S in f)if(f.hasOwnProperty(S)){var b=f[S],w=b.minw,C=b.maxw,T=null===w,N=null===C,_="em";w&&(w=parseFloat(w)*(w.indexOf(_)>-1?l||x():1)),C&&(C=parseFloat(C)*(C.indexOf(_)>-1?l||x():1)),b.hasquery&&(T&&N||!(T||i>=w)||!(N||C>=i))||(o[b.media]||(o[b.media]=[]),o[b.media].push(d[b.rules]))}for(var z in p)p.hasOwnProperty(z)&&p[z]&&p[z].parentNode===g&&g.removeChild(p[z]);p.length=0;for(var k in o)if(o.hasOwnProperty(k)){var $=u.createElement("style"),j=o[k].join("\n");$.type="text/css",$.media=k,g.insertBefore($,m.nextSibling),$.styleSheet?$.styleSheet.cssText=j:$.appendChild(u.createTextNode(j)),p.push($)}},S=function(e,t,r){var i=e.replace(n.regex.keyframes,"").match(n.regex.media),o=i&&i.length||0;t=t.substring(0,t.lastIndexOf("/"));var a=function(e){return e.replace(n.regex.urls,"$1"+t+"$2$3")},s=!o&&r;t.length&&(t+="/"),s&&(o=1);for(var l=0;o>l;l++){var u,c,p,m;s?(u=r,d.push(a(e))):(u=i[l].match(n.regex.findStyles)&&RegExp.$1,d.push(RegExp.$2&&a(RegExp.$2))),p=u.split(","),m=p.length;for(var h=0;m>h;h++)c=p[h],f.push({media:c.split("(")[0].match(n.regex.only)&&RegExp.$2||"all",rules:d.length-1,hasquery:c.indexOf("(")>-1,minw:c.match(n.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:c.match(n.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}E()},b=function(){if(r.length){var t=r.shift();o(t.href,function(n){S(n,t.href,t.media),m[t.href]=!0,e.setTimeout(function(){b()},0)})}},w=function(){for(var t=0;tu;u++)if(h=e[u],g=N.style[h],l(h,"-")&&(h=m(h)),N.style[h]!==n){if(i||r(o,"undefined"))return a(),"pfx"==t?h:!0;try{N.style[h]=o}catch(y){}if(N.style[h]!=g)return a(),"pfx"==t?h:!0}return a(),!1}function g(e,t,n){var o;for(var i in e)if(e[i]in t)return n===!1?e[i]:(o=t[e[i]],r(o,"function")?s(o,n||t):o);return!1}function v(e,t,n,o,i){var a=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+z.join(a+" ")+a).split(" ");return r(t,"string")||r(t,"undefined")?h(s,t,o,i):(s=(e+" "+F.join(a+" ")+a).split(" "),g(s,t,n))}function y(e,t,r){return v(e,n,n,t,r)}var E=[],S={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){E.push({name:e,fn:t,options:n})},addAsyncTest:function(e){E.push({name:null,fn:e})}},b=function(){};b.prototype=S,b=new b;var w,C=[],x=t.documentElement,T="svg"===x.nodeName.toLowerCase();!function(){var e={}.hasOwnProperty;w=r(e,"undefined")||r(e.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),S._l={},S.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),b.hasOwnProperty(e)&&setTimeout(function(){b._trigger(e,b[e])},0)},S._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout(function(){var e,r;for(e=0;e",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=x.elements;return"string"==typeof e?e.split(" "):e}function o(e,t){var n=x.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),x.elements=n+" "+e,c(t)}function i(e){var t=C[e[b]];return t||(t={},w++,e[b]=w,C[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():S.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!o.canHaveChildren||E.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;l>a;a++)o.createElement(s[a]);return o}function l(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return x.shivMethods?a(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(x,t.frag)}function c(e){e||(e=t);var r=i(e);return!x.shivCSS||h||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),g||l(e,r),e}function f(e){for(var t,n=e.getElementsByTagName("*"),o=n.length,i=RegExp("^(?:"+r().join("|")+")$","i"),a=[];o--;)t=n[o],i.test(t.nodeName)&&a.push(t.applyElement(u(t)));return a}function u(e){for(var t,n=e.attributes,r=n.length,o=e.ownerDocument.createElement(_+":"+e.nodeName);r--;)t=n[r],t.specified&&o.setAttribute(t.nodeName,t.nodeValue);return o.style.cssText=e.style.cssText,o}function d(e){for(var t,n=e.split("{"),o=n.length,i=RegExp("(^|[\\s,>+~])("+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=[],u=l.length,p=Array(u);u--;)p[u]=l[u];for(;s=p.pop();)if(!s.disabled&&T.test(s.media)){try{i=s.imports,a=i.length}catch(m){a=0}for(u=0;a>u;u++)p.push(i[u]);try{c.push(s.cssText)}catch(m){}}c=d(c.reverse().join("")),o=f(e),r=n(e,c)}),l.attachEvent("onafterprint",function(){p(o),clearTimeout(a._removeSheetTimer),a._removeSheetTimer=setTimeout(t,500)}),e.printShived=!0,e)}var h,g,v="3.7.3",y=e.html5||{},E=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,S=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,b="_html5shiv",w=0,C={};!function(){try{var e=t.createElement("a");e.innerHTML="",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 x={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=x,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)}();x.type+=" print",x.shivPrint=m,m(t),"object"==typeof module&&module.exports&&(module.exports=x)}("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});var j=(S.testProp=function(e,t,r){return h([e],n,t,r)},S.testStyles=u),P=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=533>t&&e.match(/android/gi);return n||o||r}();P?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 k="Moz O ms Webkit",z=S._config.usePrefixes?k.split(" "):[];S._cssomPrefixes=z;var F=S._config.usePrefixes?k.toLowerCase().split(" "):[];S._domPrefixes=F,S.testAllProps=v,S.testAllProps=y;var $="CSS"in e&&"supports"in e.CSS,A="supportsCSS"in e;b.addTest("supports",$||A),b.addTest("csstransforms3d",function(){var e=!!y("perspective","1px",!0),t=b._config.usePrefixes;if(e&&(!t||"webkitPerspective"in x.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("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(C),delete S.addTest,delete S.addAsyncTest;for(var q=0;qf;f++)if(h=e[f],g=_.style[h],l(h,"-")&&(h=m(h)),_.style[h]!==n){if(o||r(i,"undefined"))return a(),"pfx"==t?h:!0;try{_.style[h]=i}catch(y){}if(_.style[h]!=g)return a(),"pfx"==t?h:!0}return a(),!1}function g(e,t,n){var i;for(var o in e)if(e[o]in t)return n===!1?e[o]:(i=t[e[o]],r(i,"function")?s(i,n||t):i);return!1}function v(e,t,n,i,o){var a=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+P.join(a+" ")+a).split(" ");return r(t,"string")||r(t,"undefined")?h(s,t,i,o):(s=(e+" "+A.join(a+" ")+a).split(" "),g(s,t,n))}function y(e,t,r){return v(e,n,n,t,r)}var x=[],E={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){x.push({name:e,fn:t,options:n})},addAsyncTest:function(e){x.push({name:null,fn:e})}},S=function(){};S.prototype=E,S=new S;var b,w=[],C=t.documentElement,T="svg"===C.nodeName.toLowerCase();!function(){var e={}.hasOwnProperty;b=r(e,"undefined")||r(e.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),E._l={},E.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),S.hasOwnProperty(e)&&setTimeout(function(){S._trigger(e,S[e])},0)},E._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout(function(){var e,r;for(e=0;e",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=C.elements;return"string"==typeof e?e.split(" "):e}function i(e,t){var n=C.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),C.elements=n+" "+e,u(t)}function o(e){var t=w[e[S]];return t||(t={},b++,e[S]=b,w[b]=t),t}function a(e,n,r){if(n||(n=t),g)return n.createElement(e);r||(r=o(n));var i;return i=r.cache[e]?r.cache[e].cloneNode():E.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!i.canHaveChildren||x.test(e)||i.tagUrn?i:r.frag.appendChild(i)}function s(e,n){if(e||(e=t),g)return e.createDocumentFragment();n=n||o(e);for(var i=n.frag.cloneNode(),a=0,s=r(),l=s.length;l>a;a++)i.createElement(s[a]);return i}function l(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return C.shivMethods?a(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(C,t.frag)}function u(e){e||(e=t);var r=o(e);return!C.shivCSS||h||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),g||l(e,r),e}function c(e){for(var t,n=e.getElementsByTagName("*"),i=n.length,o=RegExp("^(?:"+r().join("|")+")$","i"),a=[];i--;)t=n[i],o.test(t.nodeName)&&a.push(t.applyElement(f(t)));return a}function f(e){for(var t,n=e.attributes,r=n.length,i=e.ownerDocument.createElement(N+":"+e.nodeName);r--;)t=n[r],t.specified&&i.setAttribute(t.nodeName,t.nodeValue);return i.style.cssText=e.style.cssText,i}function d(e){for(var t,n=e.split("{"),i=n.length,o=RegExp("(^|[\\s,>+~])("+r().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),a="$1"+N+"\\:$2";i--;)t=n[i]=n[i].split("}"),t[t.length-1]=t[t.length-1].replace(o,a),n[i]=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,i,a=o(e),s=e.namespaces,l=e.parentWindow;return!_||e.printShived?e:("undefined"==typeof s[N]&&s.add(N),l.attachEvent("onbeforeprint",function(){t();for(var o,a,s,l=e.styleSheets,u=[],f=l.length,p=Array(f);f--;)p[f]=l[f];for(;s=p.pop();)if(!s.disabled&&T.test(s.media)){try{o=s.imports,a=o.length}catch(m){a=0}for(f=0;a>f;f++)p.push(o[f]);try{u.push(s.cssText)}catch(m){}}u=d(u.reverse().join("")),i=c(e),r=n(e,u)}),l.attachEvent("onafterprint",function(){p(i),clearTimeout(a._removeSheetTimer),a._removeSheetTimer=setTimeout(t,500)}),e.printShived=!0,e)}var h,g,v="3.7.3",y=e.html5||{},x=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,E=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,S="_html5shiv",b=0,w={};!function(){try{var e=t.createElement("a");e.innerHTML="",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:u,createElement:a,createDocumentFragment:s,addElements:i};e.html5=C,u(t);var T=/^$|\b(?:all|print)\b/,N="html5shiv",_=!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 N={elem:u("modernizr")};S._q.push(function(){delete N.elem});var _={style:N.elem.style};S._q.unshift(function(){delete _.style});var z=(E.testProp=function(e,t,r){return h([e],n,t,r)},function(){function e(e,t){var i;return e?(t&&"string"!=typeof t||(t=u(t||"div")),e="on"+e,i=e in t,!i&&r&&(t.setAttribute||(t=u("div")),t.setAttribute(e,""),i="function"==typeof t[e],t[e]!==n&&(t[e]=n),t.removeAttribute(e)),i):!1}var r=!("onblur"in t.documentElement);return e}());E.hasEvent=z,S.addTest("inputsearchevent",z("search"));var k=E.testStyles=f,$=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,i=533>t&&e.match(/android/gi);return n||i||r}();$?S.addTest("fontface",!1):k('@font-face {font-family:"font";src:url("https://")}',function(e,n){var r=t.getElementById("smodernizr"),i=r.sheet||r.styleSheet,o=i?i.cssRules&&i.cssRules[0]?i.cssRules[0].cssText:i.cssText||"":"",a=/src/i.test(o)&&0===o.indexOf(n.split(" ")[0]);S.addTest("fontface",a)});var j="Moz O ms Webkit",P=E._config.usePrefixes?j.split(" "):[];E._cssomPrefixes=P;var A=E._config.usePrefixes?j.toLowerCase().split(" "):[];E._domPrefixes=A,E.testAllProps=v,E.testAllProps=y;var R="CSS"in e&&"supports"in e.CSS,F="supportsCSS"in e;S.addTest("supports",R||F),S.addTest("csstransforms3d",function(){var e=!!y("perspective","1px",!0),t=S._config.usePrefixes;if(e&&(!t||"webkitPerspective"in C.style)){var n,r="#modernizr{width:0;height:0}";S.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}}",k(r+n,function(t){e=7===t.offsetWidth&&18===t.offsetHeight})}return e}),S.addTest("json","JSON"in e&&"parse"in JSON&&"stringify"in JSON),S.addTest("checked",function(){return k("#modernizr {position:absolute} #modernizr input {margin-left:10px} #modernizr :checked {margin-left:20px;display:block}",function(e){var t=u("input");return t.setAttribute("type","checkbox"),t.setAttribute("checked","checked"),e.appendChild(t),20===t.offsetLeft})}),S.addTest("target",function(){var t=e.document;if(!("querySelectorAll"in t))return!1;try{return t.querySelectorAll(":target"),!0}catch(n){return!1}}),S.addTest("contains",r(String.prototype.contains,"function")),i(),o(w),delete E.addTest,delete E.addAsyncTest;for(var M=0;M #mq-test-1 { width: 42px; }',r.insertBefore(o,i),n=42===a.offsetWidth,r.removeChild(o),{matches:n,media:e}}}(e.document)}(this),function(e){"use strict";function t(){E(!0)}var n={};e.respond=n,n.update=function(){};var r=[],i=function(){var t=!1;try{t=new e.XMLHttpRequest}catch(n){t=new e.ActiveXObject("Microsoft.XMLHTTP")}return function(){return t}}(),o=function(e,t){var n=i();n&&(n.open("GET",e,!0),n.onreadystatechange=function(){4!==n.readyState||200!==n.status&&304!==n.status||t(n.responseText)},4!==n.readyState&&n.send(null))};if(n.ajax=o,n.queue=r,n.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},n.mediaQueriesSupported=e.matchMedia&&null!==e.matchMedia("only all")&&e.matchMedia("only all").matches,!n.mediaQueriesSupported){var a,s,l,u=e.document,c=u.documentElement,f=[],d=[],p=[],m={},h=30,g=u.getElementsByTagName("head")[0]||c,v=u.getElementsByTagName("base")[0],y=g.getElementsByTagName("link"),x=function(){var e,t=u.createElement("div"),n=u.body,r=c.style.fontSize,i=n&&n.style.fontSize,o=!1;return t.style.cssText="position:absolute;font-size:1em;width:1em",n||(n=o=u.createElement("body"),n.style.background="none"),c.style.fontSize="100%",n.style.fontSize="100%",n.appendChild(t),o&&c.insertBefore(n,c.firstChild),e=t.offsetWidth,o?c.removeChild(n):n.removeChild(t),c.style.fontSize=r,i&&(n.style.fontSize=i),e=l=parseFloat(e)},E=function(t){var n="clientWidth",r=c[n],i="CSS1Compat"===u.compatMode&&r||u.body[n]||r,o={},m=y[y.length-1],v=(new Date).getTime();if(t&&a&&h>v-a)return e.clearTimeout(s),void(s=e.setTimeout(E,h));a=v;for(var S in f)if(f.hasOwnProperty(S)){var b=f[S],w=b.minw,C=b.maxw,T=null===w,N=null===C,_="em";w&&(w=parseFloat(w)*(w.indexOf(_)>-1?l||x():1)),C&&(C=parseFloat(C)*(C.indexOf(_)>-1?l||x():1)),b.hasquery&&(T&&N||!(T||i>=w)||!(N||C>=i))||(o[b.media]||(o[b.media]=[]),o[b.media].push(d[b.rules]))}for(var z in p)p.hasOwnProperty(z)&&p[z]&&p[z].parentNode===g&&g.removeChild(p[z]);p.length=0;for(var k in o)if(o.hasOwnProperty(k)){var $=u.createElement("style"),j=o[k].join("\n");$.type="text/css",$.media=k,g.insertBefore($,m.nextSibling),$.styleSheet?$.styleSheet.cssText=j:$.appendChild(u.createTextNode(j)),p.push($)}},S=function(e,t,r){var i=e.replace(n.regex.keyframes,"").match(n.regex.media),o=i&&i.length||0;t=t.substring(0,t.lastIndexOf("/"));var a=function(e){return e.replace(n.regex.urls,"$1"+t+"$2$3")},s=!o&&r;t.length&&(t+="/"),s&&(o=1);for(var l=0;o>l;l++){var u,c,p,m;s?(u=r,d.push(a(e))):(u=i[l].match(n.regex.findStyles)&&RegExp.$1,d.push(RegExp.$2&&a(RegExp.$2))),p=u.split(","),m=p.length;for(var h=0;m>h;h++)c=p[h],f.push({media:c.split("(")[0].match(n.regex.only)&&RegExp.$2||"all",rules:d.length-1,hasquery:c.indexOf("(")>-1,minw:c.match(n.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:c.match(n.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}E()},b=function(){if(r.length){var t=r.shift();o(t.href,function(n){S(n,t.href,t.media),m[t.href]=!0,e.setTimeout(function(){b()},0)})}},w=function(){for(var t=0;tu;u++)if(h=e[u],g=N.style[h],l(h,"-")&&(h=m(h)),N.style[h]!==n){if(i||r(o,"undefined"))return a(),"pfx"==t?h:!0;try{N.style[h]=o}catch(y){}if(N.style[h]!=g)return a(),"pfx"==t?h:!0}return a(),!1}function g(e,t,n){var o;for(var i in e)if(e[i]in t)return n===!1?e[i]:(o=t[e[i]],r(o,"function")?s(o,n||t):o);return!1}function v(e,t,n,o,i){var a=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+z.join(a+" ")+a).split(" ");return r(t,"string")||r(t,"undefined")?h(s,t,o,i):(s=(e+" "+F.join(a+" ")+a).split(" "),g(s,t,n))}function y(e,t,r){return v(e,n,n,t,r)}var E=[],S={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){E.push({name:e,fn:t,options:n})},addAsyncTest:function(e){E.push({name:null,fn:e})}},b=function(){};b.prototype=S,b=new b;var w,C=[],x=t.documentElement,T="svg"===x.nodeName.toLowerCase();!function(){var e={}.hasOwnProperty;w=r(e,"undefined")||r(e.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),S._l={},S.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),b.hasOwnProperty(e)&&setTimeout(function(){b._trigger(e,b[e])},0)},S._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout(function(){var e,r;for(e=0;e",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=x.elements;return"string"==typeof e?e.split(" "):e}function o(e,t){var n=x.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),x.elements=n+" "+e,c(t)}function i(e){var t=C[e[b]];return t||(t={},w++,e[b]=w,C[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():S.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!o.canHaveChildren||E.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;l>a;a++)o.createElement(s[a]);return o}function l(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return x.shivMethods?a(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(x,t.frag)}function c(e){e||(e=t);var r=i(e);return!x.shivCSS||h||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),g||l(e,r),e}function f(e){for(var t,n=e.getElementsByTagName("*"),o=n.length,i=RegExp("^(?:"+r().join("|")+")$","i"),a=[];o--;)t=n[o],i.test(t.nodeName)&&a.push(t.applyElement(u(t)));return a}function u(e){for(var t,n=e.attributes,r=n.length,o=e.ownerDocument.createElement(_+":"+e.nodeName);r--;)t=n[r],t.specified&&o.setAttribute(t.nodeName,t.nodeValue);return o.style.cssText=e.style.cssText,o}function d(e){for(var t,n=e.split("{"),o=n.length,i=RegExp("(^|[\\s,>+~])("+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=[],u=l.length,p=Array(u);u--;)p[u]=l[u];for(;s=p.pop();)if(!s.disabled&&T.test(s.media)){try{i=s.imports,a=i.length}catch(m){a=0}for(u=0;a>u;u++)p.push(i[u]);try{c.push(s.cssText)}catch(m){}}c=d(c.reverse().join("")),o=f(e),r=n(e,c)}),l.attachEvent("onafterprint",function(){p(o),clearTimeout(a._removeSheetTimer),a._removeSheetTimer=setTimeout(t,500)}),e.printShived=!0,e)}var h,g,v="3.7.3",y=e.html5||{},E=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,S=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,b="_html5shiv",w=0,C={};!function(){try{var e=t.createElement("a");e.innerHTML="",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 x={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=x,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)}();x.type+=" print",x.shivPrint=m,m(t),"object"==typeof module&&module.exports&&(module.exports=x)}("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});var j=(S.testProp=function(e,t,r){return h([e],n,t,r)},S.testStyles=u),P=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=533>t&&e.match(/android/gi);return n||o||r}();P?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 k="Moz O ms Webkit",z=S._config.usePrefixes?k.split(" "):[];S._cssomPrefixes=z;var F=S._config.usePrefixes?k.toLowerCase().split(" "):[];S._domPrefixes=F,S.testAllProps=v,S.testAllProps=y;var $="CSS"in e&&"supports"in e.CSS,A="supportsCSS"in e;b.addTest("supports",$||A),b.addTest("csstransforms3d",function(){var e=!!y("perspective","1px",!0),t=b._config.usePrefixes;if(e&&(!t||"webkitPerspective"in x.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("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(C),delete S.addTest,delete S.addAsyncTest;for(var q=0;qli:before{content:"\e602";display:block;float:left;font-family:Icon;font-size:16px;width:1.2em;margin-left:-1.2em;vertical-align:-.1em}.article p>code{white-space:nowrap}.article hr{margin-top:1.5em}.article img{max-width:100%}.article pre{padding:16px;margin:1.5em -16px 0;line-height:1.5em;overflow:auto;-webkit-overflow-scrolling:touch}.article table{margin:3em 0 1.5em;font-size:13px}.no-js .article table{display:inline-block;max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch}.article table th{min-width:100px;font-size:12px;text-align:left}.article table td,.article table th{padding:12px 16px;vertical-align:top}.article .data{margin:1.5em -16px;padding:1.5em 0;overflow:auto;-webkit-overflow-scrolling:touch;text-align:center}.article .data table{display:inline-block;margin:0 16px;text-align:left}.footer{position:absolute;bottom:0;left:0;right:0;padding:0 4px}.copyright{margin:1.5em 0}.pagination{max-width:1184px;height:92px;padding:4px 0;margin-left:auto;margin-right:auto;overflow:hidden}.pagination a{display:block;height:100%}.pagination .next,.pagination .previous{position:relative;float:left;height:100%}.pagination .previous{width:25%}.pagination .previous .direction,.pagination .previous .stretch{display:none}.pagination .next{width:75%;text-align:right}.pagination .page{display:table;position:absolute;bottom:4px}.pagination .direction{display:block;position:absolute;bottom:40px;width:100%;font-size:15px;line-height:20px;padding:0 52px}.pagination .stretch{padding:0 4px}.pagination .stretch .title{font-size:18px;padding:11px 0 13px}.admonition{margin:20px -16px 0;padding:20px 16px}.admonition>:first-child{margin-top:0}.admonition .admonition-title{font-size:20px}.admonition .admonition-title:before{content:"\e611";display:block;float:left;font-family:Icon;font-size:24px;vertical-align:-.1em;margin-right:5px}.admonition.warning .admonition-title:before{content:"\e610"}.article h3{font-weight:700}.article h4{font-weight:400;font-style:italic}.article h2 a,.article h3 a,.article h4 a,.article h5 a,.article h6 a{font-weight:400;font-style:normal}.bar{-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition:opacity .2s cubic-bezier(.75,0,.25,1),-webkit-transform .4s cubic-bezier(.75,0,.25,1);transition:opacity .2s cubic-bezier(.75,0,.25,1),-webkit-transform .4s cubic-bezier(.75,0,.25,1);transition:opacity .2s cubic-bezier(.75,0,.25,1),transform .4s cubic-bezier(.75,0,.25,1);transition:opacity .2s cubic-bezier(.75,0,.25,1),transform .4s cubic-bezier(.75,0,.25,1),-webkit-transform .4s cubic-bezier(.75,0,.25,1)}#toggle-search:checked~.header .bar,.toggle-search .bar{-webkit-transform:translate3d(0,-56px,0);transform:translate3d(0,-56px,0)}.bar.search .button-reset{-webkit-transform:scale(.5);transform:scale(.5);-webkit-transition:opacity .4s cubic-bezier(.1,.7,.1,1),-webkit-transform .4s cubic-bezier(.1,.7,.1,1);transition:opacity .4s cubic-bezier(.1,.7,.1,1),-webkit-transform .4s cubic-bezier(.1,.7,.1,1);transition:opacity .4s cubic-bezier(.1,.7,.1,1),transform .4s cubic-bezier(.1,.7,.1,1);transition:opacity .4s cubic-bezier(.1,.7,.1,1),transform .4s cubic-bezier(.1,.7,.1,1),-webkit-transform .4s cubic-bezier(.1,.7,.1,1);opacity:0}.bar.search.non-empty .button-reset{-webkit-transform:scale(1);transform:scale(1);opacity:1}.results{-webkit-transition:opacity .3s .1s,width 0s .4s,height 0s .4s;transition:opacity .3s .1s,width 0s .4s,height 0s .4s}#toggle-search:checked~.main .results,.toggle-search .results{-webkit-transition:opacity .4s,width 0s,height 0s;transition:opacity .4s,width 0s,height 0s}.results .list a{-webkit-transition:background .25s;transition:background .25s}.no-csstransforms3d .bar.default{display:table}.no-csstransforms3d .bar.search{display:none;margin-top:0}.no-csstransforms3d #toggle-search:checked~.header .bar.default,.no-csstransforms3d .toggle-search .bar.default{display:none}.no-csstransforms3d #toggle-search:checked~.header .bar.search,.no-csstransforms3d .toggle-search .bar.search{display:table}.bar.search{opacity:0}.bar.search .query{background:transparent;color:rgba(0,0,0,.87)}.bar.search .query::-webkit-input-placeholder{color:rgba(0,0,0,.26)}.bar.search .query:-moz-placeholder,.bar.search .query::-moz-placeholder{color:rgba(0,0,0,.26)}.bar.search .query:-ms-input-placeholder{color:rgba(0,0,0,.26)}.bar.search .button .icon:active{background:rgba(0,0,0,.12)}.results{box-shadow:0 4px 7px rgba(0,0,0,.23),0 8px 25px rgba(0,0,0,.05);background:#fff;color:rgba(0,0,0,.87);opacity:0}#toggle-search:checked~.main .results,.toggle-search .results{opacity:1}.results .meta{background:#e84e40;color:#fff}.results .list a{border-bottom:1px solid rgba(0,0,0,.12)}.results .list a:last-child{border-bottom:none}.results .list a:active{background:rgba(0,0,0,.12)}.result span{color:rgba(0,0,0,.54)}#toggle-search:checked~.header,.toggle-search .header{background:#fff;color:rgba(0,0,0,.54)}#toggle-search:checked~.header:before,.toggle-search .header:before{background:rgba(0,0,0,.54)}#toggle-search:checked~.header .bar.default,.toggle-search .header .bar.default{opacity:0}#toggle-search:checked~.header .bar.search,.toggle-search .header .bar.search{opacity:1}.bar.search{margin-top:8px}.bar.search .query{font-size:18px;padding:13px 0;margin:0;width:100%;height:48px}.bar.search .query::-ms-clear{display:none}.results{position:fixed;top:0;left:0;width:0;height:100%;z-index:1;overflow-y:scroll;-webkit-overflow-scrolling:touch}.results .scrollable{top:56px}#toggle-search:checked~.main .results,.toggle-search .results{width:100%;overflow-y:visible}.results .meta{font-weight:700}.results .meta strong{display:block;font-size:11px;max-width:1200px;margin-left:auto;margin-right:auto;padding:16px}.results .list a{display:block}.result{max-width:1200px;margin-left:auto;margin-right:auto;padding:12px 16px 16px}.result h1{line-height:24px}.result h1,.result span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.result span{font-size:12px}.no-csstransforms3d .results{display:none}.no-csstransforms3d #toggle-search:checked~.main .results,.no-csstransforms3d .toggle-search .results{display:block;overflow:auto}.meta{text-transform:uppercase;font-weight:700}@media only screen and (min-width:960px){.backdrop{background:#f2f2f2}.backdrop-paper:after{box-shadow:0 1.5px 3px rgba(0,0,0,.24),0 3px 8px rgba(0,0,0,.05)}.button-menu{display:none}.drawer{float:left;height:auto;margin-bottom:96px;padding-top:80px}.drawer,.drawer .scrollable{position:static}.article{margin-left:262px}.footer{z-index:4}.copyright{margin-bottom:64px}.results{height:auto;top:64px}.results .scrollable{position:static;max-height:413px}}@media only screen and (max-width:959px){#toggle-drawer:checked~.overlay,.toggle-drawer .overlay{width:100%;height:100%}.drawer{-webkit-transform:translate3d(-262px,0,0);transform:translate3d(-262px,0,0);-webkit-transition:-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1),-webkit-transform .25s cubic-bezier(.4,0,.2,1)}.no-csstransforms3d .drawer{display:none}.drawer{background:#fff}.project{box-shadow:0 1.5px 3px rgba(0,0,0,.24),0 3px 8px rgba(0,0,0,.05);background:#e84e40;color:#fff}.drawer{position:fixed;z-index:4}#toggle-search:checked~.main .results,.drawer,.toggle-search .results{height:100%}}@media only screen and (min-width:720px){.header{height:64px;padding:8px}.header .stretch{padding:0 16px}.header .stretch .title{font-size:20px;padding:12px 0}.project .name{margin:26px 0 0 5px}.article .wrapper{padding:128px 24px 96px}.article .data{margin:1.5em -24px}.article .data table{margin:0 24px}.article h2{padding-top:100px;margin-top:-64px}.ios.standalone .article h2{padding-top:28px;margin-top:8px}.article h3,.article h4{padding-top:84px;margin-top:-64px}.ios.standalone .article h3,.ios.standalone .article h4{padding-top:20px;margin-top:0}.article pre{padding:1.5em 24px;margin:1.5em -24px 0}.footer{padding:0 8px}.pagination{height:96px;padding:8px 0}.pagination .direction{padding:0 56px;bottom:40px}.pagination .stretch{padding:0 8px}.admonition{margin:20px -24px 0;padding:20px 24px}.bar.search .query{font-size:20px;padding:12px 0}.results .scrollable{top:64px}.results .meta strong{padding:16px 24px}.result{padding:16px 24px 20px}}@media only screen and (min-width:1200px){.header{width:100%}.drawer .scrollable .wrapper hr{width:48px}}@media only screen and (orientation:portrait){.ios.standalone .header{height:76px;padding-top:24px}.ios.standalone .header:before{content:" ";position:absolute;top:0;left:0;z-index:3;width:100%;height:20px}.ios.standalone .drawer .scrollable{top:124px}.ios.standalone .project{padding-top:20px}.ios.standalone .project:before{content:" ";position:absolute;top:0;left:0;z-index:3;width:100%;height:20px}.ios.standalone .article{position:absolute;top:76px;right:0;bottom:0;left:0}.ios.standalone .results .scrollable{top:76px}}@media only screen and (orientation:portrait) and (min-width:720px){.ios.standalone .header{height:84px;padding-top:28px}.ios.standalone .results .scrollable{top:84px}}@media only screen and (max-width:719px){.bar .path{display:none}}@media only screen and (max-width:479px){.button-github,.button-twitter{display:none}}@media only screen and (min-width:720px) and (max-width:959px){.header .stretch{padding:0 24px}}@media only screen and (min-width:480px){.pagination .next,.pagination .previous{width:50%}.pagination .previous .direction{display:block}.pagination .previous .stretch{display:table}}@media print{.drawer,.footer,.header,.headerlink{display:none}.article .wrapper{padding-top:0}.article pre,.article pre *{color:rgba(0,0,0,.87)!important}.article pre{border:1px solid rgba(0,0,0,.12)}.article table{border-radius:none;box-shadow:none}.article table th{color:#e84e40}} \ No newline at end of file diff --git a/material/assets/stylesheets/application-fe75383308.css b/material/assets/stylesheets/application-fe75383308.css new file mode 100644 index 000000000..2077cd44f --- /dev/null +++ b/material/assets/stylesheets/application-fe75383308.css @@ -0,0 +1 @@ +.md-icon{font-family:Icon;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.md-icon--search:before{content:"\e600"}.md-icon--back:before{content:"\e601"}.md-icon--link:before{content:"\e602"}.md-icon--close:before{content:"\e603"}.md-icon--menu:before{content:"\e604"}.md-icon--forward:before{content:"\e605"}.md-icon--twitter:before{content:"\e606"}.md-icon--github:before{content:"\e607"}.md-icon--download:before{content:"\e608"}.md-icon--star:before{content:"\e609"}.md-icon--warning:before{content:"\e610"}.md-icon--note:before{content:"\e611"}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{font-size:62.5%;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none}a,abbr,acronym,address,article,aside,audio,b,big,blockquote,body,canvas,caption,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,main,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0}table{border-collapse:collapse;border-spacing:0}td,th{text-align:left;font-weight:400;vertical-align:top}button{padding:0;background:transparent;font-size:inherit}button,input{outline:0;border:0}input{-webkit-appearance:none;-moz-appearance:none;appearance:none}a{text-decoration:none;color:inherit}a,button,input,label{-webkit-tap-highlight-color:rgba(255,255,255,0);-webkit-tap-highlight-color:transparent}body,kbd{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,.no-fontface kbd{font-family:Helvetica Neue,Helvetica,Arial,sans-serif}code,pre{font-family:Roboto Mono,Courier New,Courier,monospace}.no-fontface code,.no-fontface pre{font-family:Courier New,Courier,monospace}.md-content--typeset{font-size:1.6rem;line-height:1.6}.md-content--typeset p{margin:2rem 0}.md-content--typeset h1{font-size:3.125rem;font-weight:300;line-height:1.3;letter-spacing:-.01em;color:rgba(0,0,0,.54)}.md-content--typeset h1:before{content:" ";display:block;padding-top:11rem;margin-top:-11rem}.md-content--typeset h2{font-size:2.5rem;font-weight:300;line-height:1.4;margin-top:4rem;letter-spacing:-.01em}.md-content--typeset h2:before{content:" ";display:block;padding-top:8.2rem;margin-top:-8.2rem}.md-content--typeset h3{font-size:2rem;font-weight:400;line-height:1.5;margin-top:3.2rem;letter-spacing:-.01em}.md-content--typeset h3:before{content:" ";display:block;padding-top:8.4rem;margin-top:-8.4rem}.md-content--typeset h2+h3{margin-top:1.6rem}.md-content--typeset h4{font-size:1.6rem;font-weight:700;margin-top:1.6rem;letter-spacing:-.01em}.md-content--typeset h4:before{position:relative;z-index:-4;content:" ";display:block;padding-top:8.8rem;margin-top:-8.8rem}.md-content--typeset h5,.md-content--typeset h6{font-size:1.28rem;font-weight:700;margin-top:1.6rem;letter-spacing:-.01em;color:rgba(0,0,0,.54)}.md-content--typeset h5:before,.md-content--typeset h6:before{position:relative;z-index:-5;content:" ";display:block;padding-top:9rem;margin-top:-9rem}.md-content--typeset h5{text-transform:uppercase}.md-content--typeset a{color:#3f51b5;-webkit-transition:color .125s;transition:color .125s}.md-content--typeset a:active,.md-content--typeset a:hover{color:#536dfe}.md-content--typeset code{font-size:85%;font-weight:400;word-break:break-word;padding:.1rem .4rem;background:#f7f7f7;color:#37474f}.md-content--typeset pre{font-size:85%;line-height:1.4;padding:1rem 1.2rem;overflow-x:scroll;background:#f7f7f7;color:#37474f}.md-content--typeset kbd{display:inline-block;font-size:85%;line-height:1rem;word-break:break-word;padding:.4rem .5rem .5rem;vertical-align:.1rem;color:#555;background-color:#fcfcfc;border:.1rem solid #ccc;border-bottom-color:#bbb;border-radius:.3rem;box-shadow:inset 0 -.1rem 0 #bbb}.md-content--typeset small{color:rgba(0,0,0,.54)}.md-content--typeset hr{margin:2.4rem 0;border-bottom:.1rem dotted rgba(0,0,0,.26)}.md-content--typeset blockquote{padding-left:1.2rem;border-left:.4rem solid rgba(0,0,0,.26);color:rgba(0,0,0,.54)}.md-content--typeset ul{list-style-type:disc}.md-content--typeset ol ol{list-style-type:lower-alpha}.md-content--typeset ol ol ol{list-style-type:lower-roman}.md-content--typeset ol,.md-content--typeset ul{margin-left:1rem}.md-content--typeset ol li,.md-content--typeset ul li{margin-bottom:1rem;margin-left:2rem}.md-content--typeset ol li:last-child,.md-content--typeset ul li:last-child{margin-bottom:0}.md-content--typeset ol li ol,.md-content--typeset ol li ul,.md-content--typeset ul li ol,.md-content--typeset ul li ul{padding-top:1rem;margin-bottom:1rem;margin-left:1rem}html{height:100%}body{position:relative;min-height:100%}hr{display:block;height:1px;padding:0;border:0}.md-grid{max-width:120rem;margin-left:auto;margin-right: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!important}.md-overlay{position:fixed;top:0;width:0;height:0;z-index:2;opacity:0;background:rgba(0,0,0,.54);-webkit-transition:opacity .25s,width 0s .25s,height 0s .25s;transition:opacity .25s,width 0s .25s,height 0s .25s}.md-flex{display:table}.md-flex__cell{display:table-cell;vertical-align:top}.md-flex__cell--shrink{width:1%}.md-flex__cell--stretch{display:table;table-layout:fixed;width:100%}.md-flex__ellipsis{display:table-cell;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.md-content__inner{margin:2.4rem 1.6rem}.md-content__copyright{display:block}.md-header{box-shadow:0 1.5px 3px rgba(0,0,0,.24),0 3px 8px rgba(0,0,0,.05);position:fixed;top:0;left:0;right:0;height:5.6rem;z-index:1;background:#3f51b5;color:#fff}.md-header-nav{padding:.4rem}.md-header-nav__icon{display:inline-block;font-size:2.4rem;padding:.8rem;margin:.4rem;cursor:pointer;border-radius:100%;-webkit-transition:background .25s;transition:background .25s}.md-header-nav__icon:active{background:hsla(0,0%,100%,.12)}.md-header-nav__title{padding:0 2rem;font-size:1.8rem;line-height:4.8rem}.md-footer{position:absolute;width:100%;bottom:0}.md-footer-pagination{background:rgba(0,0,0,.87);color:#fff}.md-footer-nav{overflow:auto;padding:.4rem}.md-footer-nav__link{padding-top:2.8rem;padding-bottom:.8rem}.md-footer-nav__link--prev{float:left;width:25%}.md-footer-nav__link--next{float:right;width:75%;text-align:right}.md-footer-nav__icon{display:inline-block;font-size:2.4rem;padding:.8rem;margin:.4rem;cursor:pointer;border-radius:100%;-webkit-transition:background .25s;transition:background .25s}.md-footer-nav__icon:active{background:hsla(0,0%,100%,.12)}.md-footer-nav__title{position:relative;padding:0 .4rem;font-size:1.8rem;line-height:4.8rem}.md-footer-nav__direction{position:absolute;left:0;right:0;padding:0 .4rem;margin-top:-2rem;font-size:1.5rem;color:hsla(0,0%,100%,.7)}.md-nav,.md-nav h3{font-size:1.28rem;line-height:1.2}.md-nav--toc{border-left:.4rem solid #3f51b5}.md-nav__list{list-style:none}.md-nav__list .md-nav__list{margin-left:1.2rem}.md-nav__toggle~.md-nav__list{max-height:0;overflow:hidden}.md-nav__toggle:checked~.md-nav__list{max-height:100%}.md-nav__item{margin:.8rem 0 0;line-height:1.6rem}.md-nav__link{display:block;overflow:hidden;text-overflow:ellipsis;-webkit-transition:color .125s;transition:color .125s}.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-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;-webkit-overflow-scrolling:touch}.js .md-sidebar__scrollwrap{position:absolute;top:0;left:0;bottom:0;right:0}.md-sidebar__scrollwrap::-webkit-scrollbar{width:.4rem;height:.4rem}.md-sidebar__scrollwrap::-webkit-scrollbar-thumb{background:rgba(0,0,0,.26)}.md-sidebar__inner{padding:1.2rem}.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{color:#000;background-color:#fdd}.code .gi,.codehilite .gi{color:#000;background-color:#dfd}.code .w,.codehilite .w{color:transparent}.md-content .headerlink{display:inline-block;margin-left:1rem;opacity:0;color:rgba(0,0,0,.26);-webkit-transform:translate3d(0,.5rem,0);transform:translate3d(0,.5rem,0);-webkit-transition:opacity .125s .25s,color .25s,-webkit-transform .25s .25s;transition:opacity .125s .25s,color .25s,-webkit-transform .25s .25s;transition:opacity .125s .25s,transform .25s .25s,color .25s;transition:opacity .125s .25s,transform .25s .25s,color .25s,-webkit-transform .25s .25s}.md-content h1:hover .headerlink,.md-content h2:hover .headerlink,.md-content h3:hover .headerlink,.md-content h4:hover .headerlink,.md-content h5:hover .headerlink,.md-content h6:hover .headerlink{margin-left:1rem;opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}.md-content h1:hover .headerlink:hover,.md-content h2:hover .headerlink:hover,.md-content h3:hover .headerlink:hover,.md-content h4:hover .headerlink:hover,.md-content h5:hover .headerlink:hover,.md-content h6:hover .headerlink:hover{color:#536dfe}@media only screen and (max-width:74.9375em){#md-toggle-drawer:checked~.md-overlay{width:100%;height:100%;opacity:1;-webkit-transition:opacity .25s,width 0s,height 0s;transition:opacity .25s,width 0s,height 0s}.md-sidebar--primary{position:fixed;top:0;width:24.2em;height:100%;z-index:3;background:#fff;-webkit-transition:-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1),-webkit-transform .25s cubic-bezier(.4,0,.2,1);-webkit-transform:translate3d(-24.2em,0,0);transform:translate3d(-24.2em,0,0)}.no-csstransforms3d .md-sidebar--primary{display:none}#md-toggle-drawer:checked~.md-container .md-sidebar--primary{-webkit-transform:translateZ(0);transform:translateZ(0)}.no-csstransforms3d #md-toggle-drawer:checked~.md-container .md-sidebar--primary{display:block}.md-sidebar--primary .md-sidebar__scrollwrap{margin:0}}@media only screen and (min-width:60em){.md-content{margin-right:24.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-sidebar__inner{border-right:.1rem solid rgba(0,0,0,.07)}}@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 (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.css b/material/assets/stylesheets/application.css index a7dfe1b40..2077cd44f 100644 --- a/material/assets/stylesheets/application.css +++ b/material/assets/stylesheets/application.css @@ -1 +1 @@ -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{font-size:62.5%;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,main,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0}ul{list-style:none}table{border-collapse:collapse;border-spacing:0}td{text-align:left;font-weight:400;vertical-align:middle}button{outline:0;padding:0;background:transparent;border:none;font-size:inherit}input{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;-o-appearance:none;appearance:none;outline:none;border:none}a{text-decoration:none;color:inherit}a,button,input,label{-webkit-tap-highlight-color:rgba(255,255,255,0);-webkit-tap-highlight-color:transparent}h1,h2,h3,h4,h5,h6{font-weight:inherit}pre{background:rgba(0,0,0,.05)}pre,pre code{color:rgba(0,0,0,.87)}.c,.c1,.cm,.o{color:rgba(0,0,0,.54)}.k,.kn{color:#a71d5d}.kd,.kt,.n.f{color:#0086b3}.s,.s1{color:#183691}.bp,.mi{color:#9575cd}.icon{font-family:Icon;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-search:before{content:"\e600"}.icon-back:before{content:"\e601"}.icon-link:before{content:"\e602"}.icon-close:before{content:"\e603"}.icon-menu:before{content:"\e604"}.icon-forward:before{content:"\e605"}.icon-twitter:before{content:"\e606"}.icon-github:before{content:"\e607"}.icon-download:before{content:"\e608"}.icon-star:before{content:"\e609"}.icon-warning:before{content:"\e610"}.icon-note:before{content:"\e611"}a{-webkit-transition:color .25s;transition:color .25s}.overlay{-webkit-transition:opacity .25s,width 0s .25s,height 0s .25s;transition:opacity .25s,width 0s .25s,height 0s .25s}#toggle-drawer:checked~.overlay,.toggle-drawer .overlay{-webkit-transition:opacity .25s,width 0s,height 0s;transition:opacity .25s,width 0s,height 0s}.js .header{-webkit-transition:background .6s,color .6s;transition:background .6s,color .6s}.js .header:before{-webkit-transition:background .6s;transition:background .6s}.button .icon{-webkit-transition:background .25s;transition:background .25s}body{color:rgba(0,0,0,.87)}@supports (-webkit-appearance:none){body{background:#e84e40}}.ios body{background:#fff}hr{border:0;border-top:1px solid rgba(0,0,0,.12)}.toggle-button{cursor:pointer;color:inherit}.backdrop,.backdrop-paper:after{background:#fff}.overlay{background:rgba(0,0,0,.54);opacity:0}#toggle-drawer:checked~.overlay,.toggle-drawer .overlay{opacity:1}.header{box-shadow:0 1.5px 3px rgba(0,0,0,.24),0 3px 8px rgba(0,0,0,.05);background:#e84e40;color:#fff}.ios.standalone .header:before{background:rgba(0,0,0,.12)}.bar .path{color:hsla(0,0%,100%,.7)}.button .icon{border-radius:100%}.button .icon:active{background:hsla(0,0%,100%,.12)}html{height:100%}body{position:relative;min-height:100%}hr{display:block;height:1px;padding:0;margin:0}.locked{height:100%;overflow:hidden}.scrollable{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto;-webkit-overflow-scrolling:touch}.scrollable .wrapper{height:100%}.ios .scrollable .wrapper{margin-bottom:2px}.toggle{display:none}.toggle-button{display:block}.backdrop{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.backdrop-paper{max-width:1200px;height:100%;margin-left:auto;margin-right:auto}.backdrop-paper:after{content:" ";display:block;height:100%;margin-left:262px}.overlay{width:0;height:0;z-index:3}.header,.overlay{position:fixed;top:0}.header{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;left:0;z-index:2;height:56px;padding:4px;overflow:hidden}.ios.standalone .header{position:absolute}.bar{display:table;max-width:1184px;margin-left:auto;margin-right:auto}.bar a{display:block}.no-js .bar .button-search{display:none}.bar .path .icon:before{vertical-align:-1.5px}.button{display:table-cell;vertical-align:top;width:1%}.button button{margin:0;padding:0}.button button:active:before{position:relative;top:0;left:0}.button .icon{display:inline-block;font-size:24px;padding:8px;margin:4px}.stretch{display:table;table-layout:fixed;width:100%}.header .stretch{padding:0 20px}.stretch .title{display:table-cell;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.header .stretch .title{font-size:18px;padding:13px 0}.main{max-width:1200px;margin-left:auto;margin-right:auto}body,input{font-weight:400;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.no-fontface body,.no-fontface input,body,input{font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.no-fontface code,.no-fontface pre,code,pre{font-family:Courier New,Courier,monospace}#toggle-drawer:checked~.main .drawer,.toggle-drawer .drawer{-webkit-transform:translateZ(0);transform:translateZ(0)}.no-csstransforms3d #toggle-drawer:checked~.main .drawer,.no-csstransforms3d .toggle-drawer .drawer{display:block}.project{-webkit-transition:none;transition:none}.project .logo img{-webkit-transition:box-shadow .4s;transition:box-shadow .4s}.repo a{-webkit-transition:box-shadow .4s,opacity .4s;transition:box-shadow .4s,opacity .4s}.drawer .toc a.current,.drawer .toc a:focus,.drawer .toc a:hover{color:#e84e40}.drawer .anchor a{border-left:2px solid #e84e40}.drawer .section{color:rgba(0,0,0,.54)}.ios.standalone .project:before{background:rgba(0,0,0,.12)}.project .logo img{background:#fff;border-radius:100%}.project:focus .logo img,.project:hover .logo img{box-shadow:0 4px 7px rgba(0,0,0,.23),0 8px 25px rgba(0,0,0,.05)}.repo a{background:#00bfa5;color:#fff;border-radius:3px}.repo a:focus,.repo a:hover{box-shadow:0 4px 7px rgba(0,0,0,.23),0 8px 25px rgba(0,0,0,.05);opacity:.8}.repo a .count{background:rgba(0,0,0,.26);color:#fff;border-radius:0 3px 3px 0}.repo a .count:before{border-width:15px 5px 15px 0;border-color:transparent rgba(0,0,0,.26);border-style:solid}.drawer{width:262px;font-size:13px;line-height:1em}.ios .drawer{overflow:scroll;-webkit-overflow-scrolling:touch}.drawer .toc li a{display:block;padding:14.5px 24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .toc li.anchor a{margin-left:12px;padding:10px 24px 10px 12px}.drawer .toc li ul{margin-left:12px}.drawer .current+ul{margin-bottom:9px}.drawer .section{display:block;padding:14.5px 24px}.drawer .scrollable{top:104px;z-index:-1}.drawer .scrollable .wrapper{height:auto;min-height:100%}.drawer .scrollable .wrapper hr{margin:12px 0;margin-right:auto}.drawer .scrollable .wrapper .toc{margin:12px 0}.project{display:block}.project .banner{display:table;width:100%;height:104px;padding:20px}.project .logo{display:table-cell;width:64px;padding-right:12px}.project .logo img{display:block;width:64px;height:64px}.project .name{display:table-cell;padding-left:4px;font-size:14px;line-height:1.25em;vertical-align:middle}.project .logo+.name{font-size:12px}.repo{margin:24px 0;text-align:center}.repo li{display:inline-block;padding-right:12px;white-space:nowrap}.repo li:last-child{padding-right:0}.repo a{display:inline-block;padding:0 10px 0 6px;font-size:12px;line-height:30px;height:30px}.repo a .icon{font-size:18px;vertical-align:-3px}.repo a .count{display:inline-block;position:relative;padding:0 8px 0 4px;margin:0 -10px 0 8px;font-size:12px}.repo a .count:before{content:" ";display:block;position:absolute;top:0;left:-5px}.no-js .repo a .count{display:none}.drawer .toc li a{font-weight:700}.drawer .toc li.anchor a{font-weight:400}.drawer .section,.repo a{font-weight:700}.repo a{text-transform:uppercase}.repo a .count{text-transform:none;font-weight:700}pre span{-webkit-transition:color .25s;transition:color .25s}.copyright a{-webkit-transition:color .25s;transition:color .25s}.ios.standalone .article{background:-webkit-linear-gradient(top,#fff 50%,#e84e40 0);background:linear-gradient(180deg,#fff 50%,#e84e40 0)}.ios.standalone .article .wrapper{background:-webkit-linear-gradient(top,#fff 50%,#fff 0);background:linear-gradient(180deg,#fff 50%,#fff 0)}.article a,.article code,.article h1,.article h2{color:#e84e40}.article h1{border-bottom:1px solid rgba(0,0,0,.12)}.article a{border-bottom:1px dotted}.article a:focus,.article a:hover{color:#00bfa5}.article .headerlink{color:rgba(0,0,0,.26);border:none}.article table{box-shadow:0 1.5px 3px rgba(0,0,0,.24),0 3px 8px rgba(0,0,0,.05);border-radius:3px}.article table th{background:#ee7a70;color:#fff}.article table th:first-child{border-top-left-radius:3px}.article table th:last-child{border-top-right-radius:3px}.article table td{border-top:1px solid rgba(0,0,0,.05)}.footer{background:#e84e40;color:#fff}.footer a{border:none}.copyright{color:rgba(0,0,0,.54)}.pagination a .button,.pagination a .title{color:#fff}.pagination .direction{color:hsla(0,0%,100%,.7)}.admonition{background:#29b6f6;color:#fff}.admonition pre{background:hsla(0,0%,100%,.3)}.admonition.warning{background:#e84e40}.admonition a,.admonition a:hover{color:#fff}.article{font-size:14px;line-height:1.7em}.article:after{content:" ";display:block;clear:both}.article .wrapper{padding:116px 16px 92px}.ios.standalone .article{position:absolute;top:56px;right:0;bottom:0;left:0;overflow:auto;-webkit-overflow-scrolling:touch}.ios.standalone .article .wrapper{position:relative;min-height:100%;padding-top:60px;margin-bottom:2px}.article h1{font-size:24px;line-height:1.333334em;padding:20px 0 42px}.article h2{font-size:20px;line-height:1.4em;padding-top:92px;margin-top:-56px}.ios.standalone .article h2{padding-top:36px;margin:0}.article h3,.article h4{font-size:14px;padding-top:76px;margin-top:-56px}.ios.standalone .article h3,.ios.standalone .article h4{padding-top:20px;margin-top:0}.article .headerlink{float:right;margin-left:20px;font-size:14px}h1 .article .headerlink{display:none}.article ol,.article p,.article ul{margin-top:1.5em}.article li,.article li ol,.article li ul{margin-top:.75em}.article li{margin-left:18px}.article li p{display:inline}.article ul>li:before{content:"\e602";display:block;float:left;font-family:Icon;font-size:16px;width:1.2em;margin-left:-1.2em;vertical-align:-.1em}.article p>code{white-space:nowrap}.article hr{margin-top:1.5em}.article img{max-width:100%}.article pre{padding:16px;margin:1.5em -16px 0;line-height:1.5em;overflow:auto;-webkit-overflow-scrolling:touch}.article table{margin:3em 0 1.5em;font-size:13px}.no-js .article table{display:inline-block;max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch}.article table th{min-width:100px;font-size:12px;text-align:left}.article table td,.article table th{padding:12px 16px;vertical-align:top}.article .data{margin:1.5em -16px;padding:1.5em 0;overflow:auto;-webkit-overflow-scrolling:touch;text-align:center}.article .data table{display:inline-block;margin:0 16px;text-align:left}.footer{position:absolute;bottom:0;left:0;right:0;padding:0 4px}.copyright{margin:1.5em 0}.pagination{max-width:1184px;height:92px;padding:4px 0;margin-left:auto;margin-right:auto;overflow:hidden}.pagination a{display:block;height:100%}.pagination .next,.pagination .previous{position:relative;float:left;height:100%}.pagination .previous{width:25%}.pagination .previous .direction,.pagination .previous .stretch{display:none}.pagination .next{width:75%;text-align:right}.pagination .page{display:table;position:absolute;bottom:4px}.pagination .direction{display:block;position:absolute;bottom:40px;width:100%;font-size:15px;line-height:20px;padding:0 52px}.pagination .stretch{padding:0 4px}.pagination .stretch .title{font-size:18px;padding:11px 0 13px}.admonition{margin:20px -16px 0;padding:20px 16px}.admonition>:first-child{margin-top:0}.admonition .admonition-title{font-size:20px}.admonition .admonition-title:before{content:"\e611";display:block;float:left;font-family:Icon;font-size:24px;vertical-align:-.1em;margin-right:5px}.admonition.warning .admonition-title:before{content:"\e610"}.article h3{font-weight:700}.article h4{font-weight:400;font-style:italic}.article h2 a,.article h3 a,.article h4 a,.article h5 a,.article h6 a{font-weight:400;font-style:normal}.bar{-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition:opacity .2s cubic-bezier(.75,0,.25,1),-webkit-transform .4s cubic-bezier(.75,0,.25,1);transition:opacity .2s cubic-bezier(.75,0,.25,1),-webkit-transform .4s cubic-bezier(.75,0,.25,1);transition:opacity .2s cubic-bezier(.75,0,.25,1),transform .4s cubic-bezier(.75,0,.25,1);transition:opacity .2s cubic-bezier(.75,0,.25,1),transform .4s cubic-bezier(.75,0,.25,1),-webkit-transform .4s cubic-bezier(.75,0,.25,1)}#toggle-search:checked~.header .bar,.toggle-search .bar{-webkit-transform:translate3d(0,-56px,0);transform:translate3d(0,-56px,0)}.bar.search .button-reset{-webkit-transform:scale(.5);transform:scale(.5);-webkit-transition:opacity .4s cubic-bezier(.1,.7,.1,1),-webkit-transform .4s cubic-bezier(.1,.7,.1,1);transition:opacity .4s cubic-bezier(.1,.7,.1,1),-webkit-transform .4s cubic-bezier(.1,.7,.1,1);transition:opacity .4s cubic-bezier(.1,.7,.1,1),transform .4s cubic-bezier(.1,.7,.1,1);transition:opacity .4s cubic-bezier(.1,.7,.1,1),transform .4s cubic-bezier(.1,.7,.1,1),-webkit-transform .4s cubic-bezier(.1,.7,.1,1);opacity:0}.bar.search.non-empty .button-reset{-webkit-transform:scale(1);transform:scale(1);opacity:1}.results{-webkit-transition:opacity .3s .1s,width 0s .4s,height 0s .4s;transition:opacity .3s .1s,width 0s .4s,height 0s .4s}#toggle-search:checked~.main .results,.toggle-search .results{-webkit-transition:opacity .4s,width 0s,height 0s;transition:opacity .4s,width 0s,height 0s}.results .list a{-webkit-transition:background .25s;transition:background .25s}.no-csstransforms3d .bar.default{display:table}.no-csstransforms3d .bar.search{display:none;margin-top:0}.no-csstransforms3d #toggle-search:checked~.header .bar.default,.no-csstransforms3d .toggle-search .bar.default{display:none}.no-csstransforms3d #toggle-search:checked~.header .bar.search,.no-csstransforms3d .toggle-search .bar.search{display:table}.bar.search{opacity:0}.bar.search .query{background:transparent;color:rgba(0,0,0,.87)}.bar.search .query::-webkit-input-placeholder{color:rgba(0,0,0,.26)}.bar.search .query:-moz-placeholder,.bar.search .query::-moz-placeholder{color:rgba(0,0,0,.26)}.bar.search .query:-ms-input-placeholder{color:rgba(0,0,0,.26)}.bar.search .button .icon:active{background:rgba(0,0,0,.12)}.results{box-shadow:0 4px 7px rgba(0,0,0,.23),0 8px 25px rgba(0,0,0,.05);background:#fff;color:rgba(0,0,0,.87);opacity:0}#toggle-search:checked~.main .results,.toggle-search .results{opacity:1}.results .meta{background:#e84e40;color:#fff}.results .list a{border-bottom:1px solid rgba(0,0,0,.12)}.results .list a:last-child{border-bottom:none}.results .list a:active{background:rgba(0,0,0,.12)}.result span{color:rgba(0,0,0,.54)}#toggle-search:checked~.header,.toggle-search .header{background:#fff;color:rgba(0,0,0,.54)}#toggle-search:checked~.header:before,.toggle-search .header:before{background:rgba(0,0,0,.54)}#toggle-search:checked~.header .bar.default,.toggle-search .header .bar.default{opacity:0}#toggle-search:checked~.header .bar.search,.toggle-search .header .bar.search{opacity:1}.bar.search{margin-top:8px}.bar.search .query{font-size:18px;padding:13px 0;margin:0;width:100%;height:48px}.bar.search .query::-ms-clear{display:none}.results{position:fixed;top:0;left:0;width:0;height:100%;z-index:1;overflow-y:scroll;-webkit-overflow-scrolling:touch}.results .scrollable{top:56px}#toggle-search:checked~.main .results,.toggle-search .results{width:100%;overflow-y:visible}.results .meta{font-weight:700}.results .meta strong{display:block;font-size:11px;max-width:1200px;margin-left:auto;margin-right:auto;padding:16px}.results .list a{display:block}.result{max-width:1200px;margin-left:auto;margin-right:auto;padding:12px 16px 16px}.result h1{line-height:24px}.result h1,.result span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.result span{font-size:12px}.no-csstransforms3d .results{display:none}.no-csstransforms3d #toggle-search:checked~.main .results,.no-csstransforms3d .toggle-search .results{display:block;overflow:auto}.meta{text-transform:uppercase;font-weight:700}@media only screen and (min-width:960px){.backdrop{background:#f2f2f2}.backdrop-paper:after{box-shadow:0 1.5px 3px rgba(0,0,0,.24),0 3px 8px rgba(0,0,0,.05)}.button-menu{display:none}.drawer{float:left;height:auto;margin-bottom:96px;padding-top:80px}.drawer,.drawer .scrollable{position:static}.article{margin-left:262px}.footer{z-index:4}.copyright{margin-bottom:64px}.results{height:auto;top:64px}.results .scrollable{position:static;max-height:413px}}@media only screen and (max-width:959px){#toggle-drawer:checked~.overlay,.toggle-drawer .overlay{width:100%;height:100%}.drawer{-webkit-transform:translate3d(-262px,0,0);transform:translate3d(-262px,0,0);-webkit-transition:-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1),-webkit-transform .25s cubic-bezier(.4,0,.2,1)}.no-csstransforms3d .drawer{display:none}.drawer{background:#fff}.project{box-shadow:0 1.5px 3px rgba(0,0,0,.24),0 3px 8px rgba(0,0,0,.05);background:#e84e40;color:#fff}.drawer{position:fixed;z-index:4}#toggle-search:checked~.main .results,.drawer,.toggle-search .results{height:100%}}@media only screen and (min-width:720px){.header{height:64px;padding:8px}.header .stretch{padding:0 16px}.header .stretch .title{font-size:20px;padding:12px 0}.project .name{margin:26px 0 0 5px}.article .wrapper{padding:128px 24px 96px}.article .data{margin:1.5em -24px}.article .data table{margin:0 24px}.article h2{padding-top:100px;margin-top:-64px}.ios.standalone .article h2{padding-top:28px;margin-top:8px}.article h3,.article h4{padding-top:84px;margin-top:-64px}.ios.standalone .article h3,.ios.standalone .article h4{padding-top:20px;margin-top:0}.article pre{padding:1.5em 24px;margin:1.5em -24px 0}.footer{padding:0 8px}.pagination{height:96px;padding:8px 0}.pagination .direction{padding:0 56px;bottom:40px}.pagination .stretch{padding:0 8px}.admonition{margin:20px -24px 0;padding:20px 24px}.bar.search .query{font-size:20px;padding:12px 0}.results .scrollable{top:64px}.results .meta strong{padding:16px 24px}.result{padding:16px 24px 20px}}@media only screen and (min-width:1200px){.header{width:100%}.drawer .scrollable .wrapper hr{width:48px}}@media only screen and (orientation:portrait){.ios.standalone .header{height:76px;padding-top:24px}.ios.standalone .header:before{content:" ";position:absolute;top:0;left:0;z-index:3;width:100%;height:20px}.ios.standalone .drawer .scrollable{top:124px}.ios.standalone .project{padding-top:20px}.ios.standalone .project:before{content:" ";position:absolute;top:0;left:0;z-index:3;width:100%;height:20px}.ios.standalone .article{position:absolute;top:76px;right:0;bottom:0;left:0}.ios.standalone .results .scrollable{top:76px}}@media only screen and (orientation:portrait) and (min-width:720px){.ios.standalone .header{height:84px;padding-top:28px}.ios.standalone .results .scrollable{top:84px}}@media only screen and (max-width:719px){.bar .path{display:none}}@media only screen and (max-width:479px){.button-github,.button-twitter{display:none}}@media only screen and (min-width:720px) and (max-width:959px){.header .stretch{padding:0 24px}}@media only screen and (min-width:480px){.pagination .next,.pagination .previous{width:50%}.pagination .previous .direction{display:block}.pagination .previous .stretch{display:table}}@media print{.drawer,.footer,.header,.headerlink{display:none}.article .wrapper{padding-top:0}.article pre,.article pre *{color:rgba(0,0,0,.87)!important}.article pre{border:1px solid rgba(0,0,0,.12)}.article table{border-radius:none;box-shadow:none}.article table th{color:#e84e40}} \ No newline at end of file +.md-icon{font-family:Icon;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.md-icon--search:before{content:"\e600"}.md-icon--back:before{content:"\e601"}.md-icon--link:before{content:"\e602"}.md-icon--close:before{content:"\e603"}.md-icon--menu:before{content:"\e604"}.md-icon--forward:before{content:"\e605"}.md-icon--twitter:before{content:"\e606"}.md-icon--github:before{content:"\e607"}.md-icon--download:before{content:"\e608"}.md-icon--star:before{content:"\e609"}.md-icon--warning:before{content:"\e610"}.md-icon--note:before{content:"\e611"}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{font-size:62.5%;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none}a,abbr,acronym,address,article,aside,audio,b,big,blockquote,body,canvas,caption,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,main,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0}table{border-collapse:collapse;border-spacing:0}td,th{text-align:left;font-weight:400;vertical-align:top}button{padding:0;background:transparent;font-size:inherit}button,input{outline:0;border:0}input{-webkit-appearance:none;-moz-appearance:none;appearance:none}a{text-decoration:none;color:inherit}a,button,input,label{-webkit-tap-highlight-color:rgba(255,255,255,0);-webkit-tap-highlight-color:transparent}body,kbd{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,.no-fontface kbd{font-family:Helvetica Neue,Helvetica,Arial,sans-serif}code,pre{font-family:Roboto Mono,Courier New,Courier,monospace}.no-fontface code,.no-fontface pre{font-family:Courier New,Courier,monospace}.md-content--typeset{font-size:1.6rem;line-height:1.6}.md-content--typeset p{margin:2rem 0}.md-content--typeset h1{font-size:3.125rem;font-weight:300;line-height:1.3;letter-spacing:-.01em;color:rgba(0,0,0,.54)}.md-content--typeset h1:before{content:" ";display:block;padding-top:11rem;margin-top:-11rem}.md-content--typeset h2{font-size:2.5rem;font-weight:300;line-height:1.4;margin-top:4rem;letter-spacing:-.01em}.md-content--typeset h2:before{content:" ";display:block;padding-top:8.2rem;margin-top:-8.2rem}.md-content--typeset h3{font-size:2rem;font-weight:400;line-height:1.5;margin-top:3.2rem;letter-spacing:-.01em}.md-content--typeset h3:before{content:" ";display:block;padding-top:8.4rem;margin-top:-8.4rem}.md-content--typeset h2+h3{margin-top:1.6rem}.md-content--typeset h4{font-size:1.6rem;font-weight:700;margin-top:1.6rem;letter-spacing:-.01em}.md-content--typeset h4:before{position:relative;z-index:-4;content:" ";display:block;padding-top:8.8rem;margin-top:-8.8rem}.md-content--typeset h5,.md-content--typeset h6{font-size:1.28rem;font-weight:700;margin-top:1.6rem;letter-spacing:-.01em;color:rgba(0,0,0,.54)}.md-content--typeset h5:before,.md-content--typeset h6:before{position:relative;z-index:-5;content:" ";display:block;padding-top:9rem;margin-top:-9rem}.md-content--typeset h5{text-transform:uppercase}.md-content--typeset a{color:#3f51b5;-webkit-transition:color .125s;transition:color .125s}.md-content--typeset a:active,.md-content--typeset a:hover{color:#536dfe}.md-content--typeset code{font-size:85%;font-weight:400;word-break:break-word;padding:.1rem .4rem;background:#f7f7f7;color:#37474f}.md-content--typeset pre{font-size:85%;line-height:1.4;padding:1rem 1.2rem;overflow-x:scroll;background:#f7f7f7;color:#37474f}.md-content--typeset kbd{display:inline-block;font-size:85%;line-height:1rem;word-break:break-word;padding:.4rem .5rem .5rem;vertical-align:.1rem;color:#555;background-color:#fcfcfc;border:.1rem solid #ccc;border-bottom-color:#bbb;border-radius:.3rem;box-shadow:inset 0 -.1rem 0 #bbb}.md-content--typeset small{color:rgba(0,0,0,.54)}.md-content--typeset hr{margin:2.4rem 0;border-bottom:.1rem dotted rgba(0,0,0,.26)}.md-content--typeset blockquote{padding-left:1.2rem;border-left:.4rem solid rgba(0,0,0,.26);color:rgba(0,0,0,.54)}.md-content--typeset ul{list-style-type:disc}.md-content--typeset ol ol{list-style-type:lower-alpha}.md-content--typeset ol ol ol{list-style-type:lower-roman}.md-content--typeset ol,.md-content--typeset ul{margin-left:1rem}.md-content--typeset ol li,.md-content--typeset ul li{margin-bottom:1rem;margin-left:2rem}.md-content--typeset ol li:last-child,.md-content--typeset ul li:last-child{margin-bottom:0}.md-content--typeset ol li ol,.md-content--typeset ol li ul,.md-content--typeset ul li ol,.md-content--typeset ul li ul{padding-top:1rem;margin-bottom:1rem;margin-left:1rem}html{height:100%}body{position:relative;min-height:100%}hr{display:block;height:1px;padding:0;border:0}.md-grid{max-width:120rem;margin-left:auto;margin-right: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!important}.md-overlay{position:fixed;top:0;width:0;height:0;z-index:2;opacity:0;background:rgba(0,0,0,.54);-webkit-transition:opacity .25s,width 0s .25s,height 0s .25s;transition:opacity .25s,width 0s .25s,height 0s .25s}.md-flex{display:table}.md-flex__cell{display:table-cell;vertical-align:top}.md-flex__cell--shrink{width:1%}.md-flex__cell--stretch{display:table;table-layout:fixed;width:100%}.md-flex__ellipsis{display:table-cell;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.md-content__inner{margin:2.4rem 1.6rem}.md-content__copyright{display:block}.md-header{box-shadow:0 1.5px 3px rgba(0,0,0,.24),0 3px 8px rgba(0,0,0,.05);position:fixed;top:0;left:0;right:0;height:5.6rem;z-index:1;background:#3f51b5;color:#fff}.md-header-nav{padding:.4rem}.md-header-nav__icon{display:inline-block;font-size:2.4rem;padding:.8rem;margin:.4rem;cursor:pointer;border-radius:100%;-webkit-transition:background .25s;transition:background .25s}.md-header-nav__icon:active{background:hsla(0,0%,100%,.12)}.md-header-nav__title{padding:0 2rem;font-size:1.8rem;line-height:4.8rem}.md-footer{position:absolute;width:100%;bottom:0}.md-footer-pagination{background:rgba(0,0,0,.87);color:#fff}.md-footer-nav{overflow:auto;padding:.4rem}.md-footer-nav__link{padding-top:2.8rem;padding-bottom:.8rem}.md-footer-nav__link--prev{float:left;width:25%}.md-footer-nav__link--next{float:right;width:75%;text-align:right}.md-footer-nav__icon{display:inline-block;font-size:2.4rem;padding:.8rem;margin:.4rem;cursor:pointer;border-radius:100%;-webkit-transition:background .25s;transition:background .25s}.md-footer-nav__icon:active{background:hsla(0,0%,100%,.12)}.md-footer-nav__title{position:relative;padding:0 .4rem;font-size:1.8rem;line-height:4.8rem}.md-footer-nav__direction{position:absolute;left:0;right:0;padding:0 .4rem;margin-top:-2rem;font-size:1.5rem;color:hsla(0,0%,100%,.7)}.md-nav,.md-nav h3{font-size:1.28rem;line-height:1.2}.md-nav--toc{border-left:.4rem solid #3f51b5}.md-nav__list{list-style:none}.md-nav__list .md-nav__list{margin-left:1.2rem}.md-nav__toggle~.md-nav__list{max-height:0;overflow:hidden}.md-nav__toggle:checked~.md-nav__list{max-height:100%}.md-nav__item{margin:.8rem 0 0;line-height:1.6rem}.md-nav__link{display:block;overflow:hidden;text-overflow:ellipsis;-webkit-transition:color .125s;transition:color .125s}.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-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;-webkit-overflow-scrolling:touch}.js .md-sidebar__scrollwrap{position:absolute;top:0;left:0;bottom:0;right:0}.md-sidebar__scrollwrap::-webkit-scrollbar{width:.4rem;height:.4rem}.md-sidebar__scrollwrap::-webkit-scrollbar-thumb{background:rgba(0,0,0,.26)}.md-sidebar__inner{padding:1.2rem}.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{color:#000;background-color:#fdd}.code .gi,.codehilite .gi{color:#000;background-color:#dfd}.code .w,.codehilite .w{color:transparent}.md-content .headerlink{display:inline-block;margin-left:1rem;opacity:0;color:rgba(0,0,0,.26);-webkit-transform:translate3d(0,.5rem,0);transform:translate3d(0,.5rem,0);-webkit-transition:opacity .125s .25s,color .25s,-webkit-transform .25s .25s;transition:opacity .125s .25s,color .25s,-webkit-transform .25s .25s;transition:opacity .125s .25s,transform .25s .25s,color .25s;transition:opacity .125s .25s,transform .25s .25s,color .25s,-webkit-transform .25s .25s}.md-content h1:hover .headerlink,.md-content h2:hover .headerlink,.md-content h3:hover .headerlink,.md-content h4:hover .headerlink,.md-content h5:hover .headerlink,.md-content h6:hover .headerlink{margin-left:1rem;opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}.md-content h1:hover .headerlink:hover,.md-content h2:hover .headerlink:hover,.md-content h3:hover .headerlink:hover,.md-content h4:hover .headerlink:hover,.md-content h5:hover .headerlink:hover,.md-content h6:hover .headerlink:hover{color:#536dfe}@media only screen and (max-width:74.9375em){#md-toggle-drawer:checked~.md-overlay{width:100%;height:100%;opacity:1;-webkit-transition:opacity .25s,width 0s,height 0s;transition:opacity .25s,width 0s,height 0s}.md-sidebar--primary{position:fixed;top:0;width:24.2em;height:100%;z-index:3;background:#fff;-webkit-transition:-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1),-webkit-transform .25s cubic-bezier(.4,0,.2,1);-webkit-transform:translate3d(-24.2em,0,0);transform:translate3d(-24.2em,0,0)}.no-csstransforms3d .md-sidebar--primary{display:none}#md-toggle-drawer:checked~.md-container .md-sidebar--primary{-webkit-transform:translateZ(0);transform:translateZ(0)}.no-csstransforms3d #md-toggle-drawer:checked~.md-container .md-sidebar--primary{display:block}.md-sidebar--primary .md-sidebar__scrollwrap{margin:0}}@media only screen and (min-width:60em){.md-content{margin-right:24.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-sidebar__inner{border-right:.1rem solid rgba(0,0,0,.07)}}@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 (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/palettes-05ab2406df.css b/material/assets/stylesheets/palettes-05ab2406df.css deleted file mode 100644 index ead0d849b..000000000 --- a/material/assets/stylesheets/palettes-05ab2406df.css +++ /dev/null @@ -1 +0,0 @@ -@supports (-webkit-appearance:none){.palette-primary-red{background:#e84e40}}.palette-primary-red .footer,.palette-primary-red .header{background:#e84e40}.palette-primary-red .drawer .toc a.current,.palette-primary-red .drawer .toc a:focus,.palette-primary-red .drawer .toc a:hover{color:#e84e40}.palette-primary-red .drawer .anchor a{border-left:2px solid #e84e40}.ios.standalone .palette-primary-red .article{background:-webkit-linear-gradient(top,#fff 50%,#e84e40 0);background:linear-gradient(180deg,#fff 50%,#e84e40 0)}.palette-primary-red .article a,.palette-primary-red .article code,.palette-primary-red .article h1,.palette-primary-red .article h2{color:#e84e40}.palette-primary-red .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-red .article table th{background:#ee7a70}.palette-primary-red .results .meta{background:#e84e40}@supports (-webkit-appearance:none){.palette-primary-pink{background:#e91e63}}.palette-primary-pink .footer,.palette-primary-pink .header{background:#e91e63}.palette-primary-pink .drawer .toc a.current,.palette-primary-pink .drawer .toc a:focus,.palette-primary-pink .drawer .toc a:hover{color:#e91e63}.palette-primary-pink .drawer .anchor a{border-left:2px solid #e91e63}.ios.standalone .palette-primary-pink .article{background:-webkit-linear-gradient(top,#fff 50%,#e91e63 0);background:linear-gradient(180deg,#fff 50%,#e91e63 0)}.palette-primary-pink .article a,.palette-primary-pink .article code,.palette-primary-pink .article h1,.palette-primary-pink .article h2{color:#e91e63}.palette-primary-pink .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-pink .article table th{background:#ef568a}.palette-primary-pink .results .meta{background:#e91e63}@supports (-webkit-appearance:none){.palette-primary-purple{background:#ab47bc}}.palette-primary-purple .footer,.palette-primary-purple .header{background:#ab47bc}.palette-primary-purple .drawer .toc a.current,.palette-primary-purple .drawer .toc a:focus,.palette-primary-purple .drawer .toc a:hover{color:#ab47bc}.palette-primary-purple .drawer .anchor a{border-left:2px solid #ab47bc}.ios.standalone .palette-primary-purple .article{background:-webkit-linear-gradient(top,#fff 50%,#ab47bc 0);background:linear-gradient(180deg,#fff 50%,#ab47bc 0)}.palette-primary-purple .article a,.palette-primary-purple .article code,.palette-primary-purple .article h1,.palette-primary-purple .article h2{color:#ab47bc}.palette-primary-purple .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-purple .article table th{background:#c075cd}.palette-primary-purple .results .meta{background:#ab47bc}@supports (-webkit-appearance:none){.palette-primary-deep-purple{background:#7e57c2}}.palette-primary-deep-purple .footer,.palette-primary-deep-purple .header{background:#7e57c2}.palette-primary-deep-purple .drawer .toc a.current,.palette-primary-deep-purple .drawer .toc a:focus,.palette-primary-deep-purple .drawer .toc a:hover{color:#7e57c2}.palette-primary-deep-purple .drawer .anchor a{border-left:2px solid #7e57c2}.ios.standalone .palette-primary-deep-purple .article{background:-webkit-linear-gradient(top,#fff 50%,#7e57c2 0);background:linear-gradient(180deg,#fff 50%,#7e57c2 0)}.palette-primary-deep-purple .article a,.palette-primary-deep-purple .article code,.palette-primary-deep-purple .article h1,.palette-primary-deep-purple .article h2{color:#7e57c2}.palette-primary-deep-purple .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-deep-purple .article table th{background:#9e81d1}.palette-primary-deep-purple .results .meta{background:#7e57c2}@supports (-webkit-appearance:none){.palette-primary-indigo{background:#3f51b5}}.palette-primary-indigo .footer,.palette-primary-indigo .header{background:#3f51b5}.palette-primary-indigo .drawer .toc a.current,.palette-primary-indigo .drawer .toc a:focus,.palette-primary-indigo .drawer .toc a:hover{color:#3f51b5}.palette-primary-indigo .drawer .anchor a{border-left:2px solid #3f51b5}.ios.standalone .palette-primary-indigo .article{background:-webkit-linear-gradient(top,#fff 50%,#3f51b5 0);background:linear-gradient(180deg,#fff 50%,#3f51b5 0)}.palette-primary-indigo .article a,.palette-primary-indigo .article code,.palette-primary-indigo .article h1,.palette-primary-indigo .article h2{color:#3f51b5}.palette-primary-indigo .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-indigo .article table th{background:#6f7dc8}.palette-primary-indigo .results .meta{background:#3f51b5}@supports (-webkit-appearance:none){.palette-primary-blue{background:#5677fc}}.palette-primary-blue .footer,.palette-primary-blue .header{background:#5677fc}.palette-primary-blue .drawer .toc a.current,.palette-primary-blue .drawer .toc a:focus,.palette-primary-blue .drawer .toc a:hover{color:#5677fc}.palette-primary-blue .drawer .anchor a{border-left:2px solid #5677fc}.ios.standalone .palette-primary-blue .article{background:-webkit-linear-gradient(top,#fff 50%,#5677fc 0);background:linear-gradient(180deg,#fff 50%,#5677fc 0)}.palette-primary-blue .article a,.palette-primary-blue .article code,.palette-primary-blue .article h1,.palette-primary-blue .article h2{color:#5677fc}.palette-primary-blue .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-blue .article table th{background:#8099fd}.palette-primary-blue .results .meta{background:#5677fc}@supports (-webkit-appearance:none){.palette-primary-light-blue{background:#03a9f4}}.palette-primary-light-blue .footer,.palette-primary-light-blue .header{background:#03a9f4}.palette-primary-light-blue .drawer .toc a.current,.palette-primary-light-blue .drawer .toc a:focus,.palette-primary-light-blue .drawer .toc a:hover{color:#03a9f4}.palette-primary-light-blue .drawer .anchor a{border-left:2px solid #03a9f4}.ios.standalone .palette-primary-light-blue .article{background:-webkit-linear-gradient(top,#fff 50%,#03a9f4 0);background:linear-gradient(180deg,#fff 50%,#03a9f4 0)}.palette-primary-light-blue .article a,.palette-primary-light-blue .article code,.palette-primary-light-blue .article h1,.palette-primary-light-blue .article h2{color:#03a9f4}.palette-primary-light-blue .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-light-blue .article table th{background:#42bff7}.palette-primary-light-blue .results .meta{background:#03a9f4}@supports (-webkit-appearance:none){.palette-primary-cyan{background:#00bcd4}}.palette-primary-cyan .footer,.palette-primary-cyan .header{background:#00bcd4}.palette-primary-cyan .drawer .toc a.current,.palette-primary-cyan .drawer .toc a:focus,.palette-primary-cyan .drawer .toc a:hover{color:#00bcd4}.palette-primary-cyan .drawer .anchor a{border-left:2px solid #00bcd4}.ios.standalone .palette-primary-cyan .article{background:-webkit-linear-gradient(top,#fff 50%,#00bcd4 0);background:linear-gradient(180deg,#fff 50%,#00bcd4 0)}.palette-primary-cyan .article a,.palette-primary-cyan .article code,.palette-primary-cyan .article h1,.palette-primary-cyan .article h2{color:#00bcd4}.palette-primary-cyan .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-cyan .article table th{background:#40cddf}.palette-primary-cyan .results .meta{background:#00bcd4}@supports (-webkit-appearance:none){.palette-primary-teal{background:#009688}}.palette-primary-teal .footer,.palette-primary-teal .header{background:#009688}.palette-primary-teal .drawer .toc a.current,.palette-primary-teal .drawer .toc a:focus,.palette-primary-teal .drawer .toc a:hover{color:#009688}.palette-primary-teal .drawer .anchor a{border-left:2px solid #009688}.ios.standalone .palette-primary-teal .article{background:-webkit-linear-gradient(top,#fff 50%,#009688 0);background:linear-gradient(180deg,#fff 50%,#009688 0)}.palette-primary-teal .article a,.palette-primary-teal .article code,.palette-primary-teal .article h1,.palette-primary-teal .article h2{color:#009688}.palette-primary-teal .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-teal .article table th{background:#40b0a6}.palette-primary-teal .results .meta{background:#009688}@supports (-webkit-appearance:none){.palette-primary-green{background:#259b24}}.palette-primary-green .footer,.palette-primary-green .header{background:#259b24}.palette-primary-green .drawer .toc a.current,.palette-primary-green .drawer .toc a:focus,.palette-primary-green .drawer .toc a:hover{color:#259b24}.palette-primary-green .drawer .anchor a{border-left:2px solid #259b24}.ios.standalone .palette-primary-green .article{background:-webkit-linear-gradient(top,#fff 50%,#259b24 0);background:linear-gradient(180deg,#fff 50%,#259b24 0)}.palette-primary-green .article a,.palette-primary-green .article code,.palette-primary-green .article h1,.palette-primary-green .article h2{color:#259b24}.palette-primary-green .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-green .article table th{background:#5cb45b}.palette-primary-green .results .meta{background:#259b24}@supports (-webkit-appearance:none){.palette-primary-light-green{background:#7cb342}}.palette-primary-light-green .footer,.palette-primary-light-green .header{background:#7cb342}.palette-primary-light-green .drawer .toc a.current,.palette-primary-light-green .drawer .toc a:focus,.palette-primary-light-green .drawer .toc a:hover{color:#7cb342}.palette-primary-light-green .drawer .anchor a{border-left:2px solid #7cb342}.ios.standalone .palette-primary-light-green .article{background:-webkit-linear-gradient(top,#fff 50%,#7cb342 0);background:linear-gradient(180deg,#fff 50%,#7cb342 0)}.palette-primary-light-green .article a,.palette-primary-light-green .article code,.palette-primary-light-green .article h1,.palette-primary-light-green .article h2{color:#7cb342}.palette-primary-light-green .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-light-green .article table th{background:#9dc671}.palette-primary-light-green .results .meta{background:#7cb342}@supports (-webkit-appearance:none){.palette-primary-lime{background:#c0ca33}}.palette-primary-lime .footer,.palette-primary-lime .header{background:#c0ca33}.palette-primary-lime .drawer .toc a.current,.palette-primary-lime .drawer .toc a:focus,.palette-primary-lime .drawer .toc a:hover{color:#c0ca33}.palette-primary-lime .drawer .anchor a{border-left:2px solid #c0ca33}.ios.standalone .palette-primary-lime .article{background:-webkit-linear-gradient(top,#fff 50%,#c0ca33 0);background:linear-gradient(180deg,#fff 50%,#c0ca33 0)}.palette-primary-lime .article a,.palette-primary-lime .article code,.palette-primary-lime .article h1,.palette-primary-lime .article h2{color:#c0ca33}.palette-primary-lime .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-lime .article table th{background:#d0d766}.palette-primary-lime .results .meta{background:#c0ca33}@supports (-webkit-appearance:none){.palette-primary-yellow{background:#f9a825}}.palette-primary-yellow .footer,.palette-primary-yellow .header{background:#f9a825}.palette-primary-yellow .drawer .toc a.current,.palette-primary-yellow .drawer .toc a:focus,.palette-primary-yellow .drawer .toc a:hover{color:#f9a825}.palette-primary-yellow .drawer .anchor a{border-left:2px solid #f9a825}.ios.standalone .palette-primary-yellow .article{background:-webkit-linear-gradient(top,#fff 50%,#f9a825 0);background:linear-gradient(180deg,#fff 50%,#f9a825 0)}.palette-primary-yellow .article a,.palette-primary-yellow .article code,.palette-primary-yellow .article h1,.palette-primary-yellow .article h2{color:#f9a825}.palette-primary-yellow .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-yellow .article table th{background:#fbbe5c}.palette-primary-yellow .results .meta{background:#f9a825}@supports (-webkit-appearance:none){.palette-primary-amber{background:#ffb300}}.palette-primary-amber .footer,.palette-primary-amber .header{background:#ffb300}.palette-primary-amber .drawer .toc a.current,.palette-primary-amber .drawer .toc a:focus,.palette-primary-amber .drawer .toc a:hover{color:#ffb300}.palette-primary-amber .drawer .anchor a{border-left:2px solid #ffb300}.ios.standalone .palette-primary-amber .article{background:-webkit-linear-gradient(top,#fff 50%,#ffb300 0);background:linear-gradient(180deg,#fff 50%,#ffb300 0)}.palette-primary-amber .article a,.palette-primary-amber .article code,.palette-primary-amber .article h1,.palette-primary-amber .article h2{color:#ffb300}.palette-primary-amber .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-amber .article table th{background:#ffc640}.palette-primary-amber .results .meta{background:#ffb300}@supports (-webkit-appearance:none){.palette-primary-orange{background:#fb8c00}}.palette-primary-orange .footer,.palette-primary-orange .header{background:#fb8c00}.palette-primary-orange .drawer .toc a.current,.palette-primary-orange .drawer .toc a:focus,.palette-primary-orange .drawer .toc a:hover{color:#fb8c00}.palette-primary-orange .drawer .anchor a{border-left:2px solid #fb8c00}.ios.standalone .palette-primary-orange .article{background:-webkit-linear-gradient(top,#fff 50%,#fb8c00 0);background:linear-gradient(180deg,#fff 50%,#fb8c00 0)}.palette-primary-orange .article a,.palette-primary-orange .article code,.palette-primary-orange .article h1,.palette-primary-orange .article h2{color:#fb8c00}.palette-primary-orange .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-orange .article table th{background:#fca940}.palette-primary-orange .results .meta{background:#fb8c00}@supports (-webkit-appearance:none){.palette-primary-deep-orange{background:#ff7043}}.palette-primary-deep-orange .footer,.palette-primary-deep-orange .header{background:#ff7043}.palette-primary-deep-orange .drawer .toc a.current,.palette-primary-deep-orange .drawer .toc a:focus,.palette-primary-deep-orange .drawer .toc a:hover{color:#ff7043}.palette-primary-deep-orange .drawer .anchor a{border-left:2px solid #ff7043}.ios.standalone .palette-primary-deep-orange .article{background:-webkit-linear-gradient(top,#fff 50%,#ff7043 0);background:linear-gradient(180deg,#fff 50%,#ff7043 0)}.palette-primary-deep-orange .article a,.palette-primary-deep-orange .article code,.palette-primary-deep-orange .article h1,.palette-primary-deep-orange .article h2{color:#ff7043}.palette-primary-deep-orange .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-deep-orange .article table th{background:#ff9472}.palette-primary-deep-orange .results .meta{background:#ff7043}@supports (-webkit-appearance:none){.palette-primary-brown{background:#795548}}.palette-primary-brown .footer,.palette-primary-brown .header{background:#795548}.palette-primary-brown .drawer .toc a.current,.palette-primary-brown .drawer .toc a:focus,.palette-primary-brown .drawer .toc a:hover{color:#795548}.palette-primary-brown .drawer .anchor a{border-left:2px solid #795548}.ios.standalone .palette-primary-brown .article{background:-webkit-linear-gradient(top,#fff 50%,#795548 0);background:linear-gradient(180deg,#fff 50%,#795548 0)}.palette-primary-brown .article a,.palette-primary-brown .article code,.palette-primary-brown .article h1,.palette-primary-brown .article h2{color:#795548}.palette-primary-brown .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-brown .article table th{background:#9b8076}.palette-primary-brown .results .meta{background:#795548}@supports (-webkit-appearance:none){.palette-primary-grey{background:#757575}}.palette-primary-grey .footer,.palette-primary-grey .header{background:#757575}.palette-primary-grey .drawer .toc a.current,.palette-primary-grey .drawer .toc a:focus,.palette-primary-grey .drawer .toc a:hover{color:#757575}.palette-primary-grey .drawer .anchor a{border-left:2px solid #757575}.ios.standalone .palette-primary-grey .article{background:-webkit-linear-gradient(top,#fff 50%,#757575 0);background:linear-gradient(180deg,#fff 50%,#757575 0)}.palette-primary-grey .article a,.palette-primary-grey .article code,.palette-primary-grey .article h1,.palette-primary-grey .article h2{color:#757575}.palette-primary-grey .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-grey .article table th{background:#989898}.palette-primary-grey .results .meta{background:#757575}@supports (-webkit-appearance:none){.palette-primary-blue-grey{background:#546e7a}}.palette-primary-blue-grey .footer,.palette-primary-blue-grey .header{background:#546e7a}.palette-primary-blue-grey .drawer .toc a.current,.palette-primary-blue-grey .drawer .toc a:focus,.palette-primary-blue-grey .drawer .toc a:hover{color:#546e7a}.palette-primary-blue-grey .drawer .anchor a{border-left:2px solid #546e7a}.ios.standalone .palette-primary-blue-grey .article{background:-webkit-linear-gradient(top,#fff 50%,#546e7a 0);background:linear-gradient(180deg,#fff 50%,#546e7a 0)}.palette-primary-blue-grey .article a,.palette-primary-blue-grey .article code,.palette-primary-blue-grey .article h1,.palette-primary-blue-grey .article h2{color:#546e7a}.palette-primary-blue-grey .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-blue-grey .article table th{background:#7f929b}.palette-primary-blue-grey .results .meta{background:#546e7a}.palette-accent-red .article a:focus,.palette-accent-red .article a:hover{color:#ff2d6f}.palette-accent-red .repo a{background:#ff2d6f}.palette-accent-pink .article a:focus,.palette-accent-pink .article a:hover{color:#f50057}.palette-accent-pink .repo a{background:#f50057}.palette-accent-purple .article a:focus,.palette-accent-purple .article a:hover{color:#e040fb}.palette-accent-purple .repo a{background:#e040fb}.palette-accent-deep-purple .article a:focus,.palette-accent-deep-purple .article a:hover{color:#7c4dff}.palette-accent-deep-purple .repo a{background:#7c4dff}.palette-accent-indigo .article a:focus,.palette-accent-indigo .article a:hover{color:#536dfe}.palette-accent-indigo .repo a{background:#536dfe}.palette-accent-blue .article a:focus,.palette-accent-blue .article a:hover{color:#6889ff}.palette-accent-blue .repo a{background:#6889ff}.palette-accent-light-blue .article a:focus,.palette-accent-light-blue .article a:hover{color:#0091ea}.palette-accent-light-blue .repo a{background:#0091ea}.palette-accent-cyan .article a:focus,.palette-accent-cyan .article a:hover{color:#00b8d4}.palette-accent-cyan .repo a{background:#00b8d4}.palette-accent-teal .article a:focus,.palette-accent-teal .article a:hover{color:#00bfa5}.palette-accent-teal .repo a{background:#00bfa5}.palette-accent-green .article a:focus,.palette-accent-green .article a:hover{color:#12c700}.palette-accent-green .repo a{background:#12c700}.palette-accent-light-green .article a:focus,.palette-accent-light-green .article a:hover{color:#64dd17}.palette-accent-light-green .repo a{background:#64dd17}.palette-accent-lime .article a:focus,.palette-accent-lime .article a:hover{color:#aeea00}.palette-accent-lime .repo a{background:#aeea00}.palette-accent-yellow .article a:focus,.palette-accent-yellow .article a:hover{color:#ffd600}.palette-accent-yellow .repo a{background:#ffd600}.palette-accent-amber .article a:focus,.palette-accent-amber .article a:hover{color:#ffab00}.palette-accent-amber .repo a{background:#ffab00}.palette-accent-orange .article a:focus,.palette-accent-orange .article a:hover{color:#ff9100}.palette-accent-orange .repo a{background:#ff9100}.palette-accent-deep-orange .article a:focus,.palette-accent-deep-orange .article a:hover{color:#ff6e40}.palette-accent-deep-orange .repo a{background:#ff6e40}@media only screen and (max-width:959px){.palette-primary-red .project{background:#e84e40}.palette-primary-pink .project{background:#e91e63}.palette-primary-purple .project{background:#ab47bc}.palette-primary-deep-purple .project{background:#7e57c2}.palette-primary-indigo .project{background:#3f51b5}.palette-primary-blue .project{background:#5677fc}.palette-primary-light-blue .project{background:#03a9f4}.palette-primary-cyan .project{background:#00bcd4}.palette-primary-teal .project{background:#009688}.palette-primary-green .project{background:#259b24}.palette-primary-light-green .project{background:#7cb342}.palette-primary-lime .project{background:#c0ca33}.palette-primary-yellow .project{background:#f9a825}.palette-primary-amber .project{background:#ffb300}.palette-primary-orange .project{background:#fb8c00}.palette-primary-deep-orange .project{background:#ff7043}.palette-primary-brown .project{background:#795548}.palette-primary-grey .project{background:#757575}.palette-primary-blue-grey .project{background:#546e7a}} \ No newline at end of file diff --git a/material/assets/stylesheets/palettes.css b/material/assets/stylesheets/palettes.css deleted file mode 100644 index ead0d849b..000000000 --- a/material/assets/stylesheets/palettes.css +++ /dev/null @@ -1 +0,0 @@ -@supports (-webkit-appearance:none){.palette-primary-red{background:#e84e40}}.palette-primary-red .footer,.palette-primary-red .header{background:#e84e40}.palette-primary-red .drawer .toc a.current,.palette-primary-red .drawer .toc a:focus,.palette-primary-red .drawer .toc a:hover{color:#e84e40}.palette-primary-red .drawer .anchor a{border-left:2px solid #e84e40}.ios.standalone .palette-primary-red .article{background:-webkit-linear-gradient(top,#fff 50%,#e84e40 0);background:linear-gradient(180deg,#fff 50%,#e84e40 0)}.palette-primary-red .article a,.palette-primary-red .article code,.palette-primary-red .article h1,.palette-primary-red .article h2{color:#e84e40}.palette-primary-red .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-red .article table th{background:#ee7a70}.palette-primary-red .results .meta{background:#e84e40}@supports (-webkit-appearance:none){.palette-primary-pink{background:#e91e63}}.palette-primary-pink .footer,.palette-primary-pink .header{background:#e91e63}.palette-primary-pink .drawer .toc a.current,.palette-primary-pink .drawer .toc a:focus,.palette-primary-pink .drawer .toc a:hover{color:#e91e63}.palette-primary-pink .drawer .anchor a{border-left:2px solid #e91e63}.ios.standalone .palette-primary-pink .article{background:-webkit-linear-gradient(top,#fff 50%,#e91e63 0);background:linear-gradient(180deg,#fff 50%,#e91e63 0)}.palette-primary-pink .article a,.palette-primary-pink .article code,.palette-primary-pink .article h1,.palette-primary-pink .article h2{color:#e91e63}.palette-primary-pink .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-pink .article table th{background:#ef568a}.palette-primary-pink .results .meta{background:#e91e63}@supports (-webkit-appearance:none){.palette-primary-purple{background:#ab47bc}}.palette-primary-purple .footer,.palette-primary-purple .header{background:#ab47bc}.palette-primary-purple .drawer .toc a.current,.palette-primary-purple .drawer .toc a:focus,.palette-primary-purple .drawer .toc a:hover{color:#ab47bc}.palette-primary-purple .drawer .anchor a{border-left:2px solid #ab47bc}.ios.standalone .palette-primary-purple .article{background:-webkit-linear-gradient(top,#fff 50%,#ab47bc 0);background:linear-gradient(180deg,#fff 50%,#ab47bc 0)}.palette-primary-purple .article a,.palette-primary-purple .article code,.palette-primary-purple .article h1,.palette-primary-purple .article h2{color:#ab47bc}.palette-primary-purple .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-purple .article table th{background:#c075cd}.palette-primary-purple .results .meta{background:#ab47bc}@supports (-webkit-appearance:none){.palette-primary-deep-purple{background:#7e57c2}}.palette-primary-deep-purple .footer,.palette-primary-deep-purple .header{background:#7e57c2}.palette-primary-deep-purple .drawer .toc a.current,.palette-primary-deep-purple .drawer .toc a:focus,.palette-primary-deep-purple .drawer .toc a:hover{color:#7e57c2}.palette-primary-deep-purple .drawer .anchor a{border-left:2px solid #7e57c2}.ios.standalone .palette-primary-deep-purple .article{background:-webkit-linear-gradient(top,#fff 50%,#7e57c2 0);background:linear-gradient(180deg,#fff 50%,#7e57c2 0)}.palette-primary-deep-purple .article a,.palette-primary-deep-purple .article code,.palette-primary-deep-purple .article h1,.palette-primary-deep-purple .article h2{color:#7e57c2}.palette-primary-deep-purple .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-deep-purple .article table th{background:#9e81d1}.palette-primary-deep-purple .results .meta{background:#7e57c2}@supports (-webkit-appearance:none){.palette-primary-indigo{background:#3f51b5}}.palette-primary-indigo .footer,.palette-primary-indigo .header{background:#3f51b5}.palette-primary-indigo .drawer .toc a.current,.palette-primary-indigo .drawer .toc a:focus,.palette-primary-indigo .drawer .toc a:hover{color:#3f51b5}.palette-primary-indigo .drawer .anchor a{border-left:2px solid #3f51b5}.ios.standalone .palette-primary-indigo .article{background:-webkit-linear-gradient(top,#fff 50%,#3f51b5 0);background:linear-gradient(180deg,#fff 50%,#3f51b5 0)}.palette-primary-indigo .article a,.palette-primary-indigo .article code,.palette-primary-indigo .article h1,.palette-primary-indigo .article h2{color:#3f51b5}.palette-primary-indigo .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-indigo .article table th{background:#6f7dc8}.palette-primary-indigo .results .meta{background:#3f51b5}@supports (-webkit-appearance:none){.palette-primary-blue{background:#5677fc}}.palette-primary-blue .footer,.palette-primary-blue .header{background:#5677fc}.palette-primary-blue .drawer .toc a.current,.palette-primary-blue .drawer .toc a:focus,.palette-primary-blue .drawer .toc a:hover{color:#5677fc}.palette-primary-blue .drawer .anchor a{border-left:2px solid #5677fc}.ios.standalone .palette-primary-blue .article{background:-webkit-linear-gradient(top,#fff 50%,#5677fc 0);background:linear-gradient(180deg,#fff 50%,#5677fc 0)}.palette-primary-blue .article a,.palette-primary-blue .article code,.palette-primary-blue .article h1,.palette-primary-blue .article h2{color:#5677fc}.palette-primary-blue .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-blue .article table th{background:#8099fd}.palette-primary-blue .results .meta{background:#5677fc}@supports (-webkit-appearance:none){.palette-primary-light-blue{background:#03a9f4}}.palette-primary-light-blue .footer,.palette-primary-light-blue .header{background:#03a9f4}.palette-primary-light-blue .drawer .toc a.current,.palette-primary-light-blue .drawer .toc a:focus,.palette-primary-light-blue .drawer .toc a:hover{color:#03a9f4}.palette-primary-light-blue .drawer .anchor a{border-left:2px solid #03a9f4}.ios.standalone .palette-primary-light-blue .article{background:-webkit-linear-gradient(top,#fff 50%,#03a9f4 0);background:linear-gradient(180deg,#fff 50%,#03a9f4 0)}.palette-primary-light-blue .article a,.palette-primary-light-blue .article code,.palette-primary-light-blue .article h1,.palette-primary-light-blue .article h2{color:#03a9f4}.palette-primary-light-blue .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-light-blue .article table th{background:#42bff7}.palette-primary-light-blue .results .meta{background:#03a9f4}@supports (-webkit-appearance:none){.palette-primary-cyan{background:#00bcd4}}.palette-primary-cyan .footer,.palette-primary-cyan .header{background:#00bcd4}.palette-primary-cyan .drawer .toc a.current,.palette-primary-cyan .drawer .toc a:focus,.palette-primary-cyan .drawer .toc a:hover{color:#00bcd4}.palette-primary-cyan .drawer .anchor a{border-left:2px solid #00bcd4}.ios.standalone .palette-primary-cyan .article{background:-webkit-linear-gradient(top,#fff 50%,#00bcd4 0);background:linear-gradient(180deg,#fff 50%,#00bcd4 0)}.palette-primary-cyan .article a,.palette-primary-cyan .article code,.palette-primary-cyan .article h1,.palette-primary-cyan .article h2{color:#00bcd4}.palette-primary-cyan .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-cyan .article table th{background:#40cddf}.palette-primary-cyan .results .meta{background:#00bcd4}@supports (-webkit-appearance:none){.palette-primary-teal{background:#009688}}.palette-primary-teal .footer,.palette-primary-teal .header{background:#009688}.palette-primary-teal .drawer .toc a.current,.palette-primary-teal .drawer .toc a:focus,.palette-primary-teal .drawer .toc a:hover{color:#009688}.palette-primary-teal .drawer .anchor a{border-left:2px solid #009688}.ios.standalone .palette-primary-teal .article{background:-webkit-linear-gradient(top,#fff 50%,#009688 0);background:linear-gradient(180deg,#fff 50%,#009688 0)}.palette-primary-teal .article a,.palette-primary-teal .article code,.palette-primary-teal .article h1,.palette-primary-teal .article h2{color:#009688}.palette-primary-teal .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-teal .article table th{background:#40b0a6}.palette-primary-teal .results .meta{background:#009688}@supports (-webkit-appearance:none){.palette-primary-green{background:#259b24}}.palette-primary-green .footer,.palette-primary-green .header{background:#259b24}.palette-primary-green .drawer .toc a.current,.palette-primary-green .drawer .toc a:focus,.palette-primary-green .drawer .toc a:hover{color:#259b24}.palette-primary-green .drawer .anchor a{border-left:2px solid #259b24}.ios.standalone .palette-primary-green .article{background:-webkit-linear-gradient(top,#fff 50%,#259b24 0);background:linear-gradient(180deg,#fff 50%,#259b24 0)}.palette-primary-green .article a,.palette-primary-green .article code,.palette-primary-green .article h1,.palette-primary-green .article h2{color:#259b24}.palette-primary-green .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-green .article table th{background:#5cb45b}.palette-primary-green .results .meta{background:#259b24}@supports (-webkit-appearance:none){.palette-primary-light-green{background:#7cb342}}.palette-primary-light-green .footer,.palette-primary-light-green .header{background:#7cb342}.palette-primary-light-green .drawer .toc a.current,.palette-primary-light-green .drawer .toc a:focus,.palette-primary-light-green .drawer .toc a:hover{color:#7cb342}.palette-primary-light-green .drawer .anchor a{border-left:2px solid #7cb342}.ios.standalone .palette-primary-light-green .article{background:-webkit-linear-gradient(top,#fff 50%,#7cb342 0);background:linear-gradient(180deg,#fff 50%,#7cb342 0)}.palette-primary-light-green .article a,.palette-primary-light-green .article code,.palette-primary-light-green .article h1,.palette-primary-light-green .article h2{color:#7cb342}.palette-primary-light-green .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-light-green .article table th{background:#9dc671}.palette-primary-light-green .results .meta{background:#7cb342}@supports (-webkit-appearance:none){.palette-primary-lime{background:#c0ca33}}.palette-primary-lime .footer,.palette-primary-lime .header{background:#c0ca33}.palette-primary-lime .drawer .toc a.current,.palette-primary-lime .drawer .toc a:focus,.palette-primary-lime .drawer .toc a:hover{color:#c0ca33}.palette-primary-lime .drawer .anchor a{border-left:2px solid #c0ca33}.ios.standalone .palette-primary-lime .article{background:-webkit-linear-gradient(top,#fff 50%,#c0ca33 0);background:linear-gradient(180deg,#fff 50%,#c0ca33 0)}.palette-primary-lime .article a,.palette-primary-lime .article code,.palette-primary-lime .article h1,.palette-primary-lime .article h2{color:#c0ca33}.palette-primary-lime .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-lime .article table th{background:#d0d766}.palette-primary-lime .results .meta{background:#c0ca33}@supports (-webkit-appearance:none){.palette-primary-yellow{background:#f9a825}}.palette-primary-yellow .footer,.palette-primary-yellow .header{background:#f9a825}.palette-primary-yellow .drawer .toc a.current,.palette-primary-yellow .drawer .toc a:focus,.palette-primary-yellow .drawer .toc a:hover{color:#f9a825}.palette-primary-yellow .drawer .anchor a{border-left:2px solid #f9a825}.ios.standalone .palette-primary-yellow .article{background:-webkit-linear-gradient(top,#fff 50%,#f9a825 0);background:linear-gradient(180deg,#fff 50%,#f9a825 0)}.palette-primary-yellow .article a,.palette-primary-yellow .article code,.palette-primary-yellow .article h1,.palette-primary-yellow .article h2{color:#f9a825}.palette-primary-yellow .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-yellow .article table th{background:#fbbe5c}.palette-primary-yellow .results .meta{background:#f9a825}@supports (-webkit-appearance:none){.palette-primary-amber{background:#ffb300}}.palette-primary-amber .footer,.palette-primary-amber .header{background:#ffb300}.palette-primary-amber .drawer .toc a.current,.palette-primary-amber .drawer .toc a:focus,.palette-primary-amber .drawer .toc a:hover{color:#ffb300}.palette-primary-amber .drawer .anchor a{border-left:2px solid #ffb300}.ios.standalone .palette-primary-amber .article{background:-webkit-linear-gradient(top,#fff 50%,#ffb300 0);background:linear-gradient(180deg,#fff 50%,#ffb300 0)}.palette-primary-amber .article a,.palette-primary-amber .article code,.palette-primary-amber .article h1,.palette-primary-amber .article h2{color:#ffb300}.palette-primary-amber .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-amber .article table th{background:#ffc640}.palette-primary-amber .results .meta{background:#ffb300}@supports (-webkit-appearance:none){.palette-primary-orange{background:#fb8c00}}.palette-primary-orange .footer,.palette-primary-orange .header{background:#fb8c00}.palette-primary-orange .drawer .toc a.current,.palette-primary-orange .drawer .toc a:focus,.palette-primary-orange .drawer .toc a:hover{color:#fb8c00}.palette-primary-orange .drawer .anchor a{border-left:2px solid #fb8c00}.ios.standalone .palette-primary-orange .article{background:-webkit-linear-gradient(top,#fff 50%,#fb8c00 0);background:linear-gradient(180deg,#fff 50%,#fb8c00 0)}.palette-primary-orange .article a,.palette-primary-orange .article code,.palette-primary-orange .article h1,.palette-primary-orange .article h2{color:#fb8c00}.palette-primary-orange .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-orange .article table th{background:#fca940}.palette-primary-orange .results .meta{background:#fb8c00}@supports (-webkit-appearance:none){.palette-primary-deep-orange{background:#ff7043}}.palette-primary-deep-orange .footer,.palette-primary-deep-orange .header{background:#ff7043}.palette-primary-deep-orange .drawer .toc a.current,.palette-primary-deep-orange .drawer .toc a:focus,.palette-primary-deep-orange .drawer .toc a:hover{color:#ff7043}.palette-primary-deep-orange .drawer .anchor a{border-left:2px solid #ff7043}.ios.standalone .palette-primary-deep-orange .article{background:-webkit-linear-gradient(top,#fff 50%,#ff7043 0);background:linear-gradient(180deg,#fff 50%,#ff7043 0)}.palette-primary-deep-orange .article a,.palette-primary-deep-orange .article code,.palette-primary-deep-orange .article h1,.palette-primary-deep-orange .article h2{color:#ff7043}.palette-primary-deep-orange .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-deep-orange .article table th{background:#ff9472}.palette-primary-deep-orange .results .meta{background:#ff7043}@supports (-webkit-appearance:none){.palette-primary-brown{background:#795548}}.palette-primary-brown .footer,.palette-primary-brown .header{background:#795548}.palette-primary-brown .drawer .toc a.current,.palette-primary-brown .drawer .toc a:focus,.palette-primary-brown .drawer .toc a:hover{color:#795548}.palette-primary-brown .drawer .anchor a{border-left:2px solid #795548}.ios.standalone .palette-primary-brown .article{background:-webkit-linear-gradient(top,#fff 50%,#795548 0);background:linear-gradient(180deg,#fff 50%,#795548 0)}.palette-primary-brown .article a,.palette-primary-brown .article code,.palette-primary-brown .article h1,.palette-primary-brown .article h2{color:#795548}.palette-primary-brown .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-brown .article table th{background:#9b8076}.palette-primary-brown .results .meta{background:#795548}@supports (-webkit-appearance:none){.palette-primary-grey{background:#757575}}.palette-primary-grey .footer,.palette-primary-grey .header{background:#757575}.palette-primary-grey .drawer .toc a.current,.palette-primary-grey .drawer .toc a:focus,.palette-primary-grey .drawer .toc a:hover{color:#757575}.palette-primary-grey .drawer .anchor a{border-left:2px solid #757575}.ios.standalone .palette-primary-grey .article{background:-webkit-linear-gradient(top,#fff 50%,#757575 0);background:linear-gradient(180deg,#fff 50%,#757575 0)}.palette-primary-grey .article a,.palette-primary-grey .article code,.palette-primary-grey .article h1,.palette-primary-grey .article h2{color:#757575}.palette-primary-grey .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-grey .article table th{background:#989898}.palette-primary-grey .results .meta{background:#757575}@supports (-webkit-appearance:none){.palette-primary-blue-grey{background:#546e7a}}.palette-primary-blue-grey .footer,.palette-primary-blue-grey .header{background:#546e7a}.palette-primary-blue-grey .drawer .toc a.current,.palette-primary-blue-grey .drawer .toc a:focus,.palette-primary-blue-grey .drawer .toc a:hover{color:#546e7a}.palette-primary-blue-grey .drawer .anchor a{border-left:2px solid #546e7a}.ios.standalone .palette-primary-blue-grey .article{background:-webkit-linear-gradient(top,#fff 50%,#546e7a 0);background:linear-gradient(180deg,#fff 50%,#546e7a 0)}.palette-primary-blue-grey .article a,.palette-primary-blue-grey .article code,.palette-primary-blue-grey .article h1,.palette-primary-blue-grey .article h2{color:#546e7a}.palette-primary-blue-grey .article .headerlink{color:rgba(0,0,0,.26)}.palette-primary-blue-grey .article table th{background:#7f929b}.palette-primary-blue-grey .results .meta{background:#546e7a}.palette-accent-red .article a:focus,.palette-accent-red .article a:hover{color:#ff2d6f}.palette-accent-red .repo a{background:#ff2d6f}.palette-accent-pink .article a:focus,.palette-accent-pink .article a:hover{color:#f50057}.palette-accent-pink .repo a{background:#f50057}.palette-accent-purple .article a:focus,.palette-accent-purple .article a:hover{color:#e040fb}.palette-accent-purple .repo a{background:#e040fb}.palette-accent-deep-purple .article a:focus,.palette-accent-deep-purple .article a:hover{color:#7c4dff}.palette-accent-deep-purple .repo a{background:#7c4dff}.palette-accent-indigo .article a:focus,.palette-accent-indigo .article a:hover{color:#536dfe}.palette-accent-indigo .repo a{background:#536dfe}.palette-accent-blue .article a:focus,.palette-accent-blue .article a:hover{color:#6889ff}.palette-accent-blue .repo a{background:#6889ff}.palette-accent-light-blue .article a:focus,.palette-accent-light-blue .article a:hover{color:#0091ea}.palette-accent-light-blue .repo a{background:#0091ea}.palette-accent-cyan .article a:focus,.palette-accent-cyan .article a:hover{color:#00b8d4}.palette-accent-cyan .repo a{background:#00b8d4}.palette-accent-teal .article a:focus,.palette-accent-teal .article a:hover{color:#00bfa5}.palette-accent-teal .repo a{background:#00bfa5}.palette-accent-green .article a:focus,.palette-accent-green .article a:hover{color:#12c700}.palette-accent-green .repo a{background:#12c700}.palette-accent-light-green .article a:focus,.palette-accent-light-green .article a:hover{color:#64dd17}.palette-accent-light-green .repo a{background:#64dd17}.palette-accent-lime .article a:focus,.palette-accent-lime .article a:hover{color:#aeea00}.palette-accent-lime .repo a{background:#aeea00}.palette-accent-yellow .article a:focus,.palette-accent-yellow .article a:hover{color:#ffd600}.palette-accent-yellow .repo a{background:#ffd600}.palette-accent-amber .article a:focus,.palette-accent-amber .article a:hover{color:#ffab00}.palette-accent-amber .repo a{background:#ffab00}.palette-accent-orange .article a:focus,.palette-accent-orange .article a:hover{color:#ff9100}.palette-accent-orange .repo a{background:#ff9100}.palette-accent-deep-orange .article a:focus,.palette-accent-deep-orange .article a:hover{color:#ff6e40}.palette-accent-deep-orange .repo a{background:#ff6e40}@media only screen and (max-width:959px){.palette-primary-red .project{background:#e84e40}.palette-primary-pink .project{background:#e91e63}.palette-primary-purple .project{background:#ab47bc}.palette-primary-deep-purple .project{background:#7e57c2}.palette-primary-indigo .project{background:#3f51b5}.palette-primary-blue .project{background:#5677fc}.palette-primary-light-blue .project{background:#03a9f4}.palette-primary-cyan .project{background:#00bcd4}.palette-primary-teal .project{background:#009688}.palette-primary-green .project{background:#259b24}.palette-primary-light-green .project{background:#7cb342}.palette-primary-lime .project{background:#c0ca33}.palette-primary-yellow .project{background:#f9a825}.palette-primary-amber .project{background:#ffb300}.palette-primary-orange .project{background:#fb8c00}.palette-primary-deep-orange .project{background:#ff7043}.palette-primary-brown .project{background:#795548}.palette-primary-grey .project{background:#757575}.palette-primary-blue-grey .project{background:#546e7a}} \ No newline at end of file diff --git a/material/base.html b/material/base.html index 7897f1586..fd537cdfb 100644 --- a/material/base.html +++ b/material/base.html @@ -25,156 +25,71 @@ {% endif %} {% endblock %} - - - - - - - {% if config.extra.logo %} - - {% endif %} - {% set icon = icon | default("assets/images/favicon-e565ddfa3b.ico") %} - - - - {% if config.extra.palette %} - - {% endif %} - {% if config.extra.font != "none" %} - {% set text = config.extra.get("font", {}).text | default("Ubuntu") %} - {% set code = config.extra.get("font", {}).code | default("Ubuntu Mono") %} - {% set font = text + ':400,700|' + code | replace(' ', '+') %} - - - {% endif %} + + {% for path in extra_css %} {% endfor %} - - {% block extrahead %}{% endblock %} + - {% set palette = config.extra.get("palette", {}) %} - {% set primary = palette.primary | replace(' ', '-') | lower %} - {% set accent = palette.accent | replace(' ', '-') | lower %} - - {% if repo_name == "GitHub" and repo_url %} - {% set repo_id = repo_url | replace("https://github.com/", "") %} - {% if repo_id[-1:] == "/" %} - {% set repo_id = repo_id[:-1] %} - {% endif %} - {% endif %} -
-
-
- - - -
- {% include "header.html" %} -
-
- {% set h1 = "\x3ch1 id=" in content %} -
- {% include "drawer.html" %} -
-
-
- {% if not h1 %} -

{{ page_title | default(site_name, true)}}

+ + + + + {% include "header.html" %} +
+
+
+ {% set h1 = "\x3ch1 id=" in content %} + {% if nav %} + {% include "nav.html" %} {% endif %} - {{ content }} - - {% block footer %} -
- {% include "footer.html" %} -
- {% endblock %} -
-
-
-
-
-
-
+ {% if toc %} + {% include "toc.html" %} + {% endif %} +
+
+ {{ content }} +
+ + {% if copyright %} + {{ copyright }} – + {% endif %} + This document was created with + MkDocs + and the + Material + theme. + +
-
-
+ + {% include "footer.html" %} + - + {% for path in extra_javascript %} {% endfor %} - {% if google_analytics %} - - {% endif %} \ No newline at end of file diff --git a/material/drawer.html b/material/drawer.html deleted file mode 100644 index 718dd0bc2..000000000 --- a/material/drawer.html +++ /dev/null @@ -1,69 +0,0 @@ - \ No newline at end of file diff --git a/material/footer.html b/material/footer.html index 660b28f67..1fa656092 100644 --- a/material/footer.html +++ b/material/footer.html @@ -1,42 +1,38 @@ -{% if include_next_prev %} - - -{% endif %} \ No newline at end of file + {% endif %} + \ No newline at end of file diff --git a/material/header.html b/material/header.html index f910b5b8d..c3b0fe535 100644 --- a/material/header.html +++ b/material/header.html @@ -1,54 +1,17 @@ - \ No newline at end of file + + \ No newline at end of file diff --git a/material/manifest.json b/material/manifest.json index d1032f1ac..afc12c110 100644 --- a/material/manifest.json +++ b/material/manifest.json @@ -1,7 +1,6 @@ { "assets/images/favicon.ico": "assets/images/favicon-e565ddfa3b.ico", - "assets/javascripts/application.js": "assets/javascripts/application-997097ee0c.js", - "assets/javascripts/modernizr.js": "assets/javascripts/modernizr-4ab42b99fd.js", - "assets/stylesheets/application.css": "assets/stylesheets/application-20d5debb47.css", - "assets/stylesheets/palettes.css": "assets/stylesheets/palettes-05ab2406df.css" + "assets/javascripts/application.js": "assets/javascripts/application-a7f7c32389.js", + "assets/javascripts/modernizr.js": "assets/javascripts/modernizr-d1e05123d4.js", + "assets/stylesheets/application.css": "assets/stylesheets/application-fe75383308.css" } \ No newline at end of file diff --git a/material/nav-item.html b/material/nav-item.html new file mode 100644 index 000000000..4375949cb --- /dev/null +++ b/material/nav-item.html @@ -0,0 +1,32 @@ +{% if nav_item.children %} +
  • + {% if nav_item.active %} + + {% else %} + + {% endif %} + +
      + {% for nav_item in nav_item.children %} + {% set temp = path %} + {% set path = path + "-" + loop.index | string %} + {% include "nav-item.html" %} + {% set path = temp %} + {% endfor %} +
    +
  • +{% else %} +
  • + {% if nav_item.active %} + + {{ nav_item.title }} + + {% else %} + + {{ nav_item.title }} + + {% endif %} +
  • +{% endif %} \ No newline at end of file diff --git a/material/nav.html b/material/nav.html index c926c085b..e2fd8866c 100644 --- a/material/nav.html +++ b/material/nav.html @@ -1,32 +1,13 @@ -{% if nav_item.children %} -
  • - {{ nav_item.title }} -
      - {% for nav_item in nav_item.children %} - {% include "nav.html" %} - {% endfor %} -
    -
  • -{% else %} -
  • - - {{ nav_item.title }} - - {% if nav_item == current_page %} - {% if h1 %} - {% set toc = (toc | first).children %} - {% endif %} - {% if toc and (toc | first) %} - - {% endif %} - {% endif %} -
  • -{% endif %} \ No newline at end of file +
    +
    + +
    +
    \ No newline at end of file diff --git a/material/toc-item.html b/material/toc-item.html new file mode 100644 index 000000000..36abc89c0 --- /dev/null +++ b/material/toc-item.html @@ -0,0 +1,12 @@ +
  • + + {{ toc_item.title }} + + {% if toc_item.children %} +
      + {% for toc_item in toc_item.children %} + {% include "toc-item.html" %} + {% endfor %} +
    + {% endif %} +
  • \ No newline at end of file diff --git a/material/toc.html b/material/toc.html new file mode 100644 index 000000000..48a3015ac --- /dev/null +++ b/material/toc.html @@ -0,0 +1,17 @@ +
    +
    + +
    +
    \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 951a5cc05..81f691c6e 100755 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -29,29 +29,34 @@ repo_name: GitHub repo_url: https://github.com/squidfunk/mkdocs-material # Copyright -copyright: Copyright (c) 2016 Martin Donath +copyright: 'Copyright © 2016 Martin Donath' # Documentation and theme theme_dir: material +theme: amelia # Options extra: - version: 0.2.1 + version: 0.2.4 logo: images/logo.png + font: + text: Ubuntu + mono: Ubuntu Mono author: github: squidfunk twitter: squidfunk # Extensions markdown_extensions: - - codehilite(css_class=code) + - codehilite - admonition - toc: - permalink: '#' + permalink: '¶' # Page tree pages: - Material: index.md - Getting started: getting-started.md + - Specimen: specimen.md - Customization: customization.md - License: license.md \ No newline at end of file diff --git a/package.json b/package.json index cb55b795c..7b7465c6b 100644 --- a/package.json +++ b/package.json @@ -16,8 +16,14 @@ "url": "https://github.com/squidfunk/mkdocs-material.git" }, "private": true, + "dependencies": { + "fastclick": "^1.0.6", + "whatwg-fetch": "^1.0.0" + }, "devDependencies": { "autoprefixer": "^6.3.2", + "babel-loader": "^6.2.4", + "babel-preset-es2015": "^6.13.2", "css-mqpacker": "^4.0.0", "del": "^2.2.0", "gulp": "^3.9.1", @@ -40,6 +46,8 @@ "gulp-util": "^3.0.7", "node-notifier": "^4.5.0", "vinyl-paths": "^2.1.0", + "webpack": "^1.13.1", + "webpack-stream": "^3.2.0", "yargs": "^3.32.0" } } diff --git a/src/404.html b/src/404.html new file mode 100644 index 000000000..2fd9f9570 --- /dev/null +++ b/src/404.html @@ -0,0 +1 @@ +TBD \ No newline at end of file diff --git a/src/assets/javascripts/application.js b/src/assets/javascripts/application.js index d1ffbec30..ab3260204 100644 --- a/src/assets/javascripts/application.js +++ b/src/assets/javascripts/application.js @@ -20,41 +20,18 @@ * IN THE SOFTWARE. */ -/* Hey, there's your missing semicolon, lunr.js! */ -; - -/* Truncate a string after the given number of characters */ -String.prototype.truncate = function(n) { - if (this.length > n) { - while (this[n] != ' ' && --n > 0); - return this.substring(0, n) + '…'; - } - return this; -} - -/* Wrap an HTMLElement around each element in an HTMLElement array */ -HTMLElement.prototype.wrap = function (elms) { - if (!elms.length) elms = [elms]; - for (var i = elms.length - 1; i >= 0; i--) { - var child = (i > 0) ? this.cloneNode(true) : this; - var el = elms[i]; - - /* Cache current parent and sibling */ - var parent = el.parentNode, - sibling = el.nextSibling; - - /* Wrap the element and remove it from its current parent */ - child.appendChild(el); - if (sibling) { - parent.insertBefore(child, sibling); - } else { - parent.appendChild(child); - } - } -} +'use strict'; /* ---------------------------------------------------------------------------- - * Application logic + * Imports + * ------------------------------------------------------------------------- */ + +import FastClick from 'fastclick'; +import Sidebar from './components/sidebar'; +import ScrollSpy from './components/scrollspy'; + +/* ---------------------------------------------------------------------------- + * Application * ------------------------------------------------------------------------- */ /* Initialize application upon DOM ready */ @@ -74,457 +51,24 @@ document.addEventListener('DOMContentLoaded', function() { /* Attack FastClick to mitigate 300ms delay on touch devices */ FastClick.attach(document.body); - /* Grab relevant elements from the DOM */ - var toggle = document.getElementById('toggle-search'), - reset = document.getElementById('reset-search'), - drawer = document.querySelector('.drawer'), - anchors = document.querySelectorAll('.anchor'), - search = document.querySelector('.search .field'), - query = document.querySelector('.query'), - meta = document.querySelector('.results .meta'); -/* ---------------------------------------------------------------------------- - * Initialize drawer - * ------------------------------------------------------------------------- */ - - /* Automatically close drawer when anchors are clicked */ - Array.prototype.forEach.call(anchors, function(item) { - item.querySelector('a').addEventListener('click', function() { - document.getElementById('toggle-drawer').checked = false; - document.body.classList.remove('toggle-drawer'); - }); - }); - - /* Align drawer to window offset */ - var pageYOffsetLast = window.pageYOffset; - var align = function() { - var boundary = window.pageYOffset + window.innerHeight; - var clipping = Math.max(0, window.innerHeight - drawer.offsetHeight); - - /* Ensure alignment with footer if at end of document */ - if (boundary > document.body.clientHeight - (96 - clipping)) { - if (drawer.style.position != 'absolute') { - drawer.style.position = 'absolute'; - drawer.style.top = null; - drawer.style.bottom = 0; - } - - /* Pin drawer to top, if window is higher than drawer */ - } else if (drawer.offsetHeight < window.innerHeight) { - if (drawer.style.position != 'fixed') { - drawer.style.position = 'fixed'; - drawer.style.top = 0; - drawer.style.bottom = null; - } - - /* If the drawer is not pinned, check if we need to pin it */ - } else if (drawer.style.position != 'fixed') { - - /* Pin drawer to bottom of window */ - if (boundary > drawer.offsetTop + drawer.offsetHeight) { - drawer.style.position = 'fixed'; - drawer.style.top = null; - drawer.style.bottom = -96 + 'px'; - - /* Pin drawer to top of window */ - } else if (window.pageYOffset < drawer.offsetTop) { - drawer.style.position = 'fixed'; - drawer.style.top = 0; - drawer.style.bottom = null; - } - - /* If the drawer is pinned, check if we have to unpin it */ + var width = window.matchMedia("(min-width: 1200px)"); + var handler = function() { + if (width.matches) { + sidebar.listen(); } else { - if (window.pageYOffset > pageYOffsetLast) { - if (drawer.style.top) { - drawer.style.position = 'absolute'; - drawer.style.top = Math.max(0, pageYOffsetLast) + 'px'; - drawer.style.bottom = null; - } - } else if (drawer.style.bottom) { - drawer.style.position = 'absolute'; - drawer.style.top = (boundary - drawer.offsetHeight) + 'px'; - drawer.style.bottom = null; - } - } - - /* Update last offset (mitigiate negative offsets in Safari) */ - pageYOffsetLast = Math.max(0, window.pageYOffset); - } - - /* Check for media query events */ - var check = function() { - var main = document.querySelector('.main'); - window.removeEventListener('scroll', align); - - /* Reset drawer position when entering collapsed mode */ - if (matchMedia("only screen and (max-width: 959px)").matches) { - drawer.style.position = null; - drawer.style.top = null; - drawer.style.bottom = null; - - /* Check if the scroll handler needs to be registered */ - } else if (drawer.offsetHeight + 96 < main.offsetHeight) { - window.addEventListener('scroll', align); - align(); + sidebar.unlisten(); } } - /* Register resize handler and fire once */ - if (!Modernizr.ios) { - window.addEventListener('resize', check); - check(); - } + var sidebar = new Sidebar('.md-sidebar--primary'); + handler(); // check listen! -/* ---------------------------------------------------------------------------- - * Initialize search index - * ------------------------------------------------------------------------- */ + var toc = new Sidebar('.md-sidebar--secondary'); + toc.listen(); - /* Initialize index */ - var initialize = function() { - pegasus(base_url + '/mkdocs/search_index.json').then( + var spy = new ScrollSpy('.md-nav--toc .md-nav__item a'); + spy.listen(); - /* Request successful, we got the index */ - function(data, xhr) { - - /* Create index */ - var index = lunr(function() { - this.field('title', { boost: 10 }); - this.field('text'); - this.ref('location'); - }); - - /* Index articles */ - var articles = {}; - data.docs.map(function(article) { - article.location = base_url + article.location; - articles[article.location] = article; - index.add(article); - }); - - /* Register keyhandler to execute search on key up */ - query.addEventListener('keyup', function() { - var container = document.querySelector('.results .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 */ - var results = index.search(query.value); - results.map(function(result) { - var article = articles[result.ref]; - - /* Create article container */ - var teaser = document.createElement('article'); - teaser.classList.add('result'); - - /* Create title element */ - var title = document.createElement('h1'); - title.innerHTML = article.title; - teaser.appendChild(title); - - // /* Create text element */ - // var text = document.createElement('p'); - // text.innerHTML = article.text.truncate(140); - // teaser.appendChild(text); - - /* Create a link referring to the article */ - var link = document.createElement('a'); - link.href = article.location; - link.appendChild(teaser); - - /* Create url element */ - var url = document.createElement('span'); - url.innerHTML = link.href.split('#')[0]; - teaser.appendChild(url); - - /* Close search and jump to anchor when on same page */ - var parts = link.href.split('#'); - if (parts[0] == document.location.href.split('#')[0]) { - link.addEventListener('click', function(e) { - document.body.classList.remove('toggle-search'); - document.body.classList.remove('locked'); - toggle.checked = false; - - /* Don't catch anchors if the search doesn't cover the page */ - if (matchMedia('only screen and (min-width: 960px)').matches) - return; - - /* Prevent default to intercept scroll-to behaviour and - stop propagation, as this interferes with the link-lock in - the web application context, which opens all internal links - inside the same context */ - e.preventDefault(); - e.stopPropagation(); - - /* Scroll to chapter, if given */ - if (parts.length != 1) { - var chapter = document.getElementById(parts[1]); - if (chapter) { - - /* Scroll to chapter, but wait for 100ms to prevent flashes - on iOS. A short timeout seems to do the trick */ - setTimeout(function() { - chapter.scrollIntoView && chapter.scrollIntoView() || - window.scrollTo(0, chapter.offsetTop); - }, 100); - } - } - }); - } - - /* Add article to search results */ - container.appendChild(link); - }); - - /* Show number of search results */ - var number = document.createElement('strong'); - number.innerHTML = results.length + ' search result' - + (results.length != 1 ? 's' : ''); - - /* Update number */ - while (meta.firstChild) - meta.removeChild(meta.firstChild); - meta.appendChild(number); - }); - }, - - /* Handle error */ - function(data, xhr) { - console.error(data, xhr.status); - } - ); - - /* Remove listener, as we only have to initialize once */ - toggle.removeEventListener('click', initialize); - }; - - /* Initialize on first click */ - toggle.addEventListener('click', initialize); - -/* ---------------------------------------------------------------------------- - * Initialize search modal - * ------------------------------------------------------------------------- */ - - /* Intercept click on search mode toggle */ - var offset = 0; - toggle.addEventListener('click', function(e) { - var list = document.body.classList; - var lock = !matchMedia('only screen and (min-width: 960px)').matches; - - /* Exiting search mode */ - if (list.contains('locked')) { - list.remove('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); - - /* Entering search mode */ - } else { - offset = window.scrollY; - - /* First timeout: scroll to top after transition, to omit flickering */ - if (lock) - setTimeout(function(){ - 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() { - - /* 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 (lock) - list.add('locked'); - setTimeout(function() { - query.focus(); - }, 200); - } - }.bind(this), 450); - } - }); - - /* Dispatch input focus on touch of search section */ - search.addEventListener('touchstart', function() { - query.focus(); - }); - - /* Exit search mode when pressing ESC */ - window.addEventListener('keyup', function(e) { - var code = e.keyCode || e.which; - if (code == 27) { - query.blur(); - - /* Exit locked state */ - document.body.classList.remove('toggle-search'); - document.body.classList.remove('locked'); - toggle.checked = false; - } - }); - - /* Delete search results upon click on "x" */ - var empty = document.getElementById('reset-search'); - empty.addEventListener('click', function() { - var container = document.querySelector('.results .list'); - while (container.firstChild) - container.removeChild(container.firstChild); - - /* Hide search button */ - var bar = document.querySelector('.bar.search'); - bar.classList.remove('non-empty'); - - /* Reset number of search results */ - meta.innerHTML = ''; - - /* Empty search input */ - query.value = ''; - query.focus(); - }); - -/* ---------------------------------------------------------------------------- - * Initialize scroll spy - * ------------------------------------------------------------------------- */ - - /* Retrieve vertical offset of article chapters */ - var chapters = document.querySelectorAll('h2'); - chapters = Array.prototype.map.call(chapters, function(item) { - return item.offsetTop; - }); - - /* Update currently active chapter, if the new chapter is two thirds - into the viewport - account for iOS web application context */ - var visible = null; - document.addEventListener('scroll', function() { - var offset = window.scrollY + (window.innerHeight / 3), - active = chapters.length - 1; - for (var c = 0; c < active; c++) - if (offset < chapters[c + 1]) - active = c; - - /* Update anchors, if a new chapter became visible */ - if (active != visible) { - visible = active; - Array.prototype.forEach.call(anchors, function(item, index) { - var link = item.querySelector('a'); - if (index != visible || link.classList.add('current')) - link.classList.remove('current'); - }); - } - }); - -/* ---------------------------------------------------------------------------- - * Fix syntax highlighting - * ------------------------------------------------------------------------- */ - - /* Fix highlighting for function calls */ - var functions = document.querySelectorAll('.n + .p'); - Array.prototype.forEach.call(functions, function(item) { - var text = item.innerText || item.textContent; - if (text && text[0] == '(') - item.previousSibling.classList.add('f'); - }); - -/* ---------------------------------------------------------------------------- - * Progressive structure enhancement - * ------------------------------------------------------------------------- */ - - /* Wrap all data tables */ - var tables = document.querySelectorAll('table'); - Array.prototype.forEach.call(tables, function(item) { - var wrapper = document.createElement('div'); - wrapper.classList.add('data'); - wrapper.wrap(item); - }); - -/* ---------------------------------------------------------------------------- - * Fix overflow scrolling on iOS - * ------------------------------------------------------------------------- */ - - /* Force 1px scroll offset to trigger overflow scrolling */ - if (Modernizr.ios) { - var scrollable = document.querySelectorAll( - '.scrollable, .standalone .article'); - Array.prototype.forEach.call(scrollable, function(item) { - item.addEventListener('touchstart', function() { - var top = this.scrollTop; - - /* We're at the top of the container */ - if (top == 0) { - this.scrollTop = 1; - - /* We're at the bottom of the container */ - } else if (top + this.offsetHeight == this.scrollHeight) { - this.scrollTop = top - 1; - } - }); - }); - } - - /* Prevent scrolling on project, overlay and header */ - var prevented = document.querySelectorAll('.project, .overlay, .header'); - Array.prototype.forEach.call(prevented, function(item) { - item.addEventListener('touchmove', function(e) { - e.preventDefault(); - }); - }); - -/* ---------------------------------------------------------------------------- - * Fallback for browsers that don't support :checked - * ------------------------------------------------------------------------- */ - - /* Set representative class on body for active toggle */ - var toggles = document.querySelectorAll('.toggle'); - Array.prototype.forEach.call(toggles, function(item) { - item.addEventListener('click', function() { - document.body.classList.toggle(this.id); - }); - }); - -/* ---------------------------------------------------------------------------- - * Initialize GitHub star button - * ------------------------------------------------------------------------- */ - - /* Get Stars for current repository */ - if (repo_id) { - pegasus('https://api.github.com/repos/' + repo_id).then( - - /* Request successful, we got the stars */ - function(data, xhr) { - var count = data.stargazers_count; - if (count > 10000) - count = (count / 1000).toFixed(0) + 'k'; - else if (count > 1000) - count = (count / 1000).toFixed(1) + 'k'; - - /* Set number of stars */ - var stars = document.querySelector('.repo-stars .count'); - stars.innerHTML = count; - }, - - /* Handle error */ - function(data, xhr) { - console.error(data, xhr.status); - } - ); - } + window.addEventListener('resize', handler); }); \ No newline at end of file diff --git a/src/assets/javascripts/components/scrollspy.js b/src/assets/javascripts/components/scrollspy.js new file mode 100644 index 000000000..1209d7bc9 --- /dev/null +++ b/src/assets/javascripts/components/scrollspy.js @@ -0,0 +1,127 @@ +/* + * 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'; + +/* ---------------------------------------------------------------------------- + * Sidebar scroll-spy + * ------------------------------------------------------------------------- */ + +class ScrollSpy { + + /** + * Constructor + * + * @constructor + * @param {(string|HTMLCollection)} el - Selector or HTML elements + */ + constructor(el) { + this.el_ = (typeof el === 'string') ? document.querySelectorAll(el) : el; + + /* Initialize index for currently active element */ + this.index_ = 0; + this.offset_ = window.pageYOffset; + + /* Event listener */ + this.handler_ = (ev) => { + this.update(ev); + }; + } + + /** + * Update state of sidebar and hash + * + * @param {Event} ev - Event + */ + update(ev) { + let index = this.index_; + + /* Scroll direction is down */ + if (this.offset_ <= window.pageYOffset) { + for (let i = this.index_; i < this.el_.length; i++) { + let anchor = document.querySelector(this.el_[i].hash); + if (anchor.offsetTop <= window.pageYOffset) { + if (i > 0) + this.el_[i - 1].classList.add('md-nav__link--marked'); + this.index_ = i; + } else { + break; + } + } + + /* Scroll direction is up */ + } else { + for (let i = this.index_; i >= 0; i--) { + let 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'); + } else { + this.index_ = i; + break; + } + } + } + + /* Remember current offset for next cycle */ + this.offset_ = window.pageYOffset; + } + + /** + * Reset state of sidebar + */ + reset() { + [].forEach.call(this.el_, (el) => { + el.classList.remove('md-nav__link--marked'); + }); + }; + + /** + * Register listener for all relevant events + */ + listen() { + ['scroll', 'resize', 'orientationchange'].forEach((name) => { + window.addEventListener(name, this.handler_, false); + }); + + /* Initial update */ + this.update(); + }; + + /** + * Unregister listener for all relevant events + */ + unlisten() { + ['scroll', 'resize', 'orientationchange'].forEach((name) => { + window.removeEventListener(name, this.handler_, false); + }); + + /* Perform reset */ + this.reset(); + }; +} + +/* ---------------------------------------------------------------------------- + * Exports + * ------------------------------------------------------------------------- */ + +export default ScrollSpy; \ No newline at end of file diff --git a/src/assets/javascripts/components/sidebar.js b/src/assets/javascripts/components/sidebar.js new file mode 100644 index 000000000..560ee35c5 --- /dev/null +++ b/src/assets/javascripts/components/sidebar.js @@ -0,0 +1,131 @@ +/* + * 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'; + +/* ---------------------------------------------------------------------------- + * Sidebar sticky-scroll handler + * ------------------------------------------------------------------------- */ + +class Sidebar { + + /** + * Constructor + * + * @constructor + * @param {(string|HTMLElement)} el - Selector or HTML element + */ + constructor(el) { + this.el_ = (typeof el === 'string') ? document.querySelector(el) : el; + + /* Initialize parameters */ + this.height_ = 0; + this.locked_ = false; + + /* Event listener */ + this.handler_ = (ev) => { + this.update(ev); + }; + }; + + /** + * Update state and height of sidebar + * + * @param {Event} ev - Event + */ + update(ev) { + let container = this.el_.parentNode; + let bounds = container.getBoundingClientRect(); + + /* Determine top and bottom offsets */ + let 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; + + /* Calculate new bounds */ + let offset = top - upper; + let height = window.innerHeight - Math.max(lower - bottom, 0) + - Math.max(offset, container.parentNode.offsetTop); + + /* If height changed, update element */ + if (height != this.height_) + this.el_.style.height = (this.height_ = height) + 'px'; + + /* Sidebar should be locked, as we're below parent offset */ + if (offset < container.parentNode.offsetTop) { + if (!this.locked_) { + 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; + } + }; + + /** + * Reset state and height of sidebar + */ + reset() { + this.el_.classList.remove('md-js__sidebar--locked'); + this.el_.style.height_ = ''; + + /* Reset parameters */ + this.height_ = 0; + this.locked_ = false; + }; + + /** + * Register listener for all relevant events + */ + listen() { + ['scroll', 'resize', 'orientationchange'].forEach((name) => { + window.addEventListener(name, this.handler_, false); + }); + + /* Initial update */ + this.update(); + }; + + /** + * Unregister listener for all relevant events + */ + unlisten() { + ['scroll', 'resize', 'orientationchange'].forEach((name) => { + window.removeEventListener(name, this.handler_, false); + }); + + /* Perform reset */ + this.reset(); + }; +} + +/* ---------------------------------------------------------------------------- + * Exports + * ------------------------------------------------------------------------- */ + +export default Sidebar; \ No newline at end of file diff --git a/src/assets/javascripts/standalone.js b/src/assets/javascripts/standalone.js deleted file mode 100644 index 0ed044874..000000000 --- a/src/assets/javascripts/standalone.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ - -/* ---------------------------------------------------------------------------- - * Taken and adapted from https://gist.github.com/kylebarrow/1042026 - * ------------------------------------------------------------------------- */ - -/* Detect standalone mode */ -if (('standalone' in window.navigator) && window.navigator.standalone) { - - /* If you want to prevent remote links in standalone web apps opening - Mobile Safari, change 'remotes' to true */ - var node, remotes = false; - - /* Bind to document */ - document.addEventListener('click', function(event) { - node = event.target; - - /* Bubble up until we hit link or top HTML element. Warning: BODY element - is not compulsory so better to stop on HTML */ - while (node.nodeName !== 'A' && node.nodeName !== 'HTML') { - node = node.parentNode; - } - if ('href' in node && node.href.indexOf('http') !== -1 && ( - node.href.indexOf(document.location.host) !== -1 || remotes)) { - event.preventDefault(); - document.location.href = node.href; - } - }, false); -} \ No newline at end of file diff --git a/src/assets/stylesheets/_config.scss b/src/assets/stylesheets/_config.scss new file mode 100644 index 000000000..d972d9235 --- /dev/null +++ b/src/assets/stylesheets/_config.scss @@ -0,0 +1,82 @@ +/* + * 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. + */ + +/* ---------------------------------------------------------------------------- + * Typography + * ------------------------------------------------------------------------- */ + +/* + * Modular typographic scale + */ +$ms-base: 1.6rem; +$ms-ratio: $major-third; + +/* ---------------------------------------------------------------------------- + * Breakpoints + * ------------------------------------------------------------------------- */ + +/* + * Device-specific breakpoints + */ +$break-devices: ( + mobile: ( + portrait: px2em(220px) px2em(479px), + landscape: px2em(480px) px2em(719px) + ), + tablet: ( + portrait: px2em(720px) px2em(959px), + landscape: px2em(960px) px2em(1199px) + ), + screen: ( + small: px2em(1200px) px2em(1599px), + medium: px2em(1600px) px2em(1999px), + large: px2em(2000px) + ) +); + +/* ---------------------------------------------------------------------------- + * Colors + * ------------------------------------------------------------------------- */ + +/* + * Primary and accent colors + */ +$md-color-primary: $indigo-500; +$md-color-primary--light: $indigo-100; +$md-color-primary--dark: $indigo-700; +$md-color-accent: $indigo-a200; + +/* + * Shades of black + */ +$md-color-black: rgba(black, 0.87); +$md-color-black--light: rgba(black, 0.54); +$md-color-black--lighter: rgba(black, 0.26); +$md-color-black--lightest: rgba(black, 0.07); + +/* + * Shades of white + */ +$md-color-white: rgba(white, 1.00); +$md-color-white--light: rgba(white, 0.70); +$md-color-white--lighter: rgba(white, 0.30); +$md-color-white--lightest: rgba(white, 0.12); \ No newline at end of file diff --git a/src/assets/stylesheets/_highlight.scss b/src/assets/stylesheets/_highlight.scss deleted file mode 100644 index 3e09457be..000000000 --- a/src/assets/stylesheets/_highlight.scss +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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. - */ - -/* ---------------------------------------------------------------------------- - * Code highlighter - * ------------------------------------------------------------------------- */ - -/* - * Code block - */ -pre { - background: rgba($black, 0.05); - - /* - * Ensure correct color - */ - &, code { - color: $black; - } -} - -/* - * Operators and comments - */ -.o, .c, .c1, .cm { - color: $black-light; -} - -/* - * Keywords - */ -.k, .kn { - color: #A71D5D; -} - -/* - * Types and functions - */ -.kt, .kd, .n.f { - color: #0086B3; -} - -/* - * Strings - */ -.s, .s1 { - color: #183691; -} - -/* - * Constants and numbers - */ -.mi, .bp { - color: #9575CD; -} \ No newline at end of file diff --git a/src/assets/stylesheets/_palette.scss b/src/assets/stylesheets/_palette.scss deleted file mode 100644 index 3629d28af..000000000 --- a/src/assets/stylesheets/_palette.scss +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ - -/* ---------------------------------------------------------------------------- - * Palette - * ------------------------------------------------------------------------- */ - -/* - * Primary and accent color - */ -$primary: $red-400 !default; -$accent: $teal-a700 !default; - -/* - * Black opacities - */ -$black: rgba(black, 0.87); -$black-light: rgba(black, 0.54); -$black-lighter: rgba(black, 0.26); -$black-lightest: rgba(black, 0.12); - -/* - * White opacities - */ -$white: rgba(white, 1.00); -$white-light: rgba(white, 0.70); -$white-lighter: rgba(white, 0.30); -$white-lightest: rgba(white, 0.12); \ No newline at end of file diff --git a/src/assets/stylesheets/application.scss b/src/assets/stylesheets/application.scss index dc02b3c01..c5e40f3c5 100644 --- a/src/assets/stylesheets/application.scss +++ b/src/assets/stylesheets/application.scss @@ -24,7 +24,7 @@ * Dependencies * ------------------------------------------------------------------------- */ -@import "bourbon"; +@import "modular-scale"; @import "quantum-colors"; @import "quantum-shadows"; @@ -32,18 +32,24 @@ * Application * ------------------------------------------------------------------------- */ -@import "reset"; -@import "palette"; -@import "highlight"; +@import "helpers/break"; +@import "helpers/px2em"; -@import "fonts/icon"; +@import "config"; -@import "mixins/break"; +@import "base/icons"; +@import "base/reset"; +@import "base/typeset"; -@import "modules/base"; -@import "modules/drawer"; -@import "modules/article"; -@import "modules/search"; +@import "layout/base"; +@import "layout/content"; +@import "layout/header"; +@import "layout/footer"; +@import "layout/nav"; +@import "layout/sidebar"; + +@import "extensions/admonition"; +@import "extensions/codehilite"; +@import "extensions/permalinks"; -@import "print"; @import "shame"; \ No newline at end of file diff --git a/src/assets/stylesheets/modules/article/_animation.scss b/src/assets/stylesheets/base/_icons.scss similarity index 66% rename from src/assets/stylesheets/modules/article/_animation.scss rename to src/assets/stylesheets/base/_icons.scss index 4a3cfb106..19b3b2301 100644 --- a/src/assets/stylesheets/modules/article/_animation.scss +++ b/src/assets/stylesheets/base/_icons.scss @@ -21,25 +21,44 @@ */ /* ---------------------------------------------------------------------------- - * Article animation + * Icon set * ------------------------------------------------------------------------- */ /* - * Fade color after highlighting + * Base icon class */ -pre span { - transition: color .25s; +.md-icon { + font-family: "Icon"; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + + /* Better Font Rendering */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } /* - * Copyright and theme information + * Build icon set */ -.copyright { - - /* - * Animate color on hover - */ - a { - transition: color .25s; +@each $name, $code in ( + "search": "e600", + "back": "e601", + "link": "e602", + "close": "e603", + "menu": "e604", + "forward": "e605", + "twitter": "e606", + "github": "e607", + "download": "e608", + "star": "e609", + "warning": "e610", + "note": "e611" +) { + .md-icon--#{$name}:before { + content: unquote("\"\\#{$code}\""); } } \ No newline at end of file diff --git a/src/assets/stylesheets/_reset.scss b/src/assets/stylesheets/base/_reset.scss similarity index 76% rename from src/assets/stylesheets/_reset.scss rename to src/assets/stylesheets/base/_reset.scss index b2f395101..52e43f79b 100644 --- a/src/assets/stylesheets/_reset.scss +++ b/src/assets/stylesheets/base/_reset.scss @@ -44,7 +44,8 @@ html { } /* - * 16px --> 10px, browser default + * Prevent adjustments of font size after orientation changes in IE and iOS + * and set base font-size to 10px for simple rem calculations. */ html { font-size: 62.5%; @@ -54,31 +55,18 @@ html { /* * Reset spacing and borders for all tags */ -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, main, -menu, nav, output, ruby, section, summary, -time, mark, audio, video { +html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, +pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, +q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, dl, dt, dd, ol, +ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, +th, td, article, aside, canvas, details, embed, figure, figcaption, footer, +header, hgroup, main, menu, nav, output, ruby, section, summary, time, mark, +audio, video { margin: 0; padding: 0; border: 0; } -/* - * Reset list styles - */ -ul { - list-style: none; -} - /* * Reset table styles */ @@ -90,22 +78,20 @@ table { /* * Reset table cell styles */ -td { +td, th { text-align: left; font-weight: normal; - vertical-align: middle; + vertical-align: top; } /* * Reset (native) button styles */ button { - outline: 0; padding: 0; - + outline: 0; + border: 0; background: transparent; - border: none; - font-size: inherit; } @@ -113,10 +99,9 @@ button { * Reset (native) input styles */ input { - @include appearance(none); - - outline: none; - border: none; + appearance: none; + outline: 0; + border: 0; } /* @@ -133,11 +118,4 @@ a { a, button, label, input { -webkit-tap-highlight-color: rgba(white, 0); -webkit-tap-highlight-color: transparent; -} - -/* - * Reset headlines - */ -h1, h2, h3, h4, h5, h6 { - font-weight: inherit; } \ No newline at end of file diff --git a/src/assets/stylesheets/base/_typeset.scss b/src/assets/stylesheets/base/_typeset.scss new file mode 100644 index 000000000..454a620c2 --- /dev/null +++ b/src/assets/stylesheets/base/_typeset.scss @@ -0,0 +1,334 @@ +/* + * 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. + */ + +/* ---------------------------------------------------------------------------- + * Font definitions + * ------------------------------------------------------------------------- */ + +/* + * Default fonts + */ +body, kbd { + font-family: "Roboto", Helvetica, Arial, sans-serif; + font-weight: 400; + font-feature-settings: "kern", "onum", "liga"; + + /* Enable font-smoothing in Webkit and FF */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + + /* + * Use system fonts, if browser doesn't support webfonts + */ + .no-fontface & { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + } +} + +/* + * Proportionally spaced fonts + */ +pre, code { + font-family: "Roboto Mono", "Courier New", Courier, monospace; + + /* + * Use system fonts, if browser doesn't support webfonts + */ + .no-fontface & { + font-family: "Courier New", Courier, monospace; + } +} + +/* ---------------------------------------------------------------------------- + * Typeset + * ------------------------------------------------------------------------- */ + +/* + * Content that is typeset + */ +.md-content--typeset { + font-size: ms(0); + line-height: 1.6; + + /* + * Body copy + */ + p { + margin: 2.0rem 0; + } + + /* + * 1st level headline + */ + h1 { + font-size: ms(3); + font-weight: 300; + line-height: 1.3; + letter-spacing: -.01em; + color: $md-color-black--light; + + /* + * Correct anchor offset + */ + &:before { + content: " "; + display: block; + padding-top: (5.6rem + 2.4rem + 3.0rem); + margin-top: -(5.6rem + 2.4rem + 3.0rem); + } + } + + /* + * 2nd level headline + */ + h2 { + font-size: ms(2); + font-weight: 300; + line-height: 1.4; + margin-top: 4.0rem; + letter-spacing: -.01em; + + /* + * Correct anchor offset + */ + &:before { + content: " "; + display: block; + padding-top: (5.6rem + 2.4rem + 0.2rem); + margin-top: -(5.6rem + 2.4rem + 0.2rem); + } + } + + /* + * 3rd level headline + */ + h3 { + font-size: ms(1); + font-weight: 400; + line-height: 1.5; + margin-top: 3.2rem; + letter-spacing: -.01em; + + /* + * Correct anchor offset + */ + &:before { + content: " "; + display: block; + padding-top: (5.6rem + 2.4rem + 0.4rem); + margin-top: -(5.6rem + 2.4rem + 0.4rem); + } + } + + /* + * 2nd + 3rd level headline + */ + h2 + h3 { + margin-top: 1.6rem; + } + + /* + * 4th, 5th and 6th level headline + */ + h4 { + font-size: ms(0); + font-weight: 700; + margin-top: 1.6rem; + letter-spacing: -.01em; + + /* + * Correct anchor offset + */ + &:before { + position: relative; + z-index: -4; + content: " "; + display: block; + padding-top: (5.6rem + 2.4rem + 0.8rem); + margin-top: -(5.6rem + 2.4rem + 0.8rem); + } + } + + /* + * 5th and 6th level headline + */ + h5, h6 { + font-size: ms(-1); + font-weight: 700; + margin-top: 1.6rem; + letter-spacing: -.01em; + color: $md-color-black--light; + + /* + * Correct anchor offset + */ + &:before { + position: relative; + z-index: -5; + content: " "; + display: block; + padding-top: (5.6rem + 2.4rem + 1.0rem); + margin-top: -(5.6rem + 2.4rem + 1.0rem); + } + } + + /* + * Overrides for 5th level headline + */ + h5 { + text-transform: uppercase; + } + + /* + * Links + */ + a { + color: $md-color-primary; + transition: color .125s; + + /* + * Active links + */ + &:hover, + &:active { + color: $md-color-accent; + } + } + + /* + * Inline code blocks + */ + code { + font-size: 85%; + font-weight: 400; + word-break: break-word; + padding: 0.1rem 0.4rem; + background: #f7f7f7; + color: #37474f; + } + + /* + * Formatted code blocks + */ + pre { + font-size: 85%; + line-height: 1.4; + padding: 1.0rem 1.2rem; + overflow-x: scroll; + background: #f7f7f7; + color: #37474f; + } + + /* + * Keyboard tags + */ + kbd { + display: inline-block; + font-size: 85%; + line-height: 1.0rem; + word-break: break-word; + padding: 0.4rem 0.5rem 0.5rem; + vertical-align: 0.1rem; + color: #555; + background-color: #FCFCFC; + border: px2rem(1px) solid #CCCCCC; + border-bottom-color: #BBBBBB; + border-radius: px2rem(3px); + box-shadow: 0 #{-(px2rem(1px))} 0 #BBBBBB inset; + } + + /* + * Smaller text + */ + small { + color: $md-color-black--light; + } + + /* + * Horizontal separators + */ + hr { + margin: 2.4rem 0; + border-bottom: px2rem(1px) dotted $md-color-black--lighter; + } + + /* + * Blockquotes, possibly nested + */ + blockquote { + padding-left: 1.2rem; + border-left: px2rem(4px) solid $md-color-black--lighter; + color: $md-color-black--light; + } + + /* + * Unordered lists + */ + ul { + list-style-type: disc; + } + + /* + * Ordered lists + */ + ol ol { + list-style-type: lower-alpha; + + /* + * Triply nested ordered list + */ + ol { + list-style-type: lower-roman; + } + } + + /* + * Unordered and ordered lists + */ + ul, ol { + margin-left: 1.0rem; + + /* + * List elements + */ + li { + margin-bottom: 1.0rem; + margin-left: 2.0rem; + + /* + * Remove margin on last element + */ + &:last-child { + margin-bottom: 0; + } + + /* + * Nested lists + */ + ul, ol { + padding-top: 1.0rem; + margin-bottom: 1.0rem; + margin-left: 1.0rem; + } + } + } +} \ No newline at end of file diff --git a/src/assets/stylesheets/modules/_article.scss b/src/assets/stylesheets/extensions/_admonition.scss similarity index 86% rename from src/assets/stylesheets/modules/_article.scss rename to src/assets/stylesheets/extensions/_admonition.scss index 0529e777a..c29d75597 100644 --- a/src/assets/stylesheets/modules/_article.scss +++ b/src/assets/stylesheets/extensions/_admonition.scss @@ -20,7 +20,6 @@ * IN THE SOFTWARE. */ -@import "article/animation"; -@import "article/appearance"; -@import "article/layout"; -@import "article/typography"; \ No newline at end of file +/* ---------------------------------------------------------------------------- + * Admonition extension + * ------------------------------------------------------------------------- */ \ No newline at end of file diff --git a/src/assets/stylesheets/extensions/_codehilite.scss b/src/assets/stylesheets/extensions/_codehilite.scss new file mode 100644 index 000000000..7a7bb7d3c --- /dev/null +++ b/src/assets/stylesheets/extensions/_codehilite.scss @@ -0,0 +1,133 @@ +/* + * 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. + */ + +/* ---------------------------------------------------------------------------- + * Codehilite extension + * ------------------------------------------------------------------------- */ + +/* + * Github-style syntax highlighting + */ +.codehilite, +.code { + + /* + * Errors + */ + .err { color: #a61717; } + + /* + * Operators + */ + .o { color: inherit; } + + /* + * Generics + */ + .ge { color: #000000; } /* Generic.Emph */ + .gr { color: #aa0000; } /* Generic.Error */ + .gh { color: #999999; } /* Generic.Heading */ + .go { color: #888888; } /* Generic.Output */ + .gp { color: #555555; } /* Generic.Prompt */ + .gs { color: inherit; } /* Generic.Strong */ + .gu { color: #aaaaaa; } /* Generic.Subheading */ + .gt { color: #aa0000; } /* Generic.Traceback */ + + /* + * Keywords + */ + .k { color: #a71d5d; } /* Keyword */ + .kc { color: #a71d5d; } /* Keyword.Constant */ + .kd { color: #a71d5d; } /* Keyword.Declaration */ + .kn { color: #a71d5d; } /* Keyword.Namespace */ + .kp { color: #a71d5d; } /* Keyword.Pseudo */ + .kr { color: #0086b3; } /* Keyword.Reserved */ + .kt { color: #0086b3; } /* Keyword.Type */ + + /* + * Comments + */ + .c { color: #969896; } /* Comment */ + .cm { color: #969896; } /* Comment.Multiline */ + .cp { color: #666666; } /* Comment.Preproc */ + .c1 { color: #969896; } /* Comment.Single */ + .cs { color: #969896; } /* Comment.Special */ + + /* + * Names + */ + .na { color: #795da3; } /* Name.Attribute */ + .na { color: #795da3; } /* Name.Attribute */ + .nb { color: #795da3; } /* Name.Builtin */ + .bp { color: #795da3; } /* Name.Builtin.Pseudo */ + .nc { color: #795da3; } /* Name.Class */ + .no { color: #795da3; } /* Name.Constant */ + .nd { color: #795da3; } /* Name.Decorator */ + .ni { color: #795da3; } /* Name.Entity */ + .ne { color: #795da3; } /* Name.Exception */ + .nf { color: #795da3; } /* Name.Function */ + .nl { color: #795da3; } /* Name.Label */ + .nn { color: #795da3; } /* Name.Namespace */ + .nt { color: #795da3; } /* Name.Tag */ + .nv { color: #795da3; } /* Name.Variable */ + .vc { color: #795da3; } /* Name.Variable.Class */ + .vg { color: #795da3; } /* Name.Variable.Global */ + .vi { color: #795da3; } /* Name.Variable.Instance */ + .ow { color: inherit; } /* Operator.Word */ + + /* + * Numbers + */ + .m { color: #0086b3; } /* Literal.Number */ + .mf { color: #0086b3; } /* Literal.Number.Float */ + .mh { color: #0086b3; } /* Literal.Number.Hex */ + .mi { color: #0086b3; } /* Literal.Number.Integer */ + .mo { color: #0086b3; } /* Literal.Number.Oct */ + .il { color: #0086b3; } /* Literal.Number.Integer.Long */ + + /* + * Strings + */ + .s { color: #183691; } /* Literal.String */ + .sb { color: #183691; } /* Literal.String.Backtick */ + .sc { color: #183691; } /* Literal.String.Char */ + .sd { color: #183691; } /* Literal.String.Doc */ + .s2 { color: #183691; } /* Literal.String.Double */ + .se { color: #183691; } /* Literal.String.Escape */ + .sh { color: #183691; } /* Literal.String.Heredoc */ + .si { color: #183691; } /* Literal.String.Interpol */ + .sx { color: #183691; } /* Literal.String.Other */ + .sr { color: #009926; } /* Literal.String.Regex */ + .s1 { color: #d01040; } /* Literal.String.Single */ + .ss { color: #990073; } /* Literal.String.Symbol */ + + /* + * Diffs + */ + .gd { color: #000000; background-color: #ffdddd; } /* Generic.Deleted */ + .gi { color: #000000; background-color: #ddffdd; } /* Generic.Inserted */ + + /* + * Miscellaneous + */ + .w { color: transparent; } /* Text.Whitespace */ +} \ No newline at end of file diff --git a/src/assets/stylesheets/_print.scss b/src/assets/stylesheets/extensions/_permalinks.scss similarity index 68% rename from src/assets/stylesheets/_print.scss rename to src/assets/stylesheets/extensions/_permalinks.scss index 1b29b8b19..f3c8caefd 100644 --- a/src/assets/stylesheets/_print.scss +++ b/src/assets/stylesheets/extensions/_permalinks.scss @@ -21,56 +21,42 @@ */ /* ---------------------------------------------------------------------------- - * Print overrides + * Permalinks extension * ------------------------------------------------------------------------- */ /* - * Print styles + * Scope in content for greater specificity */ -@media print { +.md-content { /* - * Hide non-relevant elements + * Permalink */ - .header, .drawer, .headerlink, .footer { - display: none; + .headerlink { + display: inline-block; + margin-left: 1.0rem; + opacity: 0; + color: $md-color-black--lighter; + transform: translate3d(0, 0.5rem, 0); + transition: opacity .125s .25s, + transform .25s .25s, + color .25s; } /* - * Article + * Only show permalinks in hover state */ - .article { - - /* - * Remove top spacing - */ - .wrapper { - padding-top: 0; - } - - /* - * Remove color in all code blocks - */ - pre, pre * { - color: $black !important; - } - - pre { - border: 1px solid $black-lightest; - } - - /* - * Border-radius makes this table entirely black on paper, so scrap it - */ - table { - border-radius: none; - box-shadow: none; + h1, h2, h3, h4, h5, h6 { + &:hover .headerlink { + margin-left: 1.0rem; + opacity: 1; + transform: translate3d(0, 0, 0); /* - * Color header + * Active link */ - th { - color: $primary; + &:hover { + color: $md-color-accent; } } } diff --git a/src/assets/stylesheets/fonts/_icon.scss b/src/assets/stylesheets/fonts/_icon.scss deleted file mode 100644 index e66951d91..000000000 --- a/src/assets/stylesheets/fonts/_icon.scss +++ /dev/null @@ -1,144 +0,0 @@ -/* - * 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. - */ - -/* ---------------------------------------------------------------------------- - * Font faces - defined in base.html for correct path resolution - * ------------------------------------------------------------------------- */ - -// /* -// * Icon font -// */ -// @font-face { -// font-family: 'Icon'; -// src: url('/assets/fonts/icon.eot?52m981'); -// src: url('/assets/fonts/icon.eot?#iefix52m981') format('embedded-opentype'), -// url('/assets/fonts/icon.woff?52m981') format('woff'), -// url('/assets/fonts/icon.ttf?52m981') format('truetype'), -// url('/assets/fonts/icon.svg?52m981#icon') format('svg'); -// font-weight: normal; -// font-style: normal; -// } - -/* ---------------------------------------------------------------------------- - * Representational classes - * ------------------------------------------------------------------------- */ - -/* - * Base icon class - */ -.icon { - font-family: 'Icon'; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - - /* Better Font Rendering */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -/* - * Magnifying glass - */ -.icon-search:before { - content: "\e600"; -} - -/* - * Back arrow - */ -.icon-back:before { - content: "\e601"; -} - -/* - * Link indicator - */ -.icon-link:before { - content: "\e602"; -} - -/* - * Close button - */ -.icon-close:before { - content: "\e603"; -} - -/* - * Hamburger icon - */ -.icon-menu:before { - content: "\e604"; -} - -/* - * Forward arrow - */ -.icon-forward:before { - content: "\e605"; -} - -/* - * Twitter icon - */ -.icon-twitter:before { - content: "\e606"; -} - -/* - * GitHub icon - */ -.icon-github:before { - content: "\e607"; -} - -/* - * Download icon - */ -.icon-download:before { - content: "\e608"; -} - -/* - * Star icon - */ -.icon-star:before { - content: "\e609"; -} - -/* - * Warning icon - */ -.icon-warning:before { - content: "\e610"; -} - -/* - * Star icon - */ -.icon-note:before { - content: "\e611"; -} \ No newline at end of file diff --git a/src/assets/stylesheets/mixins/_break.scss b/src/assets/stylesheets/helpers/_break.scss similarity index 70% rename from src/assets/stylesheets/mixins/_break.scss rename to src/assets/stylesheets/helpers/_break.scss index 468fa2ec7..3ef4231c2 100644 --- a/src/assets/stylesheets/mixins/_break.scss +++ b/src/assets/stylesheets/helpers/_break.scss @@ -21,29 +21,25 @@ */ /* ---------------------------------------------------------------------------- - * Defaults - * ------------------------------------------------------------------------- */ - -$break: ( - devices: ( - mobile: ( - portrait: 220px 479px, - landscape: 480px 719px - ), - tablet: ( - portrait: 720px 959px, - landscape: 960px 1199px - ), - screen: 1200px - ) -) !default; - -/* ---------------------------------------------------------------------------- - * Helper functions + * Variables * ------------------------------------------------------------------------- */ /* - * Choose minimum and maximum device widths. + * Device-specific breakpoints + * + * @type Map + */ +$break-devices: () !default; + +/* ---------------------------------------------------------------------------- + * Breakpoint helpers + * ------------------------------------------------------------------------- */ + +/* + * Choose minimum and maximum device widths + * + * @param {Map} $devices Map of devices + * @return {List} Minimum and maximum width */ @function break-select-min-max($devices) { $min: 1000000; $max: 0; @@ -59,44 +55,49 @@ $break: ( $max: max($number, $max); } } @else { - @warn "Invalid number: #{$number}"; + @error "Invalid number: #{$number}"; } } } @elseif type-of($value) == number { $min: min($value, $min); $max: null; } @else { - @warn "Invalid tuple: #{$value}"; + @error "Invalid value: #{$value}"; } } @return $min, $max; } /* - * Select minimum and maximum widths for a device breakpoint. + * Select minimum and maximum widths for a device breakpoint + * + * @param {String} $device Device + * @return {List} Minimum and maximum width */ @function break-select-device($device) { - $devices: map-get($break, devices); + $current: $break-devices; @for $n from 1 through length($device) { - @if type-of($devices) == map { - $devices: map-get($devices, nth($device, $n)); + @if type-of($current) == map { + $current: map-get($current, nth($device, $n)); } @else { - @warn "Invalid device map: #{$devices}"; + @error "Invalid device map: #{$devices}"; } } - @if type-of($devices) == list or - type-of($devices) == number { - $devices: (default: $devices); + @if type-of($current) == list or + type-of($current) == number { + $current: (default: $current); } - @return break-select-min-max($devices); + @return break-select-min-max($current); } /* ---------------------------------------------------------------------------- - * Mixins for numeric breakpoints + * Breakpoint mixins * ------------------------------------------------------------------------- */ /* - * A minimum-maximum media query breakpoint. + * A minimum-maximum media query breakpoint + * + * @param {Number|List} $breakpoint Number or number pair */ @mixin break-at($breakpoint) { @if type-of($breakpoint) == number { @@ -110,15 +111,17 @@ $break: ( @content; } } @else { - @warn "Invalid breakpoint: #{$breakpoint}"; + @error "Invalid breakpoint: #{$breakpoint}"; } } @else { - @warn "Invalid breakpoint: #{$breakpoint}"; + @error "Invalid breakpoint: #{$breakpoint}"; } } /* - * An orientation media query breakpoint. + * An orientation media query breakpoint + * + * @param {String} $breakpoint Orientation */ @mixin break-at-orientation($breakpoint) { @if type-of($breakpoint) == string { @@ -126,12 +129,14 @@ $break: ( @content; } } @else { - @warn "Invalid breakpoint: #{$breakpoint}"; + @error "Invalid breakpoint: #{$breakpoint}"; } } /* - * A maximum-aspect-ratio media query breakpoint. + * A maximum-aspect-ratio media query breakpoint + * + * @param {Number} $breakpoint Ratio */ @mixin break-at-ratio($breakpoint) { @if type-of($breakpoint) == number { @@ -139,16 +144,14 @@ $break: ( @content; } } @else { - @warn "Invalid breakpoint: #{$breakpoint}"; + @error "Invalid breakpoint: #{$breakpoint}"; } } -/* ---------------------------------------------------------------------------- - * Mixins for device breakpoints - * ------------------------------------------------------------------------- */ - /* - * A minimum-maximum media query device breakpoint. + * A minimum-maximum media query device breakpoint + * + * @param {String|List} $breakpoint Device */ @mixin break-at-device($device) { @if type-of($device) == string { @@ -162,15 +165,17 @@ $break: ( @content; } } @else { - @warn "Invalid device: #{$device}"; + @error "Invalid device: #{$device}"; } } @else { - @warn "Invalid device: #{$device}"; + @error "Invalid device: #{$device}"; } } /* - * A minimum media query device breakpoint. + * A minimum media query device breakpoint + * + * @param {String|List} $breakpoint Device */ @mixin break-from-device($device) { @if type-of($device) == string { @@ -183,12 +188,14 @@ $break: ( @content; } } @else { - @warn "Invalid device: #{$device}"; + @error "Invalid device: #{$device}"; } } /* - * A maximum media query device breakpoint. + * A maximum media query device breakpoint + * + * @param {String|List} $breakpoint Device */ @mixin break-to-device($device) { @if type-of($device) == string { @@ -196,11 +203,11 @@ $break: ( } @if type-of($device) == list { $breakpoint: break-select-device($device); - $max: nth($breakpoint, 1) - 1; + $max: nth($breakpoint, 2); @media only screen and (max-width: $max) { @content; } } @else { - @warn "Invalid device: #{$device}"; + @error "Invalid device: #{$device}"; } } \ No newline at end of file diff --git a/src/assets/stylesheets/modules/article/_typography.scss b/src/assets/stylesheets/helpers/_px2em.scss similarity index 67% rename from src/assets/stylesheets/modules/article/_typography.scss rename to src/assets/stylesheets/helpers/_px2em.scss index c657a7a29..91b45d711 100644 --- a/src/assets/stylesheets/modules/article/_typography.scss +++ b/src/assets/stylesheets/helpers/_px2em.scss @@ -21,38 +21,34 @@ */ /* ---------------------------------------------------------------------------- - * Article typography + * Pixel conversion helpers * ------------------------------------------------------------------------- */ /* - * Article + * Convert font size in px to em. + * + * @param {Number} $size Font size in px + * @param {Number} $base Base font size + * @return {Number} Font size in em */ -.article { - - /* - * Third-level headlines should be bold - */ - h3 { - font-weight: 700; - } - - /* - * Fourth-level headlines should be italic - */ - h4 { - font-weight: 400; - font-style: italic; +@function px2em($size, $base: 16px) { + @if unit($size) == px { + @return ($size / $base) * 1em; + } @else { + @error "Invalid unit: #{$size} - must be px"; } } /* - * Permalink support + * Convert font size in px to rem. + * + * @param {Number} $size Font size in px + * @return {Number} Font size in rem */ -.article { - h2, h3, h4, h5, h6 { - a { - font-weight: 400; - font-style: normal; - } +@function px2rem($size, $base: 10px) { + @if unit($size) == px { + @return ($size / $base) * 1rem; + } @else { + @error "Invalid unit: #{$size} - must be px"; } } \ No newline at end of file diff --git a/src/assets/stylesheets/layout/_base.scss b/src/assets/stylesheets/layout/_base.scss new file mode 100644 index 000000000..d1af57370 --- /dev/null +++ b/src/assets/stylesheets/layout/_base.scss @@ -0,0 +1,171 @@ +/* + * 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. + */ + +/* ---------------------------------------------------------------------------- + * Grid + * ------------------------------------------------------------------------- */ + +/* + * Stretch container to viewport + */ +html { + height: 100%; +} + +/* + * Stretch body to container and leave room for footer. + */ +body { + position: relative; + min-height: 100%; +} + +/* + * Horizontal separators + */ +hr { + display: block; + height: 1px; + padding: 0; + border: 0; +} + +/* + * Template-wide grid + */ +.md-grid { + max-width: 120rem; + margin-left: auto; + margin-right: auto; +} + +/* + * Prevent collapse of margin when setting margin on child element + */ +.md-container, +.md-main { + overflow: auto; +} + +/* + * Add top spacing to acount for header + */ +.md-main { + margin-top: 5.6rem; + + /* + * bottom spacing to account for footer + */ + &__inner { + margin-top: 3.0rem; + margin-bottom: 9.2rem; + overflow: auto; + } +} + +/* ---------------------------------------------------------------------------- + * Navigational elements + * ------------------------------------------------------------------------- */ + +/* + * Toggle checkbox (should never be visibile) + */ +.md-toggle { + display: none !important; +} + +/* + * Overlay below expanded drawer + */ +.md-overlay { + position: fixed; + top: 0; + width: 0; + height: 0; + z-index: 2; + opacity: 0; + background: $md-color-black--light; + transition: opacity .25s, + width .0s .25s, + height .0s .25s; + + /* [tablet landscape -]: Trigger overlay */ + @include break-to-device(tablet landscape) { + + /* + * Expanded drawer + */ + #md-toggle-drawer:checked ~ & { + width: 100%; + height: 100%; + opacity: 1; + transition: opacity .25s, + width .0s, + height .0s; + } + } +} + +/* ---------------------------------------------------------------------------- + * Flexible elements, implemented with table layout + * ------------------------------------------------------------------------- */ + +/* + * Flexible layout container + */ +.md-flex { + display: table; + + /* + * Flexible layout container cell/element + */ + &__cell { + display: table-cell; + vertical-align: top; + + /* + * Shrink to minimum width + */ + &--shrink { + width: 1%; + } + + /* + * Stretch to maximum width + */ + &--stretch { + display: table; + table-layout: fixed; + width: 100%; + } + } + + /* + * Apply ellipsis in case of overflowing text + */ + &__ellipsis { + display: table-cell; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } +} \ No newline at end of file diff --git a/src/assets/stylesheets/modules/drawer/_typography.scss b/src/assets/stylesheets/layout/_content.scss similarity index 69% rename from src/assets/stylesheets/modules/drawer/_typography.scss rename to src/assets/stylesheets/layout/_content.scss index 78ea4f242..49fd47138 100644 --- a/src/assets/stylesheets/modules/drawer/_typography.scss +++ b/src/assets/stylesheets/layout/_content.scss @@ -21,48 +21,40 @@ */ /* ---------------------------------------------------------------------------- - * Drawer typography + * Main content * ------------------------------------------------------------------------- */ /* - * Drawer container + * Content container */ -.drawer { +.md-content { - /* - * Links to articles - */ - .toc li a { - font-weight: 700; + /* [tablet landscape +]: Add space for table of contents */ + @include break-from-device(tablet landscape) { + margin-right: 24.2rem; + } + + /* [screen small +]: Add space for table of contents */ + @include break-from-device(screen small) { + margin-left: 24.2rem; } /* - * Links to chapters inside the current article + * Define padding */ - .toc li.anchor a { - font-weight: 400; + &__inner { + margin: 2.4rem 1.6rem; + + /* [screen small +]: Add space for table of contents */ + @include break-from-device(screen small) { + margin: 2.4rem 2.4rem; + } } /* - * Main sections + * Copyright and theme information */ - .section { - font-weight: 700; - } -} - -/* - * Repository buttons - */ -.repo a { - text-transform: uppercase; - font-weight: 700; - - /* - * Stars - */ - .count { - text-transform: none; - font-weight: 700; + &__copyright { + display: block; } } \ No newline at end of file diff --git a/src/assets/stylesheets/layout/_footer.scss b/src/assets/stylesheets/layout/_footer.scss new file mode 100644 index 000000000..ba1195f50 --- /dev/null +++ b/src/assets/stylesheets/layout/_footer.scss @@ -0,0 +1,134 @@ +/* + * 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. + */ + +/* ---------------------------------------------------------------------------- + * Footer + * ------------------------------------------------------------------------- */ + +/* + * Application footer + */ +.md-footer { + position: absolute; + width: 100%; + bottom: 0; + + /* + * Pagination container + */ + &-pagination { + background: $md-color-black; + color: $md-color-white; + } + + /* + * Link to previous and next page + */ + &-nav { + overflow: auto; + padding: 0.4rem; + + /* + * Links to previous and next page + */ + &__link { + padding-top: 2.8rem; + padding-bottom: 0.8rem; + + /* [mobile landscape +]: Set proportional width */ + @include break-from-device(mobile landscape) { + width: 50%; + } + + /* + * Link to previous page + */ + &--prev { + float: left; + width: 25%; + + /* + * Title + */ + .md-footer-nav__title { + + /* [mobile portrait -]: Hide title for previous page */ + @include break-to-device(mobile portrait) { + display: none; + } + } + } + + /* + * Link to next page + */ + &--next { + float: right; + width: 75%; + text-align: right; + } + } + + /* + * Icon + */ + &__icon { + display: inline-block; + font-size: 2.4rem; + padding: 0.8rem; + margin: 0.4rem; + cursor: pointer; + border-radius: 100%; + transition: background .25s; + + /* + * Pushed/clicked icon + */ + &:active { + background: $md-color-white--lightest; + } + } + + /* + * Title + */ + &__title { + position: relative; + padding: 0 0.4rem; + font-size: 1.8rem; + line-height: 4.8rem; + } + + /* + * Direction + */ + &__direction { + position: absolute; + left: 0; + right: 0; + padding: 0 0.4rem; + margin-top: -2.0rem; + font-size: 1.5rem; + color: $md-color-white--light; + } + } +} \ No newline at end of file diff --git a/src/assets/stylesheets/modules/base/_animation.scss b/src/assets/stylesheets/layout/_header.scss similarity index 63% rename from src/assets/stylesheets/modules/base/_animation.scss rename to src/assets/stylesheets/layout/_header.scss index 720621f68..009fcad25 100644 --- a/src/assets/stylesheets/modules/base/_animation.scss +++ b/src/assets/stylesheets/layout/_header.scss @@ -21,53 +21,57 @@ */ /* ---------------------------------------------------------------------------- - * Base animation + * Header * ------------------------------------------------------------------------- */ /* - * Animate color on hover + * Application header (stays always on top) */ -a { - transition: color .25s; -} +.md-header { + @include drop-shadow(1); -/* - * Overlay - */ -.overlay { - transition: opacity .25s, - width .0s .25s, - height .0s .25s; + position: fixed; + top: 0; + left: 0; + right: 0; + height: 5.6rem; + z-index: 1; + background: $md-color-primary; + color: $md-color-white; /* - * Expanded drawer + * Navigation within header */ - #toggle-drawer:checked ~ &, - .toggle-drawer & { - transition: opacity .25s, - width .0s, - height .0s; + &-nav { + padding: 0.4rem; + + /* + * Icon + */ + &__icon { + display: inline-block; + font-size: 2.4rem; + padding: 0.8rem; + margin: 0.4rem; + cursor: pointer; + border-radius: 100%; + transition: background .25s; + + /* + * Pushed/clicked icon + */ + &:active { + background: $md-color-white--lightest; + } + } + + /* + * Title + */ + &__title { + padding: 0 2.0rem; + font-size: 1.8rem; + line-height: 4.8rem; + } } -} - -/* - * Application header - check for javascript to omit flashing - */ -.js .header { - transition: background .6s, - color .6s; - - /* - * Status bar - */ - &:before { - transition: background .6s; - } -} - -/* - * Extended visible touch area on icon - */ -.button .icon { - transition: background .25s; } \ No newline at end of file diff --git a/src/assets/stylesheets/modules/drawer/_animation.scss b/src/assets/stylesheets/layout/_nav.scss similarity index 57% rename from src/assets/stylesheets/modules/drawer/_animation.scss rename to src/assets/stylesheets/layout/_nav.scss index 16077f9b6..43badb7ec 100644 --- a/src/assets/stylesheets/modules/drawer/_animation.scss +++ b/src/assets/stylesheets/layout/_nav.scss @@ -21,61 +21,89 @@ */ /* ---------------------------------------------------------------------------- - * Drawer animation + * Navigation * ------------------------------------------------------------------------- */ /* - * Drawer container + * Nested navigation */ -.drawer { +.md-nav { - /* [tablet landscape-]: Hide menu */ - @include break-to-device(tablet landscape) { - transform: translate3d(-262px, 0, 0); - transition: transform .25s cubic-bezier(.4, 0, .2, 1); + /* + * Set font sizes + */ + &, h3 { + font-size: ms(-1); + line-height: 1.2; + } + + /* + * Table of contents + */ + &--toc { + border-left: px2rem(4px) solid $md-color-primary; + } + + /* + * List of items + */ + &__list { + list-style: none; /* - * Just hide drawer, if browser doesn't support 3D transforms + * 2nd+ level list */ - .no-csstransforms3d & { - display: none; + & & { + margin-left: 1.2rem; + } + + /* + * Hide list by default + */ + .md-nav__toggle ~ & { + max-height: 0; + overflow: hidden; + } + + /* + * Expand list, if toggle is checked + */ + .md-nav__toggle:checked ~ & { + max-height: 100%; } } /* - * Expanded drawer + * List item */ - #toggle-drawer:checked ~ .main &, - .toggle-drawer & { - transform: translate3d(0, 0, 0); + &__item { + margin: 0.8rem 0 0; + line-height: 1.6rem; + } + + /* + * Link inside item + */ + &__link { + display: block; + overflow: hidden; + text-overflow: ellipsis; + transition: color .125s; /* - * Just show drawer, if browser doesn't support 3D transforms + * Marked item */ - .no-csstransforms3d & { - display: block; + &--marked { + color: $md-color-black--light; + } + + /* + * Current or hovered item + */ + &:hover, + &:active, + &--active { + color: $md-color-accent; } } -} - -/* - * No color transition for project link - */ -.project { - transition: none; -} - -/* - * Project logo image - */ -.project .logo img { - transition: box-shadow .4s; -} - -/* - * Repository buttons - */ -.repo a { - transition: box-shadow .4s, - opacity .4s; } \ No newline at end of file diff --git a/src/assets/stylesheets/layout/_sidebar.scss b/src/assets/stylesheets/layout/_sidebar.scss new file mode 100644 index 000000000..a142f8a40 --- /dev/null +++ b/src/assets/stylesheets/layout/_sidebar.scss @@ -0,0 +1,166 @@ +/* + * 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. + */ + +/* ---------------------------------------------------------------------------- + * Sidebar + * ------------------------------------------------------------------------- */ + +/* + * Sidebar content + */ +.md-sidebar { + position: relative; + width: 24.2rem; + float: left; + overflow: visible; + + /* + * Lock sidebar to container height (account for fixed header) + */ + &.md-js__sidebar--locked { + position: fixed; + top: 5.6rem; + } + + /* [tablet landscape -]: Convert navigation to drawer */ + @include break-to-device(tablet landscape) { + + /* + * Render primary sidebar as a slideout container + */ + &--primary { + position: fixed; + top: 0; + width: 24.2em; + height: 100%; + z-index: 3; + background: $md-color-white; + transition: transform .25s cubic-bezier(0.4, 0.0, 0.2, 1.0); + transform: translate3d(-24.2em, 0, 0); + + /* + * Just hide drawer, if browser doesn't support 3D transforms + */ + .no-csstransforms3d & { + display: none; + } + + /* + * Expanded drawer + */ + #md-toggle-drawer:checked ~ .md-container & { + transform: translate3d(0, 0, 0); + + /* + * Just show drawer, if browser doesn't support 3D transforms + */ + .no-csstransforms3d & { + display: block; + } + } + } + } + + /* + * Secondary sidebar with table of contents + */ + &--secondary { + display: none; + + /* [tablet landscape +]: Show table of contents next to body copy */ + @include break-from-device(tablet landscape) { + display: block; + float: right; + + /* + * Hack to align right in case of locked sidebar + */ + &.md-js__sidebar--locked { + margin-left: 100%; + transform: translate(-100%, 0); + + /* [screen small +]: Limit to grid */ + @include break-from-device(screen small) { + margin-left: 120rem; + } + } + } + } + + /* + * Wrapper for scrolling on overflow + */ + &__scrollwrap { + margin: 2.4rem 0.4rem; + overflow-y: scroll; + -webkit-overflow-scrolling: touch; + + /* [tablet landscape +]: Adjust margins */ + @include break-to-device(tablet landscape) { + + /* + * Adjust margins for primary scrollbar + */ + .md-sidebar--primary & { + margin: 0; + } + } + + /* + * Limit height to window, if JavaScript is available + */ + .js & { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + } + + /* + * Override native scrollbar styles + */ + &::-webkit-scrollbar { + width: 0.4rem; + height: 0.4rem; + + /* + * Style scrollbar thumb + */ + &-thumb { + background: $md-color-black--lighter; + } + } + } + + /* + * Actual sidebar content + */ + &__inner { + padding: 1.2rem; + + /* [screen small +]: Add line for reference */ + @include break-from-device(screen small) { + border-right: px2rem(1px) solid $md-color-black--lightest; + } + } +} \ No newline at end of file diff --git a/src/assets/stylesheets/modules/_base.scss b/src/assets/stylesheets/modules/_base.scss deleted file mode 100644 index 140d308fb..000000000 --- a/src/assets/stylesheets/modules/_base.scss +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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. - */ - -@import "base/animation"; -@import "base/appearance"; -@import "base/layout"; -@import "base/typography"; \ No newline at end of file diff --git a/src/assets/stylesheets/modules/_drawer.scss b/src/assets/stylesheets/modules/_drawer.scss deleted file mode 100644 index afefecffd..000000000 --- a/src/assets/stylesheets/modules/_drawer.scss +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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. - */ - -@import "drawer/animation"; -@import "drawer/appearance"; -@import "drawer/layout"; -@import "drawer/typography"; \ No newline at end of file diff --git a/src/assets/stylesheets/modules/_search.scss b/src/assets/stylesheets/modules/_search.scss deleted file mode 100644 index 77914e3b1..000000000 --- a/src/assets/stylesheets/modules/_search.scss +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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. - */ - -@import "search/animation"; -@import "search/appearance"; -@import "search/layout"; -@import "search/typography"; \ No newline at end of file diff --git a/src/assets/stylesheets/modules/article/_appearance.scss b/src/assets/stylesheets/modules/article/_appearance.scss deleted file mode 100644 index 33febaf8f..000000000 --- a/src/assets/stylesheets/modules/article/_appearance.scss +++ /dev/null @@ -1,190 +0,0 @@ -/* - * 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. - */ - -/* ---------------------------------------------------------------------------- - * Article appearance - * ------------------------------------------------------------------------- */ - -/* - * Article - */ -.article { - - /* - * Differing top and bottom rubberband backgrounds in iOS web application - */ - .ios.standalone & { - background: linear-gradient( - to bottom, $white 50%, $primary 50%); - - /* Hack [iOS]: Mitigate black bounding box with linear gradient */ - .wrapper { - background: linear-gradient( - to bottom, $white 50%, $white 50%); - } - } - - /* - * Headlines, chapters, links and inline code - */ - h1, h2, a, code { - color: $primary; - } - - /* - * Lower border for main headline - */ - h1 { - border-bottom: 1px solid $black-lightest; - } - - /* - * Underline links - */ - a { - border-bottom: 1px dotted; - } - - /* - * Hovered and focused links - */ - a:hover, a:focus { - color: $accent; - } - - /* - * Light permalinks - */ - .headerlink { - color: $black-lighter; - border: none; - } - - /* - * Data tables - */ - table { - @include drop-shadow(1); - - border-radius: 3px; - - /* - * Table heading - */ - th { - background: mix($primary, $white, 75%); - color: $white; - - /* - * Round upper left border - */ - &:first-child { - border-top-left-radius: 3px; - } - - /* - * Round upper right border - */ - &:last-child { - border-top-right-radius: 3px; - } - } - - /* - * Table cell - */ - td { - border-top: 1px solid rgba($black, 0.05); - } - } -} - -/* - * Article footer - */ -.footer { - background: $primary; - color: $white; - - /* - * Remove bottom border on links - */ - a { - border: none; - } -} - -/* - * Copyright and theme information - */ -.copyright { - color: $black-light; -} - -/* - * Pagination - */ -.pagination { - - /* - * Inherit color for links - */ - a .title, a .button { - color: $white; - } - - /* - * Smaller font size for direction - */ - .direction { - color: $white-light; - } -} - -/* - * Admonition support - */ -.admonition { - background: $light-blue-400; - color: $white; - - /* - * Embedded code blocks - */ - pre { - background: $white-lighter; - } - - /* - * A warning hint - */ - &.warning { - background: $red-400; - } - - /* - * Headlines, chapters, links and inline code - */ - a, a:hover { - color: $white; - } -} \ No newline at end of file diff --git a/src/assets/stylesheets/modules/article/_layout.scss b/src/assets/stylesheets/modules/article/_layout.scss deleted file mode 100644 index 5158b7f58..000000000 --- a/src/assets/stylesheets/modules/article/_layout.scss +++ /dev/null @@ -1,567 +0,0 @@ -/* - * 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. - */ - -/* ---------------------------------------------------------------------------- - * Article layout - * ------------------------------------------------------------------------- */ - -/* - * Article - */ -.article { - font-size: 14px; - line-height: 1.7em; - - /* [tablet landscape+]: Indent to account for drawer */ - @include break-from-device(tablet landscape) { - margin-left: 262px; - } - - /* - * Clearfix - */ - &:after { - content: " "; - display: block; - clear: both; - } - - /* - * Article wrapper - */ - .wrapper { - padding: 116px 16px 92px; - - /* [tablet portait+]: Increase top spacing */ - @include break-from-device(tablet portrait) { - padding: 128px 24px 96px; - } - } - - /* - * Enable overflow scrolling in iOS web application - */ - .ios.standalone & { - @include position(absolute, 56px 0 0 0); - - overflow: auto; - -webkit-overflow-scrolling: touch; - - /* [orientation: portrait]: Account for status bar in portrait mode */ - @include break-at-orientation(portrait) { - @include position(absolute, (56px + 20px) 0 0 0); - } - - /* - * Article wrapper - */ - .wrapper { - position: relative; - min-height: 100%; - padding-top: 60px; - margin-bottom: 2px; - } - } - - /* - * Article headline - */ - h1 { - font-size: 24px; - line-height: 1.333334em; - padding: 20px 0 42px; - } - - /* - * Article chapters - */ - h2 { - font-size: 20px; - line-height: 1.4em; - padding-top: (36px + 56px); - margin-top: (0px - 56px); - - /* - * No offset correction in iOS web application - */ - .ios.standalone & { - padding-top: 36px; - margin: 0; - } - } - - /* - * Sub headlines - */ - h3, h4 { - font-size: 14px; - padding-top: (20px + 56px); - margin-top: (0 - 56px); - - /* - * No offset correction in iOS web application - */ - .ios.standalone & { - padding-top: 20px; - margin-top: 0; - } - } - - /* - * Align permalinks on the right - */ - .headerlink { - float: right; - margin-left: 20px; - font-size: 14px; - - /* - * Hide permalink to main headline - */ - h1 & { - display: none; - } - } - - /* - * Paragraphs and section titles - */ - p, ul, ol { - margin-top: 1.5em; - } - - /* - * Smaler top spacing for nested lists - */ - li ul, li ol { - margin-top: 0.75em; - } - - /* - * List elements - */ - li { - margin-top: 0.75em; - margin-left: 18px; - - /* - * Inline paragraphs in list elements - */ - p { - display: inline; - } - } - - /* - * Add icon for elements of an unordered list - */ - ul > li:before { - content: "\e602"; - display: block; - float: left; - font-family: 'Icon'; - font-size: 16px; - width: 1.2em; - margin-left: -1.2em; - vertical-align: -0.1em; - } - - /* - * Inline code snippets must not wrap - */ - p > code { - white-space: nowrap; - } - - /* - * Add spacing at top of separator - */ - hr { - margin-top: 1.5em; - } - - /* - * Limit images to article container - */ - img { - max-width: 100%; - } - - /* - * Code listing container - */ - pre { - padding: 16px; - margin: 1.5em -16px 0; - line-height: 1.5em; - overflow: auto; - -webkit-overflow-scrolling: touch; - } - - /* - * Data tables - */ - table { - margin: 3.0em 0 1.5em; - font-size: 13px; - - /* - * The semi-cool solution, in case javascript is not available - */ - .no-js & { - display: inline-block; - max-width: 100%; - overflow: auto; - -webkit-overflow-scrolling: touch; - } - - /* - * Table heading - */ - th { - min-width: 100px; - padding: 12px 16px; - font-size: 12px; - text-align: left; - vertical-align: top; - } - - /* - * Table cell - */ - td { - padding: 12px 16px; - vertical-align: top; - } - } - - /* - * Data table wrapper, in case javascript is available - */ - .data { - margin: 1.5em -16px; - padding: 1.5em 0; - overflow: auto; - -webkit-overflow-scrolling: touch; - text-align: center; - - /* - * Data table - */ - table { - display: inline-block; - margin: 0 16px; - text-align: left; - } - - /* [tablet portait+]: Increase spacing */ - @include break-from-device(tablet portrait) { - margin: 1.5em -24px; - - /* - * Data table - */ - table { - margin: 0 24px; - } - } - } - - /* [tablet portait+]: Increase spacing */ - @include break-from-device(tablet portrait) { - - /* - * Account for larged header bar and anchors - */ - h2 { - padding-top: (28px + 72px); - margin-top: (8px - 72px); - - /* - * No offset correction in iOS web application - */ - .ios.standalone & { - padding-top: 28px; - margin-top: 8px; - } - } - - /* - * Sub headlines - */ - h3, h4 { - padding-top: (20px + 64px); - margin-top: (0 - 64px); - - /* - * No offset correction in iOS web application - */ - .ios.standalone & { - padding-top: 20px; - margin-top: 0; - } - } - - /* - * Increase spacing for code blocks - */ - pre { - padding: 1.5em 24px; - margin: 1.5em -24px 0; - } - } -} - -/* - * Article footer - */ -.footer { - position: absolute; - bottom: 0; - left: 0; - right: 0; - padding: 0 4px; - - /* [tablet portait+]: Larger spacing */ - @include break-from-device(tablet portrait) { - padding: 0 8px; - } - - /* [tablet landscape+]: Stretch footer to viewport */ - @include break-from-device(tablet landscape) { - z-index: 5; - } -} - -/* - * Copyright and theme information - */ -.copyright { - margin: 1.5em 0; - - /* [tablet landscape+]: Add bottom spacing */ - @include break-from-device(tablet landscape) { - margin-bottom: 64px; - } -} - -/* - * Pagination - */ -.pagination { - max-width: 1184px; - height: 92px; - padding: 4px 0; - margin-left: auto; - margin-right: auto; - overflow: hidden; - - /* [tablet portait+]: Larger pagination and spacing */ - @include break-from-device(tablet portrait) { - height: 96px; - padding: 8px 0; - } - - /* - * Links should span icons entirely - */ - a { - display: block; - height: 100%; - } - - /* - * Previous and next page - */ - .previous, - .next { - position: relative; - float: left; - height: 100%; - } - - /* - * Previous page - */ - .previous { - width: 25%; - - /* - * Hide direction - */ - .direction { - display: none; - } - - /* - * Hide title - */ - .stretch { - display: none; - } - } - - /* - * Next page - */ - .next { - width: 75%; - text-align: right; - } - - /* - * Link to page - */ - .page { - display: table; - position: absolute; - bottom: 4px; - } - - /* - * Put direction over page title - */ - .direction { - display: block; - position: absolute; - bottom: 40px; - width: 100%; - font-size: 15px; - line-height: 20px; - padding: 0 52px; - } - - /* - * Decrease indent for stretching content - */ - .stretch { - padding: 0 4px; - - /* - * Correct vertical spacing - */ - .title { - font-size: 18px; - padding: 11px 0 13px; - } - } - - /* [mobile landscape+]: Proportional width for pagination */ - @include break-from-device(mobile landscape) { - - /* - * Previous and next page - */ - .previous, - .next { - width: 50%; - } - - /* - * Previous page - */ - .previous { - width: 50%; - - /* - * Show direction - */ - .direction { - display: block; - } - - /* - * Show title - */ - .stretch { - display: table; - } - } - } - - /* [tablet portrait+]: Increase vertical spacing */ - @include break-from-device(tablet portrait) { - - /* - * Increase vertical spacing - */ - .direction { - padding: 0 56px; - bottom: 40px; - } - - /* - * Increase vertical spacing - */ - .stretch { - padding: 0 8px; - } - } -} - -/* - * Admonition support - */ -.admonition { - margin: 20px -16px 0; - padding: 20px 16px; - - /* - * Remove redundant margin of first child - */ - > :first-child { - margin-top: 0; - } - - /* [tablet portait+]: Increase horizontal spacing */ - @include break-from-device(tablet portrait) { - margin: 20px -24px 0; - padding: 20px 24px; - } - - /* - * Admonition title, if given - */ - .admonition-title { - font-size: 20px; - - /* - * Default icon - */ - &:before { - content: "\e611"; - display: block; - float: left; - font-family: 'Icon'; - font-size: 24px; - vertical-align: -0.1em; - margin-right: 5px; - } - } - - /* - * Warning icon - */ - &.warning .admonition-title:before { - content: "\e610"; - } -} \ No newline at end of file diff --git a/src/assets/stylesheets/modules/base/_appearance.scss b/src/assets/stylesheets/modules/base/_appearance.scss deleted file mode 100644 index 5f0870c1b..000000000 --- a/src/assets/stylesheets/modules/base/_appearance.scss +++ /dev/null @@ -1,138 +0,0 @@ -/* - * 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. - */ - -/* ---------------------------------------------------------------------------- - * Base appearance - * ------------------------------------------------------------------------- */ - -/* - * Device specific background hacks related to rubberband - */ -body { - color: $black; - - /* Hack [Chrome, Opera]: Set background color in Chrome and Opera */ - @supports (-webkit-appearance: none) { - background: $primary; - } - - /* - * Don't tint menu bar on iOS - */ - .ios & { - background: $white; - } -} - -/* - * Horizontal separators - */ -hr { - border: 0; - border-top: 1px solid $black-lightest; -} - -/* - * Toggle button - */ -.toggle-button { - cursor: pointer; - color: inherit; -} - -/* - * Backdrop - */ -.backdrop { - background: $white; - - /* [tablet landscape+]: Introduce paper with shadow */ - @include break-from-device(tablet landscape) { - background: darken($white, 5%); - } -} - -/* - * Backdrop paper with shadow - */ -.backdrop-paper:after { - background: $white; - - /* [tablet landscape+]: Add drop shadow */ - @include break-from-device(tablet landscape) { - @include drop-shadow(1); - } -} - -/* - * Overlay - */ -.overlay { - background: $black-light; - opacity: 0; - - /* - * Expanded drawer - */ - #toggle-drawer:checked ~ &, - .toggle-drawer & { - opacity: 1; - } -} - -/* - * Application header - */ -.header { - @include drop-shadow(1); - - background: $primary; - color: $white; - - /* - * Add status bar overlay for iOS web application - */ - .ios.standalone &:before { - background: $black-lightest; - } -} - -/* - * Navigation path within header bar - */ -.bar .path { - color: $white-light; -} - -/* - * Draw round area around icon on touch - */ -.button .icon { - border-radius: 100%; -} - -/* - * Pushed/clicked icon - */ -.button .icon:active { - background: $white-lightest; -} \ No newline at end of file diff --git a/src/assets/stylesheets/modules/base/_layout.scss b/src/assets/stylesheets/modules/base/_layout.scss deleted file mode 100644 index 2a4569153..000000000 --- a/src/assets/stylesheets/modules/base/_layout.scss +++ /dev/null @@ -1,363 +0,0 @@ -/* - * 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. - */ - -/* ---------------------------------------------------------------------------- - * Base layout - * ------------------------------------------------------------------------- */ - -/* - * Stretch container to viewport - */ -html { - height: 100%; -} - -/* - * Stretch body to container and leave room for sticky footer. - */ -body { - position: relative; - min-height: 100%; -} - -/* - * Horizontal separators - */ -hr { - display: block; - height: 1px; - padding: 0; - margin: 0; -} - -/* - * Lock body (e.g. in search mode) - */ -.locked { - height: 100%; - overflow: hidden; -} - -/* - * Scrollable container - */ -.scrollable { - @include position(absolute, 0 0 0 0); - - overflow: auto; - -webkit-overflow-scrolling: touch; - - /* - * Content wrapper - */ - .wrapper { - height: 100%; - - /* Hack [iOS]: Force overflow scrolling */ - .ios & { - margin-bottom: 2px; - } - } -} - -/* - * Toggle states and button - */ -.toggle { - display: none; - - /* - * Toggle button - */ - &-button { - display: block; - } -} - -/* - * Backdrop - */ -.backdrop { - @include position(absolute, 0 0 0 0); - - z-index: -1; -} - -/* - * Backdrop paper container - */ -.backdrop-paper { - max-width: 1200px; - height: 100%; - margin-left: auto; - margin-right: auto; - - /* - * Actual paper - */ - &:after { - content: " "; - display: block; - height: 100%; - margin-left: 262px; - } -} - -/* - * Overlay - */ -.overlay { - position: fixed; - top: 0; - width: 0; - height: 0; - z-index: 4; - - /* [tablet landscape-]: Trigger overlay */ - @include break-to-device(tablet landscape) { - - /* - * Expanded drawer - */ - #toggle-drawer:checked ~ &, - .toggle-drawer & { - width: 100%; - height: 100%; - } - } -} - -/* - * Application header stays always on top - */ -.header { - @include user-select(none); - - position: fixed; - top: 0; - left: 0; - z-index: 3; - height: 56px; - padding: 4px; - overflow: hidden; - - /* [tablet portait+]: Larger header bar */ - @include break-from-device(tablet portrait) { - height: 64px; - padding: 8px; - } - - /* [screen+]: Stretch to screen */ - @include break-from-device(screen) { - width: 100%; - } - - /* - * Absolute positioning in iOS web application - */ - .ios.standalone & { - position: absolute; - - /* [orientation: portrait]: Account for status bar in portrait mode */ - @include break-at-orientation(portrait) { - height: (56px + 20px); - padding-top: (4px + 20px); - - /* [tablet portait+]: Larger header bar */ - @include break-from-device(tablet portrait) { - height: (64px + 20px); - padding-top: (8px + 20px); - } - - /* - * Add status bar overlay - */ - &:before { - content: " "; - position: absolute; - top: 0; - left: 0; - z-index: 4; - width: 100%; - height: 20px; - } - } - } -} - -/* - * Header bar - */ -.bar { - display: table; - max-width: 1184px; - margin-left: auto; - margin-right: auto; - - /* - * Links should span icons entirely - */ - a { - display: block; - } - - /* - * Hide search button, in case javascript is not available. - */ - .no-js & .button-search { - display: none; - } - - /* - * Navigation path - */ - .path { - - /* - * Correct icon alignment - */ - .icon:before { - vertical-align: -1.5px; - } - - /* [tablet portait-]: Hide path */ - @include break-to-device(tablet portrait) { - display: none; - } - } -} - -/* - * Buttons - */ -.button { - display: table-cell; - vertical-align: top; - width: 1%; - - /* - * Remove native spacing on button - */ - button { - margin: 0; - padding: 0; - - /* Hack [IE]: Remove button offset in active state */ - &:active:before { - position: relative; - top: 0; - left: 0; - } - } - - /* - * Button icons - */ - .icon { - display: inline-block; - font-size: 24px; - padding: 8px; - margin: 4px; - } -} - -/* - * Hide source and twitter button - */ -.button-github, -.button-twitter { - - /* [mobile landscape-]: Hide button */ - @include break-to-device(mobile landscape) { - display: none; - } -} - -/* - * Hide menu button - */ -.button-menu { - - /* [tablet landscape+]: Hide button */ - @include break-from-device(tablet landscape) { - display: none; - } -} - -/* - * Stretch content to remaining space - */ -.stretch { - display: table; - table-layout: fixed; - width: 100%; - - /* - * Set vertical spacing for header - */ - .header & { - padding: 0 20px; - - /* [tablet portait]: Increase vertical spacing */ - @include break-at-device(tablet portrait) { - padding: 0 24px; - } - - /* [tablet portait+]: Account for missing menu icon */ - @include break-from-device(tablet portrait) { - padding: 0 (24px - 8px) 0 16px; - } - } - - /* - * Title with ellipsis on overflow - */ - .title { - display: table-cell; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - - /* - * Increase header font size - */ - .header & { - font-size: 18px; - padding: 13px 0; - - /* [tablet portait+]: Slightly larger typography in header */ - @include break-from-device(tablet portrait) { - font-size: 20px; - padding: 12px 0; - } - } - } -} - -/* - * Main content - */ -.main { - max-width: 1200px; - margin-left: auto; - margin-right: auto; -} \ No newline at end of file diff --git a/src/assets/stylesheets/modules/base/_typography.scss b/src/assets/stylesheets/modules/base/_typography.scss deleted file mode 100644 index 8548a47f3..000000000 --- a/src/assets/stylesheets/modules/base/_typography.scss +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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. - */ - -/* ---------------------------------------------------------------------------- - * Base typography - * ------------------------------------------------------------------------- */ - -/* - * Default font styles - */ -body, input { - font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; - font-weight: 400; - - /* Enable font-smoothing in Webkit and FF */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - - /* - * Use system fonts, if browser doesn't support webfonts - */ - .no-fontface & { - font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; - } -} - -/* - * Proportional fonts - */ -pre, code { - font-family: 'Courier New', 'Courier', monospace; - - /* - * Use system fonts, if browser doesn't support webfonts - */ - .no-fontface & { - font-family: 'Courier New', 'Courier', monospace; - } -} \ No newline at end of file diff --git a/src/assets/stylesheets/modules/drawer/_appearance.scss b/src/assets/stylesheets/modules/drawer/_appearance.scss deleted file mode 100644 index b4f9926a5..000000000 --- a/src/assets/stylesheets/modules/drawer/_appearance.scss +++ /dev/null @@ -1,143 +0,0 @@ -/* - * 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. - */ - -/* ---------------------------------------------------------------------------- - * Drawer appearance - * ------------------------------------------------------------------------- */ - -/* - * Drawer container - */ -.drawer { - - /* [tablet landscape-]: Light gray background */ - @include break-to-device(tablet landscape) { - background: $white; - } - - /* - * Color links - */ - .toc a { - - /* - * Current active element - */ - &.current { - color: $primary; - } - - /* - * Hovered link - */ - &:hover, &:focus { - color: $primary; - } - } - - /* - * Color anchors menu - */ - .anchor a { - border-left: 2px solid $primary; - } - - /* - * Main sections - */ - .section { - color: $black-light; - } -} - -/* - * Project information - */ -.project { - - /* [tablet landscape-]: Add drop shadow */ - @include break-to-device(tablet landscape) { - @include drop-shadow(1); - - background: $primary; - color: $white; - } - - /* - * Add status bar overlay for iOS web application - */ - .ios.standalone &:before { - background: $black-lightest; - } - - /* - * Project logo - */ - .logo img { - background: $white; - border-radius: 100%; - } - - /* - * Scale logo on hover - */ - &:hover .logo img, - &:focus .logo img { - @include drop-shadow(2); - } -} - -/* - * Repository buttons - */ -.repo a { - background: $accent; - color: $white; - border-radius: 3px; - - /* - * Hovered button - */ - &:hover, &:focus { - @include drop-shadow(2); - - opacity: 0.8; - } - - /* - * Stars - */ - .count { - background: $black-lighter; - color: $white; - border-radius: 0px 3px 3px 0px; - - /* - * Star bubble - */ - &:before { - border-width: 15px 5px 15px 0; - border-color: transparent $black-lighter; - border-style: solid; - } - } -} \ No newline at end of file diff --git a/src/assets/stylesheets/modules/drawer/_layout.scss b/src/assets/stylesheets/modules/drawer/_layout.scss deleted file mode 100644 index d6e1df280..000000000 --- a/src/assets/stylesheets/modules/drawer/_layout.scss +++ /dev/null @@ -1,305 +0,0 @@ -/* - * 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. - */ - -/* ---------------------------------------------------------------------------- - * Drawer layout - * ------------------------------------------------------------------------- */ - -/* - * Drawer container - */ -.drawer { - width: 262px; - font-size: 13px; - line-height: 1.0em; - - /* [tablet landscape-]: Fixed positioning */ - @include break-to-device(tablet landscape) { - position: fixed; - z-index: 5; - height: 100%; - } - - /* [tablet landscape+]: Inline with content */ - @include break-from-device(tablet landscape) { - position: static; - float: left; - height: auto; - margin-bottom: 96px; - padding-top: 80px; - } - - /* Hack [iOS]: Mitigate scrolling of parent container on boundaries */ - .ios & { - overflow: scroll; - -webkit-overflow-scrolling: touch; - } - - /* - * Links to articles - */ - .toc li a { - display: block; - padding: 14.5px 24px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - - /* - * Links to anchors - */ - .toc li.anchor a { - margin-left: 12px; - padding: 10px 24px 10px 12px; - } - - /* - * Nested links and anchors - */ - .toc li ul { - margin-left: 12px; - } - - /* - * Nested anchors - */ - .current + ul { - margin-bottom: 9px; - } - - /* - * Main sections - */ - .section { - display: block; - padding: 14.5px 24px; - } - - /* - * Scrollable container - */ - .scrollable { - top: 104px; - z-index: -1; - - /* [tablet landscape+]: Revert fixed positioning */ - @include break-from-device(tablet landscape) { - position: static; - } - - /* - * Leave room for status bar in iOS web application - */ - .ios.standalone & { - - /* [orientation: portrait]: Account for status bar in portrait mode */ - @include break-at-orientation(portrait) { - top: (104px + 20px); - } - } - - /* - * Content wrapper - */ - .wrapper { - height: auto; - min-height: 100%; - - /* - * Add spacing at top and bottom of separator - */ - hr { - margin: 12px 0; - - /* [screen+]: Shorten separator */ - @include break-from-device(screen) { - width: 48px; - } - - /* Hack [IE]: Left-align horizontal rule */ - margin-right: auto; - } - - /* - * Add spacing at top and bottom of top level navigation - */ - .toc { - margin: 12px 0; - } - } - } -} - -/* - * Project information - */ -.project { - display: block; - - /* - * Leave room for status bar in iOS web application - */ - .ios.standalone & { - - /* [orientation: portrait]: Account for status bar in portrait mode */ - @include break-at-orientation(portrait) { - padding-top: 20px; - - /* - * Add status bar overlay - */ - &:before { - content: " "; - position: absolute; - top: 0; - left: 0; - z-index: 4; - width: 100%; - height: 20px; - } - } - } - - /* - * Project banner - */ - .banner { - display: table; - width: 100%; - height: 104px; - padding: 20px; - } - - /* - * Project logo - */ - .logo { - display: table-cell; - width: 64px; - padding-right: 12px; - - /* - * Project logo image - */ - img { - display: block; - width: 64px; - height: 64px; - } - } - - /* - * Project name - */ - .name { - display: table-cell; - padding-left: 4px; - font-size: 14px; - line-height: 1.25em; - vertical-align: middle; - - /* [tablet portait+]: Slightly larger project name */ - @include break-from-device(tablet portrait) { - margin: 26px 0 0 5px; - } - } - - /* - * Shrink font, if a logo is given. - */ - .logo + .name { - font-size: 12px; - } -} - -/* - * Repository - */ -.repo { - margin: 24px 0; - text-align: center; - - /* - * Inline buttons - */ - li { - display: inline-block; - padding-right: 12px; - white-space: nowrap; - - /* - * No padding on last button - */ - &:last-child { - padding-right: 0; - } - } - - /* - * Buttons - */ - a { - display: inline-block; - padding: 0px 10px 0px 6px; - font-size: 12px; - line-height: 30px; - height: 30px; - - /* - * Slightly larger icons - */ - .icon { - font-size: 18px; - vertical-align: -3px; - } - - /* - * Stars - */ - .count { - display: inline-block; - position: relative; - padding: 0px 8px 0 4px; - margin: 0 -10px 0 8px; - font-size: 12px; - - /* - * Star bubble - */ - &:before { - content: " "; - display: block; - position: absolute; - top: 0px; - left: -5px; - } - - /* - * Hide count, in case javascript is not available. - */ - .no-js & { - display: none; - } - } - } -} \ No newline at end of file diff --git a/src/assets/stylesheets/modules/search/_animation.scss b/src/assets/stylesheets/modules/search/_animation.scss deleted file mode 100644 index 37df48f32..000000000 --- a/src/assets/stylesheets/modules/search/_animation.scss +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 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. - */ - -/* ---------------------------------------------------------------------------- - * Search animation - * ------------------------------------------------------------------------- */ - -/* - * Animate header bar in offset and opacity - */ -.bar { - transform: translate3d(0, 0, 0); - transition: opacity .2s cubic-bezier(.75, 0, .25, 1), - transform .4s cubic-bezier(.75, 0, .25, 1); - - /* - * Active search mode - */ - #toggle-search:checked ~ .header &, - .toggle-search & { - transform: translate3d(0, -56px, 0); - } - - /* - * Search animations - */ - &.search { - - /* - * Hide reset button by default - */ - .button-reset { - transform: scale(0.5, 0.5); - transition: opacity .4s cubic-bezier(.1, .7, .1, 1), - transform .4s cubic-bezier(.1, .7, .1, 1); - opacity: 0; - } - - /* - * Show reset button if search is not empty - */ - &.non-empty .button-reset { - transform: scale(1.0, 1.0); - opacity: 1; - } - } -} - -/* - * Search results - */ -.results { - transition: opacity .3s .1s, - width .0s .4s, - height .0s .4s; - - /* - * Active search mode - */ - #toggle-search:checked ~ .main &, - .toggle-search & { - transition: opacity .4s, - width .0s, - height .0s; - } - - /* - * Search result item link - */ - .list a { - transition: background .25s; - } -} - -/* - * Just hide and show bars, if browser doesn't support 3D transforms - */ -.no-csstransforms3d { - - /* - * Show default bar - */ - .bar.default { - display: table; - } - - /* - * Hide search bar - */ - .bar.search { - display: none; - margin-top: 0; - } - - /* - * Active search mode - */ - #toggle-search:checked ~ .header, - .toggle-search { - - /* - * Hide default bar - */ - .bar.default { - display: none; - } - - /* - * Show search bar - */ - .bar.search { - display: table; - } - } -} \ No newline at end of file diff --git a/src/assets/stylesheets/modules/search/_appearance.scss b/src/assets/stylesheets/modules/search/_appearance.scss deleted file mode 100644 index 045cd7613..000000000 --- a/src/assets/stylesheets/modules/search/_appearance.scss +++ /dev/null @@ -1,139 +0,0 @@ -/* - * 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. - */ - -/* ---------------------------------------------------------------------------- - * Search appearance - * ------------------------------------------------------------------------- */ - -/* - * Search bar - */ -.bar.search { - opacity: 0; - - /* - * Search input - */ - .query { - background: transparent; - color: $black; - - /* - * Search input placeholder - */ - @include placeholder { - color: $black-lighter; - } - } - - /* - * Pushed/clicked icon - */ - .button .icon:active { - background: $black-lightest; - } -} - -/* - * Search results - */ -.results { - @include drop-shadow(2); - - background: $white; - color: $black; - opacity: 0; - - /* - * Active search mode - */ - #toggle-search:checked ~ .main &, - .toggle-search & { - opacity: 1; - } - - /* - * Search meta data - */ - .meta { - background: $primary; - color: $white; - } - - /* - * Search result item link - */ - .list a { - border-bottom: 1px solid $black-lightest; - - /* - * Remove border on last element - */ - &:last-child { - border-bottom: none; - } - - /* - * Active item link - */ - &:active { - background: $black-lightest; - } - } -} - -/* - * Article link - */ -.result span { - color: $black-light; -} - -/* - * Active search bar - */ -#toggle-search:checked ~ .header, -.toggle-search .header { - background: $white; - color: $black-light; - - /* - * Add darker status bar overlay in search mode - */ - &:before { - background: $black-light; - } - - /* - * Fade out default header bar - */ - .bar.default { - opacity: 0; - } - - /* - * Fade in search header bar - */ - .bar.search { - opacity: 1; - } -} \ No newline at end of file diff --git a/src/assets/stylesheets/modules/search/_layout.scss b/src/assets/stylesheets/modules/search/_layout.scss deleted file mode 100644 index 33c89be98..000000000 --- a/src/assets/stylesheets/modules/search/_layout.scss +++ /dev/null @@ -1,218 +0,0 @@ -/* - * 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. - */ - -/* ---------------------------------------------------------------------------- - * Search layout - * ------------------------------------------------------------------------- */ - -/* - * Search bar - */ -.bar.search { - margin-top: 8px; - - /* - * Search input - */ - .query { - font-size: 18px; - padding: 13px 0; - margin: 0; - width: 100%; - height: 48px; - - /* [tablet portait+]: Slightly larger typo */ - @include break-from-device(tablet portrait) { - font-size: 20px; - padding: 12px 0; - } - - /* Hack [IE]: Hide redundant clear button */ - &::-ms-clear { - display: none; - } - } -} - -/* - * Search results - */ -.results { - position: fixed; - top: 0; - left: 0; - width: 0; - height: 100%; - z-index: 2; - overflow-y: scroll; - -webkit-overflow-scrolling: touch; - - /* [tablet landscape+]: Limit results to five entries */ - @include break-from-device(tablet landscape) { - height: auto; - top: 64px; - } - - /* - * Scrollable container - */ - .scrollable { - top: 56px; - - /* [tablet portait+]: Increase vertical spacing */ - @include break-from-device(tablet portrait) { - top: 64px; - } - - /* [tablet landscape+]: Limit results to five entries */ - @include break-from-device(tablet landscape) { - position: static; - max-height: 413px; - } - - /* - * Leave room for status bar in iOS web application - */ - .ios.standalone & { - - /* [orientation: portrait]: Account for status bar in portrait mode */ - @include break-at-orientation(portrait) { - top: (56px + 20px); - - /* [tablet portait+]: Increase vertical spacing */ - @include break-from-device(tablet portrait) { - top: (64px + 20px); - } - } - } - } - - /* - * Active search mode - */ - #toggle-search:checked ~ .main &, - .toggle-search & { - width: 100%; - - /* Hack [Firefox]: div doesn't collapse, unless this is applied */ - overflow-y: visible; - - /* [tablet portait+]: Stretch to viewport */ - @include break-to-device(tablet landscape) { - height: 100%; - } - } - - /* - * Search meta data - */ - .meta { - font-weight: 700; - - /* - * Number of results - */ - strong { - display: block; - font-size: 11px; - max-width: 1200px; - margin-left: auto; - margin-right: auto; - padding: 16px; - - /* [tablet portait+]: Increase vertical spacing */ - @include break-from-device(tablet portrait) { - padding: 16px 24px; - } - } - } - - /* - * Search result item link - */ - .list a { - display: block; - } -} - -/* - * Search result item - */ -.result { - max-width: 1200px; - margin-left: auto; - margin-right: auto; - padding: 12px 16px 16px; - - /* [tablet portait+]: Increase vertical spacing */ - @include break-from-device(tablet portrait) { - padding: 16px 24px 20px; - } - - /* - * Article title - */ - h1 { - line-height: 24px; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - } - - /* - * Article link - */ - span { - font-size: 12px; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - } -} - -/* - * Switch visibility, if browser doesn't support 3D transforms - */ -.no-csstransforms3d { - - /* - * Hide search results - */ - .results { - display: none; - } - - /* - * Active search mode - */ - #toggle-search:checked ~ .main, - .toggle-search { - - /* - * Show search results - */ - .results { - display: block; - overflow: auto; - } - } -} \ No newline at end of file diff --git a/src/assets/stylesheets/modules/search/_typography.scss b/src/assets/stylesheets/modules/search/_typography.scss deleted file mode 100644 index 465f20ede..000000000 --- a/src/assets/stylesheets/modules/search/_typography.scss +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ - -/* - * Search meta data - */ -.meta { - text-transform: uppercase; - font-weight: 700; -} \ No newline at end of file diff --git a/src/assets/stylesheets/palettes.scss b/src/assets/stylesheets/palettes.scss deleted file mode 100644 index fe2fc69e4..000000000 --- a/src/assets/stylesheets/palettes.scss +++ /dev/null @@ -1,221 +0,0 @@ -/* - * 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. - */ - -/* ---------------------------------------------------------------------------- - * Dependencies - * ------------------------------------------------------------------------- */ - -@import "bourbon"; -@import "quantum-colors"; -@import "quantum-shadows"; - -/* ---------------------------------------------------------------------------- - * Application - * ------------------------------------------------------------------------- */ - -@import "palette"; - -@import "mixins/break"; - -/* ---------------------------------------------------------------------------- - * Palette - * ------------------------------------------------------------------------- */ - -/* - * Build primary palette - */ -@each $name, $color in ( - 'red': $red-400, - 'pink': $pink-500, - 'purple': $purple-400, - 'deep-purple': $deep-purple-400, - 'indigo': $indigo-500, - 'blue': $blue-500, - 'light-blue': $light-blue-500, - 'cyan': $cyan-500, - 'teal': $teal-500, - 'green': $green-500, - 'light-green': $light-green-600, - 'lime': $lime-600, - 'yellow': $yellow-800, - 'amber': $amber-600, - 'orange': $orange-600, - 'deep-orange': $deep-orange-400, - 'brown': $brown-500, - 'grey': $grey-600, - 'blue-grey': $blue-grey-600 -) { - - /* - * Device specific background hacks related to rubberband - */ - .palette-primary-#{$name} { - - /* Hack [Chrome, Opera]: Set background color in Chrome and Opera */ - @supports (-webkit-appearance: none) { - background: $color; - } - - /* - * Application header and footer - */ - .header, .footer { - background: $color; - } - - /* - * Drawer container - */ - .drawer { - - /* - * Color links - */ - .toc a { - - /* - * Current active element - */ - &.current { - color: $color; - } - - /* - * Hovered link - */ - &:hover, &:focus { - color: $color; - } - } - - /* - * Color anchors menu - */ - .anchor a { - border-left: 2px solid $color; - } - } - - /* - * Project information - */ - .project { - - /* [tablet landscape-]: Set background color */ - @include break-to-device(tablet landscape) { - background: $color; - } - } - - /* - * Article - */ - .article { - - /* - * Differing top and bottom rubberband backgrounds in iOS web application - */ - .ios.standalone & { - background: linear-gradient( - to bottom, $white 50%, $color 50%); - } - - /* - * Headlines, chapters, links and inline code - */ - h1, h2, a, code { - color: $color; - } - - /* - * Light permalinks - */ - .headerlink { - color: $black-lighter; - } - - /* - * Data table headings - */ - table th { - background: mix($color, $white, 75%); - } - } - - /* - * Search meta data - */ - .results .meta { - background: $color; - } - } -} - -/* - * Build accent palette - */ -@each $name, $color in ( - 'red': $red-a400, - 'pink': $pink-a400, - 'purple': $purple-a200, - 'deep-purple': $deep-purple-a200, - 'indigo': $indigo-a200, - 'blue': $blue-a200, - 'light-blue': $light-blue-a700, - 'cyan': $cyan-a700, - 'teal': $teal-a700, - 'green': $green-a700, - 'light-green': $light-green-a700, - 'lime': $lime-a700, - 'yellow': $yellow-a700, - 'amber': $amber-a700, - 'orange': $orange-a400, - 'deep-orange': $deep-orange-a200 -) { - - /* - * Device specific background hacks related to rubberband - */ - .palette-accent-#{$name} { - - /* - * Article - */ - .article { - - /* - * Hovered and focused links - */ - a:hover, - a:focus { - color: $color; - } - } - - /* - * Repository buttons - */ - .repo a { - background: $color; - } - } -} \ No newline at end of file diff --git a/src/base.html b/src/base.html index ce705dcff..811fe0900 100644 --- a/src/base.html +++ b/src/base.html @@ -1,3 +1,25 @@ + + @@ -9,7 +31,7 @@ + user-scalable=no, initial-scale=1, maximum-scale=1" /> {% block htmltitle %} @@ -39,44 +61,19 @@ {% endif %} {% endblock %} - - - - - - - - - - - - {% if config.extra.logo %} - - {% endif %} - - - {% set icon = icon | default("assets/images/favicon.ico") %} - - - - {% endif %} + + {% for path in extra_css %} @@ -116,158 +94,79 @@ - - - {% block extrahead %}{% endblock %} - - - {% set palette = config.extra.get("palette", {}) %} - {% set primary = palette.primary | replace(' ', '-') | lower %} - {% set accent = palette.accent | replace(' ', '-') | lower %} - - - - {% if repo_name == "GitHub" and repo_url %} - {% set repo_id = repo_url | replace("https://github.com/", "") %} - {% if repo_id[-1:] == "/" %} - {% set repo_id = repo_id[:-1] %} - {% endif %} - {% endif %} - - -
    -
    -
    + - - + + - + - -
    - {% include "header.html" %} -
    + + {% include "header.html" %} - -
    + +
    - - {% set h1 = "\x3ch1 id=" in content %} + +
    +
    - -
    - {% include "drawer.html" %} -
    + + {% set h1 = "\x3ch1 id=" in content %} - -
    -
    - - - {% if not h1 %} -

    {{ page_title | default(site_name, true)}}

    + + {% if nav %} + {% include "nav.html" %} {% endif %} - - {{ content }} + + {% if toc %} + {% include "toc.html" %} + {% endif %} - - + +
    +
    + {{ content }} - - {% block footer %} -
    - {% include "footer.html" %} -
    - {% endblock %} -
    -
    - - -
    -
    -
    -
    -
    + +
    + + {% if copyright %} + {{ copyright }} – + {% endif %} + This document was created with + MkDocs + and the + Material + theme. + +
    -
    -
    +
    + + + {% include "footer.html" %} + {% for path in extra_javascript %} {% endfor %} - - - {% if google_analytics %} - - {% endif %} \ No newline at end of file diff --git a/src/drawer.html b/src/drawer.html deleted file mode 100644 index 45d8308f6..000000000 --- a/src/drawer.html +++ /dev/null @@ -1,96 +0,0 @@ - - \ No newline at end of file diff --git a/src/footer.html b/src/footer.html index 012515541..e2410deee 100644 --- a/src/footer.html +++ b/src/footer.html @@ -1,48 +1,73 @@ - -{% if include_next_prev %} - - -{% endif %} \ No newline at end of file + {% endif %} + \ No newline at end of file diff --git a/src/header.html b/src/header.html index dc2a0e434..f4a9ec52f 100644 --- a/src/header.html +++ b/src/header.html @@ -1,84 +1,60 @@ - - \ No newline at end of file + + \ No newline at end of file diff --git a/src/nav-item.html b/src/nav-item.html new file mode 100644 index 000000000..887059c29 --- /dev/null +++ b/src/nav-item.html @@ -0,0 +1,68 @@ + + + +{% if nav_item.children %} +
  • + + + {% if nav_item.active %} + + {% else %} + + {% endif %} + +
      + + + {% for nav_item in nav_item.children %} + {% set temp = path %} + {% set path = path + "-" + loop.index | string %} + {% include "nav-item.html" %} + {% set path = temp %} + {% endfor %} +
    +
  • + + +{% else %} +
  • + {% if nav_item.active %} + + {{ nav_item.title }} + + {% else %} + + {{ nav_item.title }} + + {% endif %} +
  • +{% endif %} \ No newline at end of file diff --git a/src/nav.html b/src/nav.html index 1d70b9fc1..9d4e766ca 100644 --- a/src/nav.html +++ b/src/nav.html @@ -1,51 +1,36 @@ - -{% if nav_item.children %} -
  • - {{ nav_item.title }} -
      + - {% for nav_item in nav_item.children %} - {% include "nav.html" %} - {% endfor %} -
    -
  • + 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: - -{% else %} -
  • - - {{ nav_item.title }} - + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. - - {% if nav_item == current_page %} + 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. +--> - - {% if h1 %} - {% set toc = (toc | first).children %} - {% endif %} - - - {% if toc and (toc | first) %} - - {% endif %} - {% endif %} -
  • -{% endif %} \ No newline at end of file + +
    +
    + +
    +
    \ No newline at end of file diff --git a/src/toc-item.html b/src/toc-item.html new file mode 100644 index 000000000..82ab867a6 --- /dev/null +++ b/src/toc-item.html @@ -0,0 +1,38 @@ + + + +
  • + + {{ toc_item.title }} + + + + {% if toc_item.children %} +
      + {% for toc_item in toc_item.children %} + {% include "toc-item.html" %} + {% endfor %} +
    + {% endif %} +
  • \ No newline at end of file diff --git a/src/toc.html b/src/toc.html new file mode 100644 index 000000000..728fba1cb --- /dev/null +++ b/src/toc.html @@ -0,0 +1,49 @@ + + + +
    +
    + +
    +
    \ No newline at end of file From c534800ab9607642fae4d3d222dd53f0e819646a Mon Sep 17 00:00:00 2001 From: squidfunk Date: Mon, 8 Aug 2016 23:33:06 +0200 Subject: [PATCH 002/202] Added search bar to screen header --- .../javascripts/modernizr-30b4746408.js | 1818 +++++++++++++++++ .../javascripts/modernizr-d1e05123d4.js | 1 - .../stylesheets/application-cbf902c7ca.css | 1 + .../stylesheets/application-fe75383308.css | 1 - material/assets/stylesheets/application.css | 2 +- material/base.html | 4 +- material/header.html | 4 + material/manifest.json | 4 +- src/assets/stylesheets/base/_typeset.scss | 32 +- .../stylesheets/extensions/_codehilite.scss | 70 +- .../stylesheets/extensions/_permalinks.scss | 2 +- src/assets/stylesheets/layout/_header.scss | 74 + src/assets/stylesheets/layout/_search.scss | 0 src/header.html | 7 + 14 files changed, 1959 insertions(+), 61 deletions(-) create mode 100644 material/assets/javascripts/modernizr-30b4746408.js delete mode 100644 material/assets/javascripts/modernizr-d1e05123d4.js create mode 100644 material/assets/stylesheets/application-cbf902c7ca.css delete mode 100644 material/assets/stylesheets/application-fe75383308.css create mode 100644 src/assets/stylesheets/layout/_search.scss diff --git a/material/assets/javascripts/modernizr-30b4746408.js b/material/assets/javascripts/modernizr-30b4746408.js new file mode 100644 index 000000000..c309a1b82 --- /dev/null +++ b/material/assets/javascripts/modernizr-30b4746408.js @@ -0,0 +1,1818 @@ +/*! + * modernizr v3.3.1 + * Build http://modernizr.com/download?-contains-csstransforms3d-fontface-supports-target-addtest-fnbind-printshiv-setclasses-testprop-dontmin + * + * Copyright (c) + * Faruk Ates + * Paul Irish + * Alex Sexton + * Ryan Seddon + * Patrick Kettner + * Stu Cox + * Richard Herrera + + * MIT License + */ + +/* + * Modernizr tests which native CSS3 and HTML5 features are available in the + * current UA and makes the results available to you in two ways: as properties on + * a global `Modernizr` object, and as classes on the `` element. This + * information allows you to progressively enhance your pages with a granular level + * of control over the experience. +*/ + +;(function(window, document, undefined){ + var tests = []; + + + /** + * + * ModernizrProto is the constructor for Modernizr + * + * @class + * @access public + */ + + var ModernizrProto = { + // The current version, dummy + _version: '3.3.1', + + // Any settings that don't work as separate modules + // can go in here as configuration. + _config: { + 'classPrefix': '', + 'enableClasses': true, + 'enableJSClass': true, + 'usePrefixes': true + }, + + // Queue of tests + _q: [], + + // Stub these for people who are listening + on: function(test, cb) { + // I don't really think people should do this, but we can + // safe guard it a bit. + // -- NOTE:: this gets WAY overridden in src/addTest for actual async tests. + // This is in case people listen to synchronous tests. I would leave it out, + // but the code to *disallow* sync tests in the real version of this + // function is actually larger than this. + var self = this; + setTimeout(function() { + cb(self[test]); + }, 0); + }, + + addTest: function(name, fn, options) { + tests.push({name: name, fn: fn, options: options}); + }, + + addAsyncTest: function(fn) { + tests.push({name: null, fn: fn}); + } + }; + + + + // Fake some of Object.create so we can force non test results to be non "own" properties. + var Modernizr = function() {}; + Modernizr.prototype = ModernizrProto; + + // Leak modernizr globally when you `require` it rather than force it here. + // Overwrite name so constructor name is nicer :D + Modernizr = new Modernizr(); + + + + var classes = []; + + + /** + * is returns a boolean if the typeof an obj is exactly type. + * + * @access private + * @function is + * @param {*} obj - A thing we want to check the type of + * @param {string} type - A string to compare the typeof against + * @returns {boolean} + */ + + function is(obj, type) { + return typeof obj === type; + } + ; + + /** + * Run through all tests and detect their support in the current UA. + * + * @access private + */ + + function testRunner() { + var featureNames; + var feature; + var aliasIdx; + var result; + var nameIdx; + var featureName; + var featureNameSplit; + + for (var featureIdx in tests) { + if (tests.hasOwnProperty(featureIdx)) { + featureNames = []; + feature = tests[featureIdx]; + // run the test, throw the return value into the Modernizr, + // then based on that boolean, define an appropriate className + // and push it into an array of classes we'll join later. + // + // If there is no name, it's an 'async' test that is run, + // but not directly added to the object. That should + // be done with a post-run addTest call. + if (feature.name) { + featureNames.push(feature.name.toLowerCase()); + + if (feature.options && feature.options.aliases && feature.options.aliases.length) { + // Add all the aliases into the names list + for (aliasIdx = 0; aliasIdx < feature.options.aliases.length; aliasIdx++) { + featureNames.push(feature.options.aliases[aliasIdx].toLowerCase()); + } + } + } + + // Run the test, or use the raw value if it's not a function + result = is(feature.fn, 'function') ? feature.fn() : feature.fn; + + + // Set each of the names on the Modernizr object + for (nameIdx = 0; nameIdx < featureNames.length; nameIdx++) { + featureName = featureNames[nameIdx]; + // Support dot properties as sub tests. We don't do checking to make sure + // that the implied parent tests have been added. You must call them in + // order (either in the test, or make the parent test a dependency). + // + // Cap it to TWO to make the logic simple and because who needs that kind of subtesting + // hashtag famous last words + featureNameSplit = featureName.split('.'); + + if (featureNameSplit.length === 1) { + Modernizr[featureNameSplit[0]] = result; + } else { + // cast to a Boolean, if not one already + /* jshint -W053 */ + if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) { + Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]); + } + + Modernizr[featureNameSplit[0]][featureNameSplit[1]] = result; + } + + classes.push((result ? '' : 'no-') + featureNameSplit.join('-')); + } + } + } + } + ; + + /** + * docElement is a convenience wrapper to grab the root element of the document + * + * @access private + * @returns {HTMLElement|SVGElement} The root element of the document + */ + + var docElement = document.documentElement; + + + /** + * A convenience helper to check if the document we are running in is an SVG document + * + * @access private + * @returns {boolean} + */ + + var isSVG = docElement.nodeName.toLowerCase() === 'svg'; + + + /** + * setClasses takes an array of class names and adds them to the root element + * + * @access private + * @function setClasses + * @param {string[]} classes - Array of class names + */ + + // Pass in an and array of class names, e.g.: + // ['no-webp', 'borderradius', ...] + function setClasses(classes) { + var className = docElement.className; + var classPrefix = Modernizr._config.classPrefix || ''; + + if (isSVG) { + className = className.baseVal; + } + + // Change `no-js` to `js` (independently of the `enableClasses` option) + // Handle classPrefix on this too + if (Modernizr._config.enableJSClass) { + var reJS = new RegExp('(^|\\s)' + classPrefix + 'no-js(\\s|$)'); + className = className.replace(reJS, '$1' + classPrefix + 'js$2'); + } + + if (Modernizr._config.enableClasses) { + // Add the new classes + className += ' ' + classPrefix + classes.join(' ' + classPrefix); + isSVG ? docElement.className.baseVal = className : docElement.className = className; + } + + } + + ; + + /** + * hasOwnProp is a shim for hasOwnProperty that is needed for Safari 2.0 support + * + * @author kangax + * @access private + * @function hasOwnProp + * @param {object} object - The object to check for a property + * @param {string} property - The property to check for + * @returns {boolean} + */ + + // hasOwnProperty shim by kangax needed for Safari 2.0 support + var hasOwnProp; + + (function() { + var _hasOwnProperty = ({}).hasOwnProperty; + /* istanbul ignore else */ + /* we have no way of testing IE 5.5 or safari 2, + * so just assume the else gets hit */ + if (!is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined')) { + hasOwnProp = function(object, property) { + return _hasOwnProperty.call(object, property); + }; + } + else { + hasOwnProp = function(object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */ + return ((property in object) && is(object.constructor.prototype[property], 'undefined')); + }; + } + })(); + + + + + // _l tracks listeners for async tests, as well as tests that execute after the initial run + ModernizrProto._l = {}; + + /** + * Modernizr.on is a way to listen for the completion of async tests. Being + * asynchronous, they may not finish before your scripts run. As a result you + * will get a possibly false negative `undefined` value. + * + * @memberof Modernizr + * @name Modernizr.on + * @access public + * @function on + * @param {string} feature - String name of the feature detect + * @param {function} cb - Callback function returning a Boolean - true if feature is supported, false if not + * @example + * + * ```js + * Modernizr.on('flash', function( result ) { + * if (result) { + * // the browser has flash + * } else { + * // the browser does not have flash + * } + * }); + * ``` + */ + + ModernizrProto.on = function(feature, cb) { + // Create the list of listeners if it doesn't exist + if (!this._l[feature]) { + this._l[feature] = []; + } + + // Push this test on to the listener list + this._l[feature].push(cb); + + // If it's already been resolved, trigger it on next tick + if (Modernizr.hasOwnProperty(feature)) { + // Next Tick + setTimeout(function() { + Modernizr._trigger(feature, Modernizr[feature]); + }, 0); + } + }; + + /** + * _trigger is the private function used to signal test completion and run any + * callbacks registered through [Modernizr.on](#modernizr-on) + * + * @memberof Modernizr + * @name Modernizr._trigger + * @access private + * @function _trigger + * @param {string} feature - string name of the feature detect + * @param {function|boolean} [res] - A feature detection function, or the boolean = + * result of a feature detection function + */ + + ModernizrProto._trigger = function(feature, res) { + if (!this._l[feature]) { + return; + } + + var cbs = this._l[feature]; + + // Force async + setTimeout(function() { + var i, cb; + for (i = 0; i < cbs.length; i++) { + cb = cbs[i]; + cb(res); + } + }, 0); + + // Don't trigger these again + delete this._l[feature]; + }; + + /** + * addTest allows you to define your own feature detects that are not currently + * included in Modernizr (under the covers it's the exact same code Modernizr + * uses for its own [feature detections](https://github.com/Modernizr/Modernizr/tree/master/feature-detects)). Just like the offical detects, the result + * will be added onto the Modernizr object, as well as an appropriate className set on + * the html element when configured to do so + * + * @memberof Modernizr + * @name Modernizr.addTest + * @optionName Modernizr.addTest() + * @optionProp addTest + * @access public + * @function addTest + * @param {string|object} feature - The string name of the feature detect, or an + * object of feature detect names and test + * @param {function|boolean} test - Function returning true if feature is supported, + * false if not. Otherwise a boolean representing the results of a feature detection + * @example + * + * The most common way of creating your own feature detects is by calling + * `Modernizr.addTest` with a string (preferably just lowercase, without any + * punctuation), and a function you want executed that will return a boolean result + * + * ```js + * Modernizr.addTest('itsTuesday', function() { + * var d = new Date(); + * return d.getDay() === 2; + * }); + * ``` + * + * When the above is run, it will set Modernizr.itstuesday to `true` when it is tuesday, + * and to `false` every other day of the week. One thing to notice is that the names of + * feature detect functions are always lowercased when added to the Modernizr object. That + * means that `Modernizr.itsTuesday` will not exist, but `Modernizr.itstuesday` will. + * + * + * Since we only look at the returned value from any feature detection function, + * you do not need to actually use a function. For simple detections, just passing + * in a statement that will return a boolean value works just fine. + * + * ```js + * Modernizr.addTest('hasJquery', 'jQuery' in window); + * ``` + * + * Just like before, when the above runs `Modernizr.hasjquery` will be true if + * jQuery has been included on the page. Not using a function saves a small amount + * of overhead for the browser, as well as making your code much more readable. + * + * Finally, you also have the ability to pass in an object of feature names and + * their tests. This is handy if you want to add multiple detections in one go. + * The keys should always be a string, and the value can be either a boolean or + * function that returns a boolean. + * + * ```js + * var detects = { + * 'hasjquery': 'jQuery' in window, + * 'itstuesday': function() { + * var d = new Date(); + * return d.getDay() === 2; + * } + * } + * + * Modernizr.addTest(detects); + * ``` + * + * There is really no difference between the first methods and this one, it is + * just a convenience to let you write more readable code. + */ + + function addTest(feature, test) { + + if (typeof feature == 'object') { + for (var key in feature) { + if (hasOwnProp(feature, key)) { + addTest(key, feature[ key ]); + } + } + } else { + + feature = feature.toLowerCase(); + var featureNameSplit = feature.split('.'); + var last = Modernizr[featureNameSplit[0]]; + + // Again, we don't check for parent test existence. Get that right, though. + if (featureNameSplit.length == 2) { + last = last[featureNameSplit[1]]; + } + + if (typeof last != 'undefined') { + // we're going to quit if you're trying to overwrite an existing test + // if we were to allow it, we'd do this: + // var re = new RegExp("\\b(no-)?" + feature + "\\b"); + // docElement.className = docElement.className.replace( re, '' ); + // but, no rly, stuff 'em. + return Modernizr; + } + + test = typeof test == 'function' ? test() : test; + + // Set the value (this is the magic, right here). + if (featureNameSplit.length == 1) { + Modernizr[featureNameSplit[0]] = test; + } else { + // cast to a Boolean, if not one already + /* jshint -W053 */ + if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) { + Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]); + } + + Modernizr[featureNameSplit[0]][featureNameSplit[1]] = test; + } + + // Set a single class (either `feature` or `no-feature`) + /* jshint -W041 */ + setClasses([(!!test && test != false ? '' : 'no-') + featureNameSplit.join('-')]); + /* jshint +W041 */ + + // Trigger the event + Modernizr._trigger(feature, test); + } + + return Modernizr; // allow chaining. + } + + // After all the tests are run, add self to the Modernizr prototype + Modernizr._q.push(function() { + ModernizrProto.addTest = addTest; + }); + + + + + /** + * fnBind is a super small [bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) polyfill. + * + * @access private + * @function fnBind + * @param {function} fn - a function you want to change `this` reference to + * @param {object} that - the `this` you want to call the function with + * @returns {function} The wrapped version of the supplied function + */ + + function fnBind(fn, that) { + return function() { + return fn.apply(that, arguments); + }; + } + + ; + +/** + * @optionName html5printshiv + * @optionProp html5printshiv + */ + + // Take the html5 variable out of the html5shiv scope so we can return it. + var html5; + if (!isSVG) { + + /** + * @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed + */ + ;(function(window, document) { + /*jshint evil:true */ + /** version */ + var version = '3.7.3'; + + /** Preset options */ + var options = window.html5 || {}; + + /** Used to skip problem elements */ + var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i; + + /** Not all elements can be cloned in IE **/ + var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i; + + /** Detect whether the browser supports default html5 styles */ + var supportsHtml5Styles; + + /** Name of the expando, to work with multiple documents or to re-shiv one document */ + var expando = '_html5shiv'; + + /** The id for the the documents expando */ + var expanID = 0; + + /** Cached data for each document */ + var expandoData = {}; + + /** Detect whether the browser supports unknown elements */ + var supportsUnknownElements; + + (function() { + try { + var a = document.createElement('a'); + a.innerHTML = ''; + //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles + supportsHtml5Styles = ('hidden' in a); + + supportsUnknownElements = a.childNodes.length == 1 || (function() { + // assign a false positive if unable to shiv + (document.createElement)('a'); + var frag = document.createDocumentFragment(); + return ( + typeof frag.cloneNode == 'undefined' || + typeof frag.createDocumentFragment == 'undefined' || + typeof frag.createElement == 'undefined' + ); + }()); + } catch(e) { + // assign a false positive if detection fails => unable to shiv + supportsHtml5Styles = true; + supportsUnknownElements = true; + } + + }()); + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a style sheet with the given CSS text and adds it to the document. + * @private + * @param {Document} ownerDocument The document. + * @param {String} cssText The CSS text. + * @returns {StyleSheet} The style element. + */ + function addStyleSheet(ownerDocument, cssText) { + var p = ownerDocument.createElement('p'), + parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement; + + p.innerHTML = 'x'; + return parent.insertBefore(p.lastChild, parent.firstChild); + } + + /** + * Returns the value of `html5.elements` as an array. + * @private + * @returns {Array} An array of shived element node names. + */ + function getElements() { + var elements = html5.elements; + return typeof elements == 'string' ? elements.split(' ') : elements; + } + + /** + * Extends the built-in list of html5 elements + * @memberOf html5 + * @param {String|Array} newElements whitespace separated list or array of new element names to shiv + * @param {Document} ownerDocument The context document. + */ + function addElements(newElements, ownerDocument) { + var elements = html5.elements; + if(typeof elements != 'string'){ + elements = elements.join(' '); + } + if(typeof newElements != 'string'){ + newElements = newElements.join(' '); + } + html5.elements = elements +' '+ newElements; + shivDocument(ownerDocument); + } + + /** + * Returns the data associated to the given document + * @private + * @param {Document} ownerDocument The document. + * @returns {Object} An object of data. + */ + function getExpandoData(ownerDocument) { + var data = expandoData[ownerDocument[expando]]; + if (!data) { + data = {}; + expanID++; + ownerDocument[expando] = expanID; + expandoData[expanID] = data; + } + return data; + } + + /** + * returns a shived element for the given nodeName and document + * @memberOf html5 + * @param {String} nodeName name of the element + * @param {Document} ownerDocument The context document. + * @returns {Object} The shived element. + */ + function createElement(nodeName, ownerDocument, data){ + if (!ownerDocument) { + ownerDocument = document; + } + if(supportsUnknownElements){ + return ownerDocument.createElement(nodeName); + } + if (!data) { + data = getExpandoData(ownerDocument); + } + var node; + + if (data.cache[nodeName]) { + node = data.cache[nodeName].cloneNode(); + } else if (saveClones.test(nodeName)) { + node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode(); + } else { + node = data.createElem(nodeName); + } + + // Avoid adding some elements to fragments in IE < 9 because + // * Attributes like `name` or `type` cannot be set/changed once an element + // is inserted into a document/fragment + // * Link elements with `src` attributes that are inaccessible, as with + // a 403 response, will cause the tab/window to crash + // * Script elements appended to fragments will execute when their `src` + // or `text` property is set + return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node; + } + + /** + * returns a shived DocumentFragment for the given document + * @memberOf html5 + * @param {Document} ownerDocument The context document. + * @returns {Object} The shived DocumentFragment. + */ + function createDocumentFragment(ownerDocument, data){ + if (!ownerDocument) { + ownerDocument = document; + } + if(supportsUnknownElements){ + return ownerDocument.createDocumentFragment(); + } + data = data || getExpandoData(ownerDocument); + var clone = data.frag.cloneNode(), + i = 0, + elems = getElements(), + l = elems.length; + for(;i+~])(' + getElements().join('|') + ')(?=[[\\s,>+~#.:]|$)', 'gi'), + replacement = '$1' + shivNamespace + '\\:$2'; + + while (index--) { + pair = parts[index] = parts[index].split('}'); + pair[pair.length - 1] = pair[pair.length - 1].replace(reElements, replacement); + parts[index] = pair.join('}'); + } + return parts.join('{'); + } + + /** + * Removes the given wrappers, leaving the original elements. + * @private + * @params {Array} wrappers An array of printable wrappers. + */ + function removeWrappers(wrappers) { + var index = wrappers.length; + while (index--) { + wrappers[index].removeNode(); + } + } + + /*--------------------------------------------------------------------------*/ + + /** + * Shivs the given document for print. + * @memberOf html5 + * @param {Document} ownerDocument The document to shiv. + * @returns {Document} The shived document. + */ + function shivPrint(ownerDocument) { + var shivedSheet, + wrappers, + data = getExpandoData(ownerDocument), + namespaces = ownerDocument.namespaces, + ownerWindow = ownerDocument.parentWindow; + + if (!supportsShivableSheets || ownerDocument.printShived) { + return ownerDocument; + } + if (typeof namespaces[shivNamespace] == 'undefined') { + namespaces.add(shivNamespace); + } + + function removeSheet() { + clearTimeout(data._removeSheetTimer); + if (shivedSheet) { + shivedSheet.removeNode(true); + } + shivedSheet= null; + } + + ownerWindow.attachEvent('onbeforeprint', function() { + + removeSheet(); + + var imports, + length, + sheet, + collection = ownerDocument.styleSheets, + cssText = [], + index = collection.length, + sheets = Array(index); + + // convert styleSheets collection to an array + while (index--) { + sheets[index] = collection[index]; + } + // concat all style sheet CSS text + while ((sheet = sheets.pop())) { + // IE does not enforce a same origin policy for external style sheets... + // but has trouble with some dynamically created stylesheets + if (!sheet.disabled && reMedia.test(sheet.media)) { + + try { + imports = sheet.imports; + length = imports.length; + } catch(er){ + length = 0; + } + + for (index = 0; index < length; index++) { + sheets.push(imports[index]); + } + + try { + cssText.push(sheet.cssText); + } catch(er){} + } + } + + // wrap all HTML5 elements with printable elements and add the shived style sheet + cssText = shivCssText(cssText.reverse().join('')); + wrappers = addWrappers(ownerDocument); + shivedSheet = addStyleSheet(ownerDocument, cssText); + + }); + + ownerWindow.attachEvent('onafterprint', function() { + // remove wrappers, leaving the original elements, and remove the shived style sheet + removeWrappers(wrappers); + clearTimeout(data._removeSheetTimer); + data._removeSheetTimer = setTimeout(removeSheet, 500); + }); + + ownerDocument.printShived = true; + return ownerDocument; + } + + /*--------------------------------------------------------------------------*/ + + // expose API + html5.type += ' print'; + html5.shivPrint = shivPrint; + + // shiv for print + shivPrint(document); + + if(typeof module == 'object' && module.exports){ + module.exports = html5; + } + + }(typeof window !== "undefined" ? window : this, document)); + } + + ; + + + /** + * contains checks to see if a string contains another string + * + * @access private + * @function contains + * @param {string} str - The string we want to check for substrings + * @param {string} substr - The substring we want to search the first string for + * @returns {boolean} + */ + + function contains(str, substr) { + return !!~('' + str).indexOf(substr); + } + + ; + + /** + * createElement is a convenience wrapper around document.createElement. Since we + * use createElement all over the place, this allows for (slightly) smaller code + * as well as abstracting away issues with creating elements in contexts other than + * HTML documents (e.g. SVG documents). + * + * @access private + * @function createElement + * @returns {HTMLElement|SVGElement} An HTML or SVG element + */ + + function createElement() { + if (typeof document.createElement !== 'function') { + // This is the case in IE7, where the type of createElement is "object". + // For this reason, we cannot call apply() as Object is not a Function. + return document.createElement(arguments[0]); + } else if (isSVG) { + return document.createElementNS.call(document, 'http://www.w3.org/2000/svg', arguments[0]); + } else { + return document.createElement.apply(document, arguments); + } + } + + ; + + /** + * Create our "modernizr" element that we do most feature tests on. + * + * @access private + */ + + var modElem = { + elem: createElement('modernizr') + }; + + // Clean up this element + Modernizr._q.push(function() { + delete modElem.elem; + }); + + + + var mStyle = { + style: modElem.elem.style + }; + + // kill ref for gc, must happen before mod.elem is removed, so we unshift on to + // the front of the queue. + Modernizr._q.unshift(function() { + delete mStyle.style; + }); + + + + /** + * getBody returns the body of a document, or an element that can stand in for + * the body if a real body does not exist + * + * @access private + * @function getBody + * @returns {HTMLElement|SVGElement} Returns the real body of a document, or an + * artificially created element that stands in for the body + */ + + function getBody() { + // After page load injecting a fake body doesn't work so check if body exists + var body = document.body; + + if (!body) { + // Can't use the real body create a fake one. + body = createElement(isSVG ? 'svg' : 'body'); + body.fake = true; + } + + return body; + } + + ; + + /** + * injectElementWithStyles injects an element with style element and some CSS rules + * + * @access private + * @function injectElementWithStyles + * @param {string} rule - String representing a css rule + * @param {function} callback - A function that is used to test the injected element + * @param {number} [nodes] - An integer representing the number of additional nodes you want injected + * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes + * @returns {boolean} + */ + + function injectElementWithStyles(rule, callback, nodes, testnames) { + var mod = 'modernizr'; + var style; + var ret; + var node; + var docOverflow; + var div = createElement('div'); + var body = getBody(); + + if (parseInt(nodes, 10)) { + // In order not to give false positives we create a node for each test + // This also allows the method to scale for unspecified uses + while (nodes--) { + node = createElement('div'); + node.id = testnames ? testnames[nodes] : mod + (nodes + 1); + div.appendChild(node); + } + } + + style = createElement('style'); + style.type = 'text/css'; + style.id = 's' + mod; + + // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody. + // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270 + (!body.fake ? div : body).appendChild(style); + body.appendChild(div); + + if (style.styleSheet) { + style.styleSheet.cssText = rule; + } else { + style.appendChild(document.createTextNode(rule)); + } + div.id = mod; + + if (body.fake) { + //avoid crashing IE8, if background image is used + body.style.background = ''; + //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible + body.style.overflow = 'hidden'; + docOverflow = docElement.style.overflow; + docElement.style.overflow = 'hidden'; + docElement.appendChild(body); + } + + ret = callback(div, rule); + // If this is done after page load we don't want to remove the body so check if body exists + if (body.fake) { + body.parentNode.removeChild(body); + docElement.style.overflow = docOverflow; + // Trigger layout so kinetic scrolling isn't disabled in iOS6+ + docElement.offsetHeight; + } else { + div.parentNode.removeChild(div); + } + + return !!ret; + + } + + ; + + /** + * domToCSS takes a camelCase string and converts it to kebab-case + * e.g. boxSizing -> box-sizing + * + * @access private + * @function domToCSS + * @param {string} name - String name of camelCase prop we want to convert + * @returns {string} The kebab-case version of the supplied name + */ + + function domToCSS(name) { + return name.replace(/([A-Z])/g, function(str, m1) { + return '-' + m1.toLowerCase(); + }).replace(/^ms-/, '-ms-'); + } + ; + + /** + * nativeTestProps allows for us to use native feature detection functionality if available. + * some prefixed form, or false, in the case of an unsupported rule + * + * @access private + * @function nativeTestProps + * @param {array} props - An array of property names + * @param {string} value - A string representing the value we want to check via @supports + * @returns {boolean|undefined} A boolean when @supports exists, undefined otherwise + */ + + // Accepts a list of property names and a single value + // Returns `undefined` if native detection not available + function nativeTestProps(props, value) { + var i = props.length; + // Start with the JS API: http://www.w3.org/TR/css3-conditional/#the-css-interface + if ('CSS' in window && 'supports' in window.CSS) { + // Try every prefixed variant of the property + while (i--) { + if (window.CSS.supports(domToCSS(props[i]), value)) { + return true; + } + } + return false; + } + // Otherwise fall back to at-rule (for Opera 12.x) + else if ('CSSSupportsRule' in window) { + // Build a condition string for every prefixed variant + var conditionText = []; + while (i--) { + conditionText.push('(' + domToCSS(props[i]) + ':' + value + ')'); + } + conditionText = conditionText.join(' or '); + return injectElementWithStyles('@supports (' + conditionText + ') { #modernizr { position: absolute; } }', function(node) { + return getComputedStyle(node, null).position == 'absolute'; + }); + } + return undefined; + } + ; + + /** + * cssToDOM takes a kebab-case string and converts it to camelCase + * e.g. box-sizing -> boxSizing + * + * @access private + * @function cssToDOM + * @param {string} name - String name of kebab-case prop we want to convert + * @returns {string} The camelCase version of the supplied name + */ + + function cssToDOM(name) { + return name.replace(/([a-z])-([a-z])/g, function(str, m1, m2) { + return m1 + m2.toUpperCase(); + }).replace(/^-/, ''); + } + ; + + // testProps is a generic CSS / DOM property test. + + // In testing support for a given CSS property, it's legit to test: + // `elem.style[styleName] !== undefined` + // If the property is supported it will return an empty string, + // if unsupported it will return undefined. + + // We'll take advantage of this quick test and skip setting a style + // on our modernizr element, but instead just testing undefined vs + // empty string. + + // Property names can be provided in either camelCase or kebab-case. + + function testProps(props, prefixed, value, skipValueTest) { + skipValueTest = is(skipValueTest, 'undefined') ? false : skipValueTest; + + // Try native detect first + if (!is(value, 'undefined')) { + var result = nativeTestProps(props, value); + if (!is(result, 'undefined')) { + return result; + } + } + + // Otherwise do it properly + var afterInit, i, propsLength, prop, before; + + // If we don't have a style element, that means we're running async or after + // the core tests, so we'll need to create our own elements to use + + // inside of an SVG element, in certain browsers, the `style` element is only + // defined for valid tags. Therefore, if `modernizr` does not have one, we + // fall back to a less used element and hope for the best. + var elems = ['modernizr', 'tspan']; + while (!mStyle.style) { + afterInit = true; + mStyle.modElem = createElement(elems.shift()); + mStyle.style = mStyle.modElem.style; + } + + // Delete the objects if we created them. + function cleanElems() { + if (afterInit) { + delete mStyle.style; + delete mStyle.modElem; + } + } + + propsLength = props.length; + for (i = 0; i < propsLength; i++) { + prop = props[i]; + before = mStyle.style[prop]; + + if (contains(prop, '-')) { + prop = cssToDOM(prop); + } + + if (mStyle.style[prop] !== undefined) { + + // If value to test has been passed in, do a set-and-check test. + // 0 (integer) is a valid property value, so check that `value` isn't + // undefined, rather than just checking it's truthy. + if (!skipValueTest && !is(value, 'undefined')) { + + // Needs a try catch block because of old IE. This is slow, but will + // be avoided in most cases because `skipValueTest` will be used. + try { + mStyle.style[prop] = value; + } catch (e) {} + + // If the property value has changed, we assume the value used is + // supported. If `value` is empty string, it'll fail here (because + // it hasn't changed), which matches how browsers have implemented + // CSS.supports() + if (mStyle.style[prop] != before) { + cleanElems(); + return prefixed == 'pfx' ? prop : true; + } + } + // Otherwise just return true, or the property name if this is a + // `prefixed()` call + else { + cleanElems(); + return prefixed == 'pfx' ? prop : true; + } + } + } + cleanElems(); + return false; + } + + ; + + /** + * testProp() investigates whether a given style property is recognized + * Property names can be provided in either camelCase or kebab-case. + * + * @memberof Modernizr + * @name Modernizr.testProp + * @access public + * @optionName Modernizr.testProp() + * @optionProp testProp + * @function testProp + * @param {string} prop - Name of the CSS property to check + * @param {string} [value] - Name of the CSS value to check + * @param {boolean} [useValue] - Whether or not to check the value if @supports isn't supported + * @returns {boolean} + * @example + * + * Just like [testAllProps](#modernizr-testallprops), only it does not check any vendor prefixed + * version of the string. + * + * Note that the property name must be provided in camelCase (e.g. boxSizing not box-sizing) + * + * ```js + * Modernizr.testProp('pointerEvents') // true + * ``` + * + * You can also provide a value as an optional second argument to check if a + * specific value is supported + * + * ```js + * Modernizr.testProp('pointerEvents', 'none') // true + * Modernizr.testProp('pointerEvents', 'penguin') // false + * ``` + */ + + var testProp = ModernizrProto.testProp = function(prop, value, useValue) { + return testProps([prop], undefined, value, useValue); + }; + + + /** + * testStyles injects an element with style element and some CSS rules + * + * @memberof Modernizr + * @name Modernizr.testStyles + * @optionName Modernizr.testStyles() + * @optionProp testStyles + * @access public + * @function testStyles + * @param {string} rule - String representing a css rule + * @param {function} callback - A function that is used to test the injected element + * @param {number} [nodes] - An integer representing the number of additional nodes you want injected + * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes + * @returns {boolean} + * @example + * + * `Modernizr.testStyles` takes a CSS rule and injects it onto the current page + * along with (possibly multiple) DOM elements. This lets you check for features + * that can not be detected by simply checking the [IDL](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Interface_development_guide/IDL_interface_rules). + * + * ```js + * Modernizr.testStyles('#modernizr { width: 9px; color: papayawhip; }', function(elem, rule) { + * // elem is the first DOM node in the page (by default #modernizr) + * // rule is the first argument you supplied - the CSS rule in string form + * + * addTest('widthworks', elem.style.width === '9px') + * }); + * ``` + * + * If your test requires multiple nodes, you can include a third argument + * indicating how many additional div elements to include on the page. The + * additional nodes are injected as children of the `elem` that is returned as + * the first argument to the callback. + * + * ```js + * Modernizr.testStyles('#modernizr {width: 1px}; #modernizr2 {width: 2px}', function(elem) { + * document.getElementById('modernizr').style.width === '1px'; // true + * document.getElementById('modernizr2').style.width === '2px'; // true + * elem.firstChild === document.getElementById('modernizr2'); // true + * }, 1); + * ``` + * + * By default, all of the additional elements have an ID of `modernizr[n]`, where + * `n` is its index (e.g. the first additional, second overall is `#modernizr2`, + * the second additional is `#modernizr3`, etc.). + * If you want to have more meaningful IDs for your function, you can provide + * them as the fourth argument, as an array of strings + * + * ```js + * Modernizr.testStyles('#foo {width: 10px}; #bar {height: 20px}', function(elem) { + * elem.firstChild === document.getElementById('foo'); // true + * elem.lastChild === document.getElementById('bar'); // true + * }, 2, ['foo', 'bar']); + * ``` + * + */ + + var testStyles = ModernizrProto.testStyles = injectElementWithStyles; + +/*! +{ + "name": "@font-face", + "property": "fontface", + "authors": ["Diego Perini", "Mat Marquis"], + "tags": ["css"], + "knownBugs": [ + "False Positive: WebOS https://github.com/Modernizr/Modernizr/issues/342", + "False Postive: WP7 https://github.com/Modernizr/Modernizr/issues/538" + ], + "notes": [{ + "name": "@font-face detection routine by Diego Perini", + "href": "http://javascript.nwbox.com/CSSSupport/" + },{ + "name": "Filament Group @font-face compatibility research", + "href": "https://docs.google.com/presentation/d/1n4NyG4uPRjAA8zn_pSQ_Ket0RhcWC6QlZ6LMjKeECo0/edit#slide=id.p" + },{ + "name": "Filament Grunticon/@font-face device testing results", + "href": "https://docs.google.com/spreadsheet/ccc?key=0Ag5_yGvxpINRdHFYeUJPNnZMWUZKR2ItMEpRTXZPdUE#gid=0" + },{ + "name": "CSS fonts on Android", + "href": "https://stackoverflow.com/questions/3200069/css-fonts-on-android" + },{ + "name": "@font-face and Android", + "href": "http://archivist.incutio.com/viewlist/css-discuss/115960" + }] +} +!*/ + + var blacklist = (function() { + var ua = navigator.userAgent; + var wkvers = ua.match(/applewebkit\/([0-9]+)/gi) && parseFloat(RegExp.$1); + var webos = ua.match(/w(eb)?osbrowser/gi); + var wppre8 = ua.match(/windows phone/gi) && ua.match(/iemobile\/([0-9])+/gi) && parseFloat(RegExp.$1) >= 9; + var oldandroid = wkvers < 533 && ua.match(/android/gi); + return webos || oldandroid || wppre8; + }()); + if (blacklist) { + Modernizr.addTest('fontface', false); + } else { + testStyles('@font-face {font-family:"font";src:url("https://")}', function(node, rule) { + var style = document.getElementById('smodernizr'); + var sheet = style.sheet || style.styleSheet; + var cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : ''; + var bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0; + Modernizr.addTest('fontface', bool); + }); + } +; + + /** + * If the browsers follow the spec, then they would expose vendor-specific style as: + * elem.style.WebkitBorderRadius + * instead of something like the following, which would be technically incorrect: + * elem.style.webkitBorderRadius + + * Webkit ghosts their properties in lowercase but Opera & Moz do not. + * Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+ + * erik.eae.net/archives/2008/03/10/21.48.10/ + + * More here: github.com/Modernizr/Modernizr/issues/issue/21 + * + * @access private + * @returns {string} The string representing the vendor-specific style properties + */ + + var omPrefixes = 'Moz O ms Webkit'; + + + var cssomPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.split(' ') : []); + ModernizrProto._cssomPrefixes = cssomPrefixes; + + + /** + * List of JavaScript DOM values used for tests + * + * @memberof Modernizr + * @name Modernizr._domPrefixes + * @optionName Modernizr._domPrefixes + * @optionProp domPrefixes + * @access public + * @example + * + * Modernizr._domPrefixes is exactly the same as [_prefixes](#modernizr-_prefixes), but rather + * than kebab-case properties, all properties are their Capitalized variant + * + * ```js + * Modernizr._domPrefixes === [ "Moz", "O", "ms", "Webkit" ]; + * ``` + */ + + var domPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.toLowerCase().split(' ') : []); + ModernizrProto._domPrefixes = domPrefixes; + + + /** + * testDOMProps is a generic DOM property test; if a browser supports + * a certain property, it won't return undefined for it. + * + * @access private + * @function testDOMProps + * @param {array.} props - An array of properties to test for + * @param {object} obj - An object or Element you want to use to test the parameters again + * @param {boolean|object} elem - An Element to bind the property lookup again. Use `false` to prevent the check + */ + function testDOMProps(props, obj, elem) { + var item; + + for (var i in props) { + if (props[i] in obj) { + + // return the property name as a string + if (elem === false) { + return props[i]; + } + + item = obj[props[i]]; + + // let's bind a function + if (is(item, 'function')) { + // bind to obj unless overriden + return fnBind(item, elem || obj); + } + + // return the unbound function or obj or value + return item; + } + } + return false; + } + + ; + + /** + * testPropsAll tests a list of DOM properties we want to check against. + * We specify literally ALL possible (known and/or likely) properties on + * the element including the non-vendor prefixed one, for forward- + * compatibility. + * + * @access private + * @function testPropsAll + * @param {string} prop - A string of the property to test for + * @param {string|object} [prefixed] - An object to check the prefixed properties on. Use a string to skip + * @param {HTMLElement|SVGElement} [elem] - An element used to test the property and value against + * @param {string} [value] - A string of a css value + * @param {boolean} [skipValueTest] - An boolean representing if you want to test if value sticks when set + */ + function testPropsAll(prop, prefixed, elem, value, skipValueTest) { + + var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1), + props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' '); + + // did they call .prefixed('boxSizing') or are we just testing a prop? + if (is(prefixed, 'string') || is(prefixed, 'undefined')) { + return testProps(props, prefixed, value, skipValueTest); + + // otherwise, they called .prefixed('requestAnimationFrame', window[, elem]) + } else { + props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' '); + return testDOMProps(props, prefixed, elem); + } + } + + // Modernizr.testAllProps() investigates whether a given style property, + // or any of its vendor-prefixed variants, is recognized + // + // Note that the property names must be provided in the camelCase variant. + // Modernizr.testAllProps('boxSizing') + ModernizrProto.testAllProps = testPropsAll; + + + + /** + * testAllProps determines whether a given CSS property is supported in the browser + * + * @memberof Modernizr + * @name Modernizr.testAllProps + * @optionName Modernizr.testAllProps() + * @optionProp testAllProps + * @access public + * @function testAllProps + * @param {string} prop - String naming the property to test (either camelCase or kebab-case) + * @param {string} [value] - String of the value to test + * @param {boolean} [skipValueTest=false] - Whether to skip testing that the value is supported when using non-native detection + * @example + * + * testAllProps determines whether a given CSS property, in some prefixed form, + * is supported by the browser. + * + * ```js + * testAllProps('boxSizing') // true + * ``` + * + * It can optionally be given a CSS value in string form to test if a property + * value is valid + * + * ```js + * testAllProps('display', 'block') // true + * testAllProps('display', 'penguin') // false + * ``` + * + * A boolean can be passed as a third parameter to skip the value check when + * native detection (@supports) isn't available. + * + * ```js + * testAllProps('shapeOutside', 'content-box', true); + * ``` + */ + + function testAllProps(prop, value, skipValueTest) { + return testPropsAll(prop, undefined, undefined, value, skipValueTest); + } + ModernizrProto.testAllProps = testAllProps; + +/*! +{ + "name": "CSS Supports", + "property": "supports", + "caniuse": "css-featurequeries", + "tags": ["css"], + "builderAliases": ["css_supports"], + "notes": [{ + "name": "W3 Spec", + "href": "http://dev.w3.org/csswg/css3-conditional/#at-supports" + },{ + "name": "Related Github Issue", + "href": "github.com/Modernizr/Modernizr/issues/648" + },{ + "name": "W3 Info", + "href": "http://dev.w3.org/csswg/css3-conditional/#the-csssupportsrule-interface" + }] +} +!*/ + + var newSyntax = 'CSS' in window && 'supports' in window.CSS; + var oldSyntax = 'supportsCSS' in window; + Modernizr.addTest('supports', newSyntax || oldSyntax); + +/*! +{ + "name": "CSS Transforms 3D", + "property": "csstransforms3d", + "caniuse": "transforms3d", + "tags": ["css"], + "warnings": [ + "Chrome may occassionally fail this test on some systems; more info: https://code.google.com/p/chromium/issues/detail?id=129004" + ] +} +!*/ + + Modernizr.addTest('csstransforms3d', function() { + var ret = !!testAllProps('perspective', '1px', true); + var usePrefix = Modernizr._config.usePrefixes; + + // Webkit's 3D transforms are passed off to the browser's own graphics renderer. + // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in + // some conditions. As a result, Webkit typically recognizes the syntax but + // will sometimes throw a false positive, thus we must do a more thorough check: + if (ret && (!usePrefix || 'webkitPerspective' in docElement.style)) { + var mq; + var defaultStyle = '#modernizr{width:0;height:0}'; + // Use CSS Conditional Rules if available + if (Modernizr.supports) { + mq = '@supports (perspective: 1px)'; + } else { + // Otherwise, Webkit allows this media query to succeed only if the feature is enabled. + // `@media (transform-3d),(-webkit-transform-3d){ ... }` + mq = '@media (transform-3d)'; + if (usePrefix) { + mq += ',(-webkit-transform-3d)'; + } + } + + mq += '{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}'; + + testStyles(defaultStyle + mq, function(elem) { + ret = elem.offsetWidth === 7 && elem.offsetHeight === 18; + }); + } + + return ret; + }); + +/*! +{ + "name": "CSS :target pseudo-class", + "caniuse": "css-sel3", + "property": "target", + "tags": ["css"], + "notes": [{ + "name": "MDN documentation", + "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/:target" + }], + "authors": ["@zachleat"], + "warnings": ["Opera Mini supports :target but doesn't update the hash for anchor links."] +} +!*/ +/* DOC +Detects support for the ':target' CSS pseudo-class. +*/ + + // querySelector + Modernizr.addTest('target', function() { + var doc = window.document; + if (!('querySelectorAll' in doc)) { + return false; + } + + try { + doc.querySelectorAll(':target'); + return true; + } catch (e) { + return false; + } + }); + +/*! +{ + "name": "ES5 String.prototype.contains", + "property": "contains", + "authors": ["Robert Kowalski"], + "tags": ["es6"] +} +!*/ +/* DOC +Check if browser implements ECMAScript 6 `String.prototype.contains` per specification. +*/ + + Modernizr.addTest('contains', is(String.prototype.contains, 'function')); + + + // Run each test + testRunner(); + + // Remove the "no-js" class if it exists + setClasses(classes); + + delete ModernizrProto.addTest; + delete ModernizrProto.addAsyncTest; + + // Run the things that are supposed to run after the tests + for (var i = 0; i < Modernizr._q.length; i++) { + Modernizr._q[i](); + } + + // Leak Modernizr namespace + window.Modernizr = Modernizr; + + +; + +})(window, document); \ No newline at end of file diff --git a/material/assets/javascripts/modernizr-d1e05123d4.js b/material/assets/javascripts/modernizr-d1e05123d4.js deleted file mode 100644 index d7330594b..000000000 --- a/material/assets/javascripts/modernizr-d1e05123d4.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t,n){function r(e,t){return typeof e===t}function o(){var e,t,n,o,i,a,s;for(var l in E)if(E.hasOwnProperty(l)){if(e=[],t=E[l],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;nu;u++)if(h=e[u],g=N.style[h],l(h,"-")&&(h=m(h)),N.style[h]!==n){if(i||r(o,"undefined"))return a(),"pfx"==t?h:!0;try{N.style[h]=o}catch(y){}if(N.style[h]!=g)return a(),"pfx"==t?h:!0}return a(),!1}function g(e,t,n){var o;for(var i in e)if(e[i]in t)return n===!1?e[i]:(o=t[e[i]],r(o,"function")?s(o,n||t):o);return!1}function v(e,t,n,o,i){var a=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+z.join(a+" ")+a).split(" ");return r(t,"string")||r(t,"undefined")?h(s,t,o,i):(s=(e+" "+F.join(a+" ")+a).split(" "),g(s,t,n))}function y(e,t,r){return v(e,n,n,t,r)}var E=[],S={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){E.push({name:e,fn:t,options:n})},addAsyncTest:function(e){E.push({name:null,fn:e})}},b=function(){};b.prototype=S,b=new b;var w,C=[],x=t.documentElement,T="svg"===x.nodeName.toLowerCase();!function(){var e={}.hasOwnProperty;w=r(e,"undefined")||r(e.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),S._l={},S.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),b.hasOwnProperty(e)&&setTimeout(function(){b._trigger(e,b[e])},0)},S._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout(function(){var e,r;for(e=0;e",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=x.elements;return"string"==typeof e?e.split(" "):e}function o(e,t){var n=x.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),x.elements=n+" "+e,c(t)}function i(e){var t=C[e[b]];return t||(t={},w++,e[b]=w,C[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():S.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!o.canHaveChildren||E.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;l>a;a++)o.createElement(s[a]);return o}function l(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return x.shivMethods?a(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(x,t.frag)}function c(e){e||(e=t);var r=i(e);return!x.shivCSS||h||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),g||l(e,r),e}function f(e){for(var t,n=e.getElementsByTagName("*"),o=n.length,i=RegExp("^(?:"+r().join("|")+")$","i"),a=[];o--;)t=n[o],i.test(t.nodeName)&&a.push(t.applyElement(u(t)));return a}function u(e){for(var t,n=e.attributes,r=n.length,o=e.ownerDocument.createElement(_+":"+e.nodeName);r--;)t=n[r],t.specified&&o.setAttribute(t.nodeName,t.nodeValue);return o.style.cssText=e.style.cssText,o}function d(e){for(var t,n=e.split("{"),o=n.length,i=RegExp("(^|[\\s,>+~])("+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=[],u=l.length,p=Array(u);u--;)p[u]=l[u];for(;s=p.pop();)if(!s.disabled&&T.test(s.media)){try{i=s.imports,a=i.length}catch(m){a=0}for(u=0;a>u;u++)p.push(i[u]);try{c.push(s.cssText)}catch(m){}}c=d(c.reverse().join("")),o=f(e),r=n(e,c)}),l.attachEvent("onafterprint",function(){p(o),clearTimeout(a._removeSheetTimer),a._removeSheetTimer=setTimeout(t,500)}),e.printShived=!0,e)}var h,g,v="3.7.3",y=e.html5||{},E=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,S=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,b="_html5shiv",w=0,C={};!function(){try{var e=t.createElement("a");e.innerHTML="",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 x={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=x,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)}();x.type+=" print",x.shivPrint=m,m(t),"object"==typeof module&&module.exports&&(module.exports=x)}("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});var j=(S.testProp=function(e,t,r){return h([e],n,t,r)},S.testStyles=u),P=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=533>t&&e.match(/android/gi);return n||o||r}();P?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 k="Moz O ms Webkit",z=S._config.usePrefixes?k.split(" "):[];S._cssomPrefixes=z;var F=S._config.usePrefixes?k.toLowerCase().split(" "):[];S._domPrefixes=F,S.testAllProps=v,S.testAllProps=y;var $="CSS"in e&&"supports"in e.CSS,A="supportsCSS"in e;b.addTest("supports",$||A),b.addTest("csstransforms3d",function(){var e=!!y("perspective","1px",!0),t=b._config.usePrefixes;if(e&&(!t||"webkitPerspective"in x.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("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(C),delete S.addTest,delete S.addAsyncTest;for(var q=0;q - + {% for path in extra_css %} {% endfor %} - + diff --git a/material/header.html b/material/header.html index c3b0fe535..3eddad033 100644 --- a/material/header.html +++ b/material/header.html @@ -11,6 +11,10 @@
    +
    diff --git a/material/manifest.json b/material/manifest.json index afc12c110..6b643ea4d 100644 --- a/material/manifest.json +++ b/material/manifest.json @@ -1,6 +1,6 @@ { "assets/images/favicon.ico": "assets/images/favicon-e565ddfa3b.ico", "assets/javascripts/application.js": "assets/javascripts/application-a7f7c32389.js", - "assets/javascripts/modernizr.js": "assets/javascripts/modernizr-d1e05123d4.js", - "assets/stylesheets/application.css": "assets/stylesheets/application-fe75383308.css" + "assets/javascripts/modernizr.js": "assets/javascripts/modernizr-30b4746408.js", + "assets/stylesheets/application.css": "assets/stylesheets/application-cbf902c7ca.css" } \ No newline at end of file diff --git a/src/assets/stylesheets/base/_typeset.scss b/src/assets/stylesheets/base/_typeset.scss index 454a620c2..b6692ea86 100644 --- a/src/assets/stylesheets/base/_typeset.scss +++ b/src/assets/stylesheets/base/_typeset.scss @@ -101,10 +101,10 @@ pre, code { * 2nd level headline */ h2 { + margin-top: 4.0rem; font-size: ms(2); font-weight: 300; line-height: 1.4; - margin-top: 4.0rem; letter-spacing: -.01em; /* @@ -122,10 +122,10 @@ pre, code { * 3rd level headline */ h3 { + margin-top: 3.2rem; font-size: ms(1); font-weight: 400; line-height: 1.5; - margin-top: 3.2rem; letter-spacing: -.01em; /* @@ -150,17 +150,15 @@ pre, code { * 4th, 5th and 6th level headline */ h4 { + margin-top: 1.6rem; font-size: ms(0); font-weight: 700; - margin-top: 1.6rem; letter-spacing: -.01em; /* * Correct anchor offset */ &:before { - position: relative; - z-index: -4; content: " "; display: block; padding-top: (5.6rem + 2.4rem + 0.8rem); @@ -172,9 +170,9 @@ pre, code { * 5th and 6th level headline */ h5, h6 { + margin-top: 1.6rem; font-size: ms(-1); font-weight: 700; - margin-top: 1.6rem; letter-spacing: -.01em; color: $md-color-black--light; @@ -182,8 +180,6 @@ pre, code { * Correct anchor offset */ &:before { - position: relative; - z-index: -5; content: " "; display: block; padding-top: (5.6rem + 2.4rem + 1.0rem); @@ -218,24 +214,24 @@ pre, code { * Inline code blocks */ code { + padding: 0.1rem 0.4rem; font-size: 85%; font-weight: 400; word-break: break-word; - padding: 0.1rem 0.4rem; - background: #f7f7f7; - color: #37474f; + background: #F7F7F7; + color: #37474F; } /* * Formatted code blocks */ pre { - font-size: 85%; - line-height: 1.4; padding: 1.0rem 1.2rem; overflow-x: scroll; - background: #f7f7f7; - color: #37474f; + font-size: 85%; + line-height: 1.4; + background: #F7F7F7; + color: #37474F; } /* @@ -243,13 +239,13 @@ pre, code { */ kbd { display: inline-block; + padding: 0.4rem 0.5rem 0.5rem; + vertical-align: 0.1rem; font-size: 85%; line-height: 1.0rem; word-break: break-word; - padding: 0.4rem 0.5rem 0.5rem; - vertical-align: 0.1rem; - color: #555; background-color: #FCFCFC; + color: #555555; border: px2rem(1px) solid #CCCCCC; border-bottom-color: #BBBBBB; border-radius: px2rem(3px); diff --git a/src/assets/stylesheets/extensions/_codehilite.scss b/src/assets/stylesheets/extensions/_codehilite.scss index 7a7bb7d3c..ac7c4654e 100644 --- a/src/assets/stylesheets/extensions/_codehilite.scss +++ b/src/assets/stylesheets/extensions/_codehilite.scss @@ -33,7 +33,7 @@ /* * Errors */ - .err { color: #a61717; } + .err { color: #A61717; } /* * Operators @@ -44,24 +44,24 @@ * Generics */ .ge { color: #000000; } /* Generic.Emph */ - .gr { color: #aa0000; } /* Generic.Error */ + .gr { color: #AA0000; } /* Generic.Error */ .gh { color: #999999; } /* Generic.Heading */ .go { color: #888888; } /* Generic.Output */ .gp { color: #555555; } /* Generic.Prompt */ .gs { color: inherit; } /* Generic.Strong */ - .gu { color: #aaaaaa; } /* Generic.Subheading */ - .gt { color: #aa0000; } /* Generic.Traceback */ + .gu { color: #AAAAAA; } /* Generic.Subheading */ + .gt { color: #AA0000; } /* Generic.Traceback */ /* * Keywords */ - .k { color: #a71d5d; } /* Keyword */ - .kc { color: #a71d5d; } /* Keyword.Constant */ - .kd { color: #a71d5d; } /* Keyword.Declaration */ - .kn { color: #a71d5d; } /* Keyword.Namespace */ - .kp { color: #a71d5d; } /* Keyword.Pseudo */ - .kr { color: #0086b3; } /* Keyword.Reserved */ - .kt { color: #0086b3; } /* Keyword.Type */ + .k { color: #A71D5D; } /* Keyword */ + .kc { color: #A71D5D; } /* Keyword.Constant */ + .kd { color: #A71D5D; } /* Keyword.Declaration */ + .kn { color: #A71D5D; } /* Keyword.Namespace */ + .kp { color: #A71D5D; } /* Keyword.Pseudo */ + .kr { color: #0086B3; } /* Keyword.Reserved */ + .kt { color: #0086B3; } /* Keyword.Type */ /* * Comments @@ -75,34 +75,34 @@ /* * Names */ - .na { color: #795da3; } /* Name.Attribute */ - .na { color: #795da3; } /* Name.Attribute */ - .nb { color: #795da3; } /* Name.Builtin */ - .bp { color: #795da3; } /* Name.Builtin.Pseudo */ - .nc { color: #795da3; } /* Name.Class */ - .no { color: #795da3; } /* Name.Constant */ - .nd { color: #795da3; } /* Name.Decorator */ - .ni { color: #795da3; } /* Name.Entity */ - .ne { color: #795da3; } /* Name.Exception */ - .nf { color: #795da3; } /* Name.Function */ - .nl { color: #795da3; } /* Name.Label */ - .nn { color: #795da3; } /* Name.Namespace */ - .nt { color: #795da3; } /* Name.Tag */ - .nv { color: #795da3; } /* Name.Variable */ - .vc { color: #795da3; } /* Name.Variable.Class */ - .vg { color: #795da3; } /* Name.Variable.Global */ - .vi { color: #795da3; } /* Name.Variable.Instance */ + .na { color: #795DA3; } /* Name.Attribute */ + .na { color: #795DA3; } /* Name.Attribute */ + .nb { color: #795DA3; } /* Name.Builtin */ + .bp { color: #795DA3; } /* Name.Builtin.Pseudo */ + .nc { color: #795DA3; } /* Name.Class */ + .no { color: #795DA3; } /* Name.Constant */ + .nd { color: #795DA3; } /* Name.Decorator */ + .ni { color: #795DA3; } /* Name.Entity */ + .ne { color: #795DA3; } /* Name.Exception */ + .nf { color: #795DA3; } /* Name.Function */ + .nl { color: #795DA3; } /* Name.Label */ + .nn { color: #795DA3; } /* Name.Namespace */ + .nt { color: #795DA3; } /* Name.Tag */ + .nv { color: #795DA3; } /* Name.Variable */ + .vc { color: #795DA3; } /* Name.Variable.Class */ + .vg { color: #795DA3; } /* Name.Variable.Global */ + .vi { color: #795DA3; } /* Name.Variable.Instance */ .ow { color: inherit; } /* Operator.Word */ /* * Numbers */ - .m { color: #0086b3; } /* Literal.Number */ - .mf { color: #0086b3; } /* Literal.Number.Float */ - .mh { color: #0086b3; } /* Literal.Number.Hex */ - .mi { color: #0086b3; } /* Literal.Number.Integer */ - .mo { color: #0086b3; } /* Literal.Number.Oct */ - .il { color: #0086b3; } /* Literal.Number.Integer.Long */ + .m { color: #0086B3; } /* Literal.Number */ + .mf { color: #0086B3; } /* Literal.Number.Float */ + .mh { color: #0086B3; } /* Literal.Number.Hex */ + .mi { color: #0086B3; } /* Literal.Number.Integer */ + .mo { color: #0086B3; } /* Literal.Number.Oct */ + .il { color: #0086B3; } /* Literal.Number.Integer.Long */ /* * Strings @@ -117,7 +117,7 @@ .si { color: #183691; } /* Literal.String.Interpol */ .sx { color: #183691; } /* Literal.String.Other */ .sr { color: #009926; } /* Literal.String.Regex */ - .s1 { color: #d01040; } /* Literal.String.Single */ + .s1 { color: #D01040; } /* Literal.String.Single */ .ss { color: #990073; } /* Literal.String.Symbol */ /* diff --git a/src/assets/stylesheets/extensions/_permalinks.scss b/src/assets/stylesheets/extensions/_permalinks.scss index f3c8caefd..a8437a2dd 100644 --- a/src/assets/stylesheets/extensions/_permalinks.scss +++ b/src/assets/stylesheets/extensions/_permalinks.scss @@ -44,7 +44,7 @@ } /* - * Only show permalinks in hover state + * Only show permalinks in active state */ h1, h2, h3, h4, h5, h6 { &:hover .headerlink { diff --git a/src/assets/stylesheets/layout/_header.scss b/src/assets/stylesheets/layout/_header.scss index 009fcad25..c09974011 100644 --- a/src/assets/stylesheets/layout/_header.scss +++ b/src/assets/stylesheets/layout/_header.scss @@ -63,6 +63,17 @@ &:active { background: $md-color-white--lightest; } + + /* [tablet portrait +]: Hide the search icon */ + @include break-from-device(tablet landscape) { + + /* + * Search icon + */ + &.md-icon--search { + display: none; + } + } } /* @@ -74,4 +85,67 @@ line-height: 4.8rem; } } + + /* + * Search bar within header + */ + &-search { + position: relative; + margin: 0.6rem 0.4rem 0.6rem 0; + + /* + * Icon + */ + &__icon { + position: absolute; + top: 0.6rem; + left: 1.2rem; + font-size: 2.4rem; + transition: color .25s; + cursor: pointer; + } + + /* + * Search field - the float is a hack for non-jittery transitions + */ + &__input { + width: 23.0rem; + height: 3.6rem; + padding-left: 4.4rem; + padding-right: 0.8rem; + float: right; + font-size: ms(0); + background: $md-color-primary--dark; + color: $md-color-white; + border-radius: px2rem(2px); + transition: color .25s, + background-color .25s, + width .25s cubic-bezier(0.1, 0.7, 0.1, 1); + + /* + * Placeholder color + */ + &::placeholder { + color: $md-color-white--light; + transition: color .25s; + } + + /* + * Active search field + */ + &:focus { + background: $md-color-white; + color: $md-color-black; + width: 40rem; + + /* + * Placeholder and icon color in active state + */ + + .md-header-search__icon, + &::placeholder { + color: $md-color-black--light; + } + } + } + } } \ No newline at end of file diff --git a/src/assets/stylesheets/layout/_search.scss b/src/assets/stylesheets/layout/_search.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/header.html b/src/header.html index f4a9ec52f..76119827e 100644 --- a/src/header.html +++ b/src/header.html @@ -44,6 +44,13 @@
    +
    From c3e10c25f3bdd4e43a74eff217269e7ce829c341 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Wed, 10 Aug 2016 23:01:31 +0200 Subject: [PATCH 003/202] Add target support for permalinks --- docs/getting-started.md | 2 +- .../javascripts/modernizr-30b4746408.js | 1818 ----------------- .../javascripts/modernizr-d1e05123d4.js | 1 + .../stylesheets/application-76344d4d6f.css | 1 + .../stylesheets/application-cbf902c7ca.css | 1 - material/assets/stylesheets/application.css | 2 +- material/base.html | 4 +- material/header.html | 22 +- material/manifest.json | 4 +- .../stylesheets/extensions/_permalinks.scss | 17 +- src/assets/stylesheets/layout/_header.scss | 11 +- src/header.html | 15 +- 12 files changed, 54 insertions(+), 1844 deletions(-) delete mode 100644 material/assets/javascripts/modernizr-30b4746408.js create mode 100644 material/assets/javascripts/modernizr-d1e05123d4.js create mode 100644 material/assets/stylesheets/application-76344d4d6f.css delete mode 100644 material/assets/stylesheets/application-cbf902c7ca.css diff --git a/docs/getting-started.md b/docs/getting-started.md index 40825b89f..7bb1ca45b 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -215,7 +215,7 @@ If you want more extensive highlighting, you can use a JavaScript library like [highlight.js][], which is not included in Material. See [this link][extra] for further instructions -### Permalinks +### Permalinks recommended In order to add [permalinks][] to the headers of your article, set the `markdown_extensions.toc.permalink` variable to a symbol, e.g. `¶`: diff --git a/material/assets/javascripts/modernizr-30b4746408.js b/material/assets/javascripts/modernizr-30b4746408.js deleted file mode 100644 index c309a1b82..000000000 --- a/material/assets/javascripts/modernizr-30b4746408.js +++ /dev/null @@ -1,1818 +0,0 @@ -/*! - * modernizr v3.3.1 - * Build http://modernizr.com/download?-contains-csstransforms3d-fontface-supports-target-addtest-fnbind-printshiv-setclasses-testprop-dontmin - * - * Copyright (c) - * Faruk Ates - * Paul Irish - * Alex Sexton - * Ryan Seddon - * Patrick Kettner - * Stu Cox - * Richard Herrera - - * MIT License - */ - -/* - * Modernizr tests which native CSS3 and HTML5 features are available in the - * current UA and makes the results available to you in two ways: as properties on - * a global `Modernizr` object, and as classes on the `` element. This - * information allows you to progressively enhance your pages with a granular level - * of control over the experience. -*/ - -;(function(window, document, undefined){ - var tests = []; - - - /** - * - * ModernizrProto is the constructor for Modernizr - * - * @class - * @access public - */ - - var ModernizrProto = { - // The current version, dummy - _version: '3.3.1', - - // Any settings that don't work as separate modules - // can go in here as configuration. - _config: { - 'classPrefix': '', - 'enableClasses': true, - 'enableJSClass': true, - 'usePrefixes': true - }, - - // Queue of tests - _q: [], - - // Stub these for people who are listening - on: function(test, cb) { - // I don't really think people should do this, but we can - // safe guard it a bit. - // -- NOTE:: this gets WAY overridden in src/addTest for actual async tests. - // This is in case people listen to synchronous tests. I would leave it out, - // but the code to *disallow* sync tests in the real version of this - // function is actually larger than this. - var self = this; - setTimeout(function() { - cb(self[test]); - }, 0); - }, - - addTest: function(name, fn, options) { - tests.push({name: name, fn: fn, options: options}); - }, - - addAsyncTest: function(fn) { - tests.push({name: null, fn: fn}); - } - }; - - - - // Fake some of Object.create so we can force non test results to be non "own" properties. - var Modernizr = function() {}; - Modernizr.prototype = ModernizrProto; - - // Leak modernizr globally when you `require` it rather than force it here. - // Overwrite name so constructor name is nicer :D - Modernizr = new Modernizr(); - - - - var classes = []; - - - /** - * is returns a boolean if the typeof an obj is exactly type. - * - * @access private - * @function is - * @param {*} obj - A thing we want to check the type of - * @param {string} type - A string to compare the typeof against - * @returns {boolean} - */ - - function is(obj, type) { - return typeof obj === type; - } - ; - - /** - * Run through all tests and detect their support in the current UA. - * - * @access private - */ - - function testRunner() { - var featureNames; - var feature; - var aliasIdx; - var result; - var nameIdx; - var featureName; - var featureNameSplit; - - for (var featureIdx in tests) { - if (tests.hasOwnProperty(featureIdx)) { - featureNames = []; - feature = tests[featureIdx]; - // run the test, throw the return value into the Modernizr, - // then based on that boolean, define an appropriate className - // and push it into an array of classes we'll join later. - // - // If there is no name, it's an 'async' test that is run, - // but not directly added to the object. That should - // be done with a post-run addTest call. - if (feature.name) { - featureNames.push(feature.name.toLowerCase()); - - if (feature.options && feature.options.aliases && feature.options.aliases.length) { - // Add all the aliases into the names list - for (aliasIdx = 0; aliasIdx < feature.options.aliases.length; aliasIdx++) { - featureNames.push(feature.options.aliases[aliasIdx].toLowerCase()); - } - } - } - - // Run the test, or use the raw value if it's not a function - result = is(feature.fn, 'function') ? feature.fn() : feature.fn; - - - // Set each of the names on the Modernizr object - for (nameIdx = 0; nameIdx < featureNames.length; nameIdx++) { - featureName = featureNames[nameIdx]; - // Support dot properties as sub tests. We don't do checking to make sure - // that the implied parent tests have been added. You must call them in - // order (either in the test, or make the parent test a dependency). - // - // Cap it to TWO to make the logic simple and because who needs that kind of subtesting - // hashtag famous last words - featureNameSplit = featureName.split('.'); - - if (featureNameSplit.length === 1) { - Modernizr[featureNameSplit[0]] = result; - } else { - // cast to a Boolean, if not one already - /* jshint -W053 */ - if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) { - Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]); - } - - Modernizr[featureNameSplit[0]][featureNameSplit[1]] = result; - } - - classes.push((result ? '' : 'no-') + featureNameSplit.join('-')); - } - } - } - } - ; - - /** - * docElement is a convenience wrapper to grab the root element of the document - * - * @access private - * @returns {HTMLElement|SVGElement} The root element of the document - */ - - var docElement = document.documentElement; - - - /** - * A convenience helper to check if the document we are running in is an SVG document - * - * @access private - * @returns {boolean} - */ - - var isSVG = docElement.nodeName.toLowerCase() === 'svg'; - - - /** - * setClasses takes an array of class names and adds them to the root element - * - * @access private - * @function setClasses - * @param {string[]} classes - Array of class names - */ - - // Pass in an and array of class names, e.g.: - // ['no-webp', 'borderradius', ...] - function setClasses(classes) { - var className = docElement.className; - var classPrefix = Modernizr._config.classPrefix || ''; - - if (isSVG) { - className = className.baseVal; - } - - // Change `no-js` to `js` (independently of the `enableClasses` option) - // Handle classPrefix on this too - if (Modernizr._config.enableJSClass) { - var reJS = new RegExp('(^|\\s)' + classPrefix + 'no-js(\\s|$)'); - className = className.replace(reJS, '$1' + classPrefix + 'js$2'); - } - - if (Modernizr._config.enableClasses) { - // Add the new classes - className += ' ' + classPrefix + classes.join(' ' + classPrefix); - isSVG ? docElement.className.baseVal = className : docElement.className = className; - } - - } - - ; - - /** - * hasOwnProp is a shim for hasOwnProperty that is needed for Safari 2.0 support - * - * @author kangax - * @access private - * @function hasOwnProp - * @param {object} object - The object to check for a property - * @param {string} property - The property to check for - * @returns {boolean} - */ - - // hasOwnProperty shim by kangax needed for Safari 2.0 support - var hasOwnProp; - - (function() { - var _hasOwnProperty = ({}).hasOwnProperty; - /* istanbul ignore else */ - /* we have no way of testing IE 5.5 or safari 2, - * so just assume the else gets hit */ - if (!is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined')) { - hasOwnProp = function(object, property) { - return _hasOwnProperty.call(object, property); - }; - } - else { - hasOwnProp = function(object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */ - return ((property in object) && is(object.constructor.prototype[property], 'undefined')); - }; - } - })(); - - - - - // _l tracks listeners for async tests, as well as tests that execute after the initial run - ModernizrProto._l = {}; - - /** - * Modernizr.on is a way to listen for the completion of async tests. Being - * asynchronous, they may not finish before your scripts run. As a result you - * will get a possibly false negative `undefined` value. - * - * @memberof Modernizr - * @name Modernizr.on - * @access public - * @function on - * @param {string} feature - String name of the feature detect - * @param {function} cb - Callback function returning a Boolean - true if feature is supported, false if not - * @example - * - * ```js - * Modernizr.on('flash', function( result ) { - * if (result) { - * // the browser has flash - * } else { - * // the browser does not have flash - * } - * }); - * ``` - */ - - ModernizrProto.on = function(feature, cb) { - // Create the list of listeners if it doesn't exist - if (!this._l[feature]) { - this._l[feature] = []; - } - - // Push this test on to the listener list - this._l[feature].push(cb); - - // If it's already been resolved, trigger it on next tick - if (Modernizr.hasOwnProperty(feature)) { - // Next Tick - setTimeout(function() { - Modernizr._trigger(feature, Modernizr[feature]); - }, 0); - } - }; - - /** - * _trigger is the private function used to signal test completion and run any - * callbacks registered through [Modernizr.on](#modernizr-on) - * - * @memberof Modernizr - * @name Modernizr._trigger - * @access private - * @function _trigger - * @param {string} feature - string name of the feature detect - * @param {function|boolean} [res] - A feature detection function, or the boolean = - * result of a feature detection function - */ - - ModernizrProto._trigger = function(feature, res) { - if (!this._l[feature]) { - return; - } - - var cbs = this._l[feature]; - - // Force async - setTimeout(function() { - var i, cb; - for (i = 0; i < cbs.length; i++) { - cb = cbs[i]; - cb(res); - } - }, 0); - - // Don't trigger these again - delete this._l[feature]; - }; - - /** - * addTest allows you to define your own feature detects that are not currently - * included in Modernizr (under the covers it's the exact same code Modernizr - * uses for its own [feature detections](https://github.com/Modernizr/Modernizr/tree/master/feature-detects)). Just like the offical detects, the result - * will be added onto the Modernizr object, as well as an appropriate className set on - * the html element when configured to do so - * - * @memberof Modernizr - * @name Modernizr.addTest - * @optionName Modernizr.addTest() - * @optionProp addTest - * @access public - * @function addTest - * @param {string|object} feature - The string name of the feature detect, or an - * object of feature detect names and test - * @param {function|boolean} test - Function returning true if feature is supported, - * false if not. Otherwise a boolean representing the results of a feature detection - * @example - * - * The most common way of creating your own feature detects is by calling - * `Modernizr.addTest` with a string (preferably just lowercase, without any - * punctuation), and a function you want executed that will return a boolean result - * - * ```js - * Modernizr.addTest('itsTuesday', function() { - * var d = new Date(); - * return d.getDay() === 2; - * }); - * ``` - * - * When the above is run, it will set Modernizr.itstuesday to `true` when it is tuesday, - * and to `false` every other day of the week. One thing to notice is that the names of - * feature detect functions are always lowercased when added to the Modernizr object. That - * means that `Modernizr.itsTuesday` will not exist, but `Modernizr.itstuesday` will. - * - * - * Since we only look at the returned value from any feature detection function, - * you do not need to actually use a function. For simple detections, just passing - * in a statement that will return a boolean value works just fine. - * - * ```js - * Modernizr.addTest('hasJquery', 'jQuery' in window); - * ``` - * - * Just like before, when the above runs `Modernizr.hasjquery` will be true if - * jQuery has been included on the page. Not using a function saves a small amount - * of overhead for the browser, as well as making your code much more readable. - * - * Finally, you also have the ability to pass in an object of feature names and - * their tests. This is handy if you want to add multiple detections in one go. - * The keys should always be a string, and the value can be either a boolean or - * function that returns a boolean. - * - * ```js - * var detects = { - * 'hasjquery': 'jQuery' in window, - * 'itstuesday': function() { - * var d = new Date(); - * return d.getDay() === 2; - * } - * } - * - * Modernizr.addTest(detects); - * ``` - * - * There is really no difference between the first methods and this one, it is - * just a convenience to let you write more readable code. - */ - - function addTest(feature, test) { - - if (typeof feature == 'object') { - for (var key in feature) { - if (hasOwnProp(feature, key)) { - addTest(key, feature[ key ]); - } - } - } else { - - feature = feature.toLowerCase(); - var featureNameSplit = feature.split('.'); - var last = Modernizr[featureNameSplit[0]]; - - // Again, we don't check for parent test existence. Get that right, though. - if (featureNameSplit.length == 2) { - last = last[featureNameSplit[1]]; - } - - if (typeof last != 'undefined') { - // we're going to quit if you're trying to overwrite an existing test - // if we were to allow it, we'd do this: - // var re = new RegExp("\\b(no-)?" + feature + "\\b"); - // docElement.className = docElement.className.replace( re, '' ); - // but, no rly, stuff 'em. - return Modernizr; - } - - test = typeof test == 'function' ? test() : test; - - // Set the value (this is the magic, right here). - if (featureNameSplit.length == 1) { - Modernizr[featureNameSplit[0]] = test; - } else { - // cast to a Boolean, if not one already - /* jshint -W053 */ - if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) { - Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]); - } - - Modernizr[featureNameSplit[0]][featureNameSplit[1]] = test; - } - - // Set a single class (either `feature` or `no-feature`) - /* jshint -W041 */ - setClasses([(!!test && test != false ? '' : 'no-') + featureNameSplit.join('-')]); - /* jshint +W041 */ - - // Trigger the event - Modernizr._trigger(feature, test); - } - - return Modernizr; // allow chaining. - } - - // After all the tests are run, add self to the Modernizr prototype - Modernizr._q.push(function() { - ModernizrProto.addTest = addTest; - }); - - - - - /** - * fnBind is a super small [bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) polyfill. - * - * @access private - * @function fnBind - * @param {function} fn - a function you want to change `this` reference to - * @param {object} that - the `this` you want to call the function with - * @returns {function} The wrapped version of the supplied function - */ - - function fnBind(fn, that) { - return function() { - return fn.apply(that, arguments); - }; - } - - ; - -/** - * @optionName html5printshiv - * @optionProp html5printshiv - */ - - // Take the html5 variable out of the html5shiv scope so we can return it. - var html5; - if (!isSVG) { - - /** - * @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed - */ - ;(function(window, document) { - /*jshint evil:true */ - /** version */ - var version = '3.7.3'; - - /** Preset options */ - var options = window.html5 || {}; - - /** Used to skip problem elements */ - var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i; - - /** Not all elements can be cloned in IE **/ - var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i; - - /** Detect whether the browser supports default html5 styles */ - var supportsHtml5Styles; - - /** Name of the expando, to work with multiple documents or to re-shiv one document */ - var expando = '_html5shiv'; - - /** The id for the the documents expando */ - var expanID = 0; - - /** Cached data for each document */ - var expandoData = {}; - - /** Detect whether the browser supports unknown elements */ - var supportsUnknownElements; - - (function() { - try { - var a = document.createElement('a'); - a.innerHTML = ''; - //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles - supportsHtml5Styles = ('hidden' in a); - - supportsUnknownElements = a.childNodes.length == 1 || (function() { - // assign a false positive if unable to shiv - (document.createElement)('a'); - var frag = document.createDocumentFragment(); - return ( - typeof frag.cloneNode == 'undefined' || - typeof frag.createDocumentFragment == 'undefined' || - typeof frag.createElement == 'undefined' - ); - }()); - } catch(e) { - // assign a false positive if detection fails => unable to shiv - supportsHtml5Styles = true; - supportsUnknownElements = true; - } - - }()); - - /*--------------------------------------------------------------------------*/ - - /** - * Creates a style sheet with the given CSS text and adds it to the document. - * @private - * @param {Document} ownerDocument The document. - * @param {String} cssText The CSS text. - * @returns {StyleSheet} The style element. - */ - function addStyleSheet(ownerDocument, cssText) { - var p = ownerDocument.createElement('p'), - parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement; - - p.innerHTML = 'x'; - return parent.insertBefore(p.lastChild, parent.firstChild); - } - - /** - * Returns the value of `html5.elements` as an array. - * @private - * @returns {Array} An array of shived element node names. - */ - function getElements() { - var elements = html5.elements; - return typeof elements == 'string' ? elements.split(' ') : elements; - } - - /** - * Extends the built-in list of html5 elements - * @memberOf html5 - * @param {String|Array} newElements whitespace separated list or array of new element names to shiv - * @param {Document} ownerDocument The context document. - */ - function addElements(newElements, ownerDocument) { - var elements = html5.elements; - if(typeof elements != 'string'){ - elements = elements.join(' '); - } - if(typeof newElements != 'string'){ - newElements = newElements.join(' '); - } - html5.elements = elements +' '+ newElements; - shivDocument(ownerDocument); - } - - /** - * Returns the data associated to the given document - * @private - * @param {Document} ownerDocument The document. - * @returns {Object} An object of data. - */ - function getExpandoData(ownerDocument) { - var data = expandoData[ownerDocument[expando]]; - if (!data) { - data = {}; - expanID++; - ownerDocument[expando] = expanID; - expandoData[expanID] = data; - } - return data; - } - - /** - * returns a shived element for the given nodeName and document - * @memberOf html5 - * @param {String} nodeName name of the element - * @param {Document} ownerDocument The context document. - * @returns {Object} The shived element. - */ - function createElement(nodeName, ownerDocument, data){ - if (!ownerDocument) { - ownerDocument = document; - } - if(supportsUnknownElements){ - return ownerDocument.createElement(nodeName); - } - if (!data) { - data = getExpandoData(ownerDocument); - } - var node; - - if (data.cache[nodeName]) { - node = data.cache[nodeName].cloneNode(); - } else if (saveClones.test(nodeName)) { - node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode(); - } else { - node = data.createElem(nodeName); - } - - // Avoid adding some elements to fragments in IE < 9 because - // * Attributes like `name` or `type` cannot be set/changed once an element - // is inserted into a document/fragment - // * Link elements with `src` attributes that are inaccessible, as with - // a 403 response, will cause the tab/window to crash - // * Script elements appended to fragments will execute when their `src` - // or `text` property is set - return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node; - } - - /** - * returns a shived DocumentFragment for the given document - * @memberOf html5 - * @param {Document} ownerDocument The context document. - * @returns {Object} The shived DocumentFragment. - */ - function createDocumentFragment(ownerDocument, data){ - if (!ownerDocument) { - ownerDocument = document; - } - if(supportsUnknownElements){ - return ownerDocument.createDocumentFragment(); - } - data = data || getExpandoData(ownerDocument); - var clone = data.frag.cloneNode(), - i = 0, - elems = getElements(), - l = elems.length; - for(;i+~])(' + getElements().join('|') + ')(?=[[\\s,>+~#.:]|$)', 'gi'), - replacement = '$1' + shivNamespace + '\\:$2'; - - while (index--) { - pair = parts[index] = parts[index].split('}'); - pair[pair.length - 1] = pair[pair.length - 1].replace(reElements, replacement); - parts[index] = pair.join('}'); - } - return parts.join('{'); - } - - /** - * Removes the given wrappers, leaving the original elements. - * @private - * @params {Array} wrappers An array of printable wrappers. - */ - function removeWrappers(wrappers) { - var index = wrappers.length; - while (index--) { - wrappers[index].removeNode(); - } - } - - /*--------------------------------------------------------------------------*/ - - /** - * Shivs the given document for print. - * @memberOf html5 - * @param {Document} ownerDocument The document to shiv. - * @returns {Document} The shived document. - */ - function shivPrint(ownerDocument) { - var shivedSheet, - wrappers, - data = getExpandoData(ownerDocument), - namespaces = ownerDocument.namespaces, - ownerWindow = ownerDocument.parentWindow; - - if (!supportsShivableSheets || ownerDocument.printShived) { - return ownerDocument; - } - if (typeof namespaces[shivNamespace] == 'undefined') { - namespaces.add(shivNamespace); - } - - function removeSheet() { - clearTimeout(data._removeSheetTimer); - if (shivedSheet) { - shivedSheet.removeNode(true); - } - shivedSheet= null; - } - - ownerWindow.attachEvent('onbeforeprint', function() { - - removeSheet(); - - var imports, - length, - sheet, - collection = ownerDocument.styleSheets, - cssText = [], - index = collection.length, - sheets = Array(index); - - // convert styleSheets collection to an array - while (index--) { - sheets[index] = collection[index]; - } - // concat all style sheet CSS text - while ((sheet = sheets.pop())) { - // IE does not enforce a same origin policy for external style sheets... - // but has trouble with some dynamically created stylesheets - if (!sheet.disabled && reMedia.test(sheet.media)) { - - try { - imports = sheet.imports; - length = imports.length; - } catch(er){ - length = 0; - } - - for (index = 0; index < length; index++) { - sheets.push(imports[index]); - } - - try { - cssText.push(sheet.cssText); - } catch(er){} - } - } - - // wrap all HTML5 elements with printable elements and add the shived style sheet - cssText = shivCssText(cssText.reverse().join('')); - wrappers = addWrappers(ownerDocument); - shivedSheet = addStyleSheet(ownerDocument, cssText); - - }); - - ownerWindow.attachEvent('onafterprint', function() { - // remove wrappers, leaving the original elements, and remove the shived style sheet - removeWrappers(wrappers); - clearTimeout(data._removeSheetTimer); - data._removeSheetTimer = setTimeout(removeSheet, 500); - }); - - ownerDocument.printShived = true; - return ownerDocument; - } - - /*--------------------------------------------------------------------------*/ - - // expose API - html5.type += ' print'; - html5.shivPrint = shivPrint; - - // shiv for print - shivPrint(document); - - if(typeof module == 'object' && module.exports){ - module.exports = html5; - } - - }(typeof window !== "undefined" ? window : this, document)); - } - - ; - - - /** - * contains checks to see if a string contains another string - * - * @access private - * @function contains - * @param {string} str - The string we want to check for substrings - * @param {string} substr - The substring we want to search the first string for - * @returns {boolean} - */ - - function contains(str, substr) { - return !!~('' + str).indexOf(substr); - } - - ; - - /** - * createElement is a convenience wrapper around document.createElement. Since we - * use createElement all over the place, this allows for (slightly) smaller code - * as well as abstracting away issues with creating elements in contexts other than - * HTML documents (e.g. SVG documents). - * - * @access private - * @function createElement - * @returns {HTMLElement|SVGElement} An HTML or SVG element - */ - - function createElement() { - if (typeof document.createElement !== 'function') { - // This is the case in IE7, where the type of createElement is "object". - // For this reason, we cannot call apply() as Object is not a Function. - return document.createElement(arguments[0]); - } else if (isSVG) { - return document.createElementNS.call(document, 'http://www.w3.org/2000/svg', arguments[0]); - } else { - return document.createElement.apply(document, arguments); - } - } - - ; - - /** - * Create our "modernizr" element that we do most feature tests on. - * - * @access private - */ - - var modElem = { - elem: createElement('modernizr') - }; - - // Clean up this element - Modernizr._q.push(function() { - delete modElem.elem; - }); - - - - var mStyle = { - style: modElem.elem.style - }; - - // kill ref for gc, must happen before mod.elem is removed, so we unshift on to - // the front of the queue. - Modernizr._q.unshift(function() { - delete mStyle.style; - }); - - - - /** - * getBody returns the body of a document, or an element that can stand in for - * the body if a real body does not exist - * - * @access private - * @function getBody - * @returns {HTMLElement|SVGElement} Returns the real body of a document, or an - * artificially created element that stands in for the body - */ - - function getBody() { - // After page load injecting a fake body doesn't work so check if body exists - var body = document.body; - - if (!body) { - // Can't use the real body create a fake one. - body = createElement(isSVG ? 'svg' : 'body'); - body.fake = true; - } - - return body; - } - - ; - - /** - * injectElementWithStyles injects an element with style element and some CSS rules - * - * @access private - * @function injectElementWithStyles - * @param {string} rule - String representing a css rule - * @param {function} callback - A function that is used to test the injected element - * @param {number} [nodes] - An integer representing the number of additional nodes you want injected - * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes - * @returns {boolean} - */ - - function injectElementWithStyles(rule, callback, nodes, testnames) { - var mod = 'modernizr'; - var style; - var ret; - var node; - var docOverflow; - var div = createElement('div'); - var body = getBody(); - - if (parseInt(nodes, 10)) { - // In order not to give false positives we create a node for each test - // This also allows the method to scale for unspecified uses - while (nodes--) { - node = createElement('div'); - node.id = testnames ? testnames[nodes] : mod + (nodes + 1); - div.appendChild(node); - } - } - - style = createElement('style'); - style.type = 'text/css'; - style.id = 's' + mod; - - // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody. - // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270 - (!body.fake ? div : body).appendChild(style); - body.appendChild(div); - - if (style.styleSheet) { - style.styleSheet.cssText = rule; - } else { - style.appendChild(document.createTextNode(rule)); - } - div.id = mod; - - if (body.fake) { - //avoid crashing IE8, if background image is used - body.style.background = ''; - //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible - body.style.overflow = 'hidden'; - docOverflow = docElement.style.overflow; - docElement.style.overflow = 'hidden'; - docElement.appendChild(body); - } - - ret = callback(div, rule); - // If this is done after page load we don't want to remove the body so check if body exists - if (body.fake) { - body.parentNode.removeChild(body); - docElement.style.overflow = docOverflow; - // Trigger layout so kinetic scrolling isn't disabled in iOS6+ - docElement.offsetHeight; - } else { - div.parentNode.removeChild(div); - } - - return !!ret; - - } - - ; - - /** - * domToCSS takes a camelCase string and converts it to kebab-case - * e.g. boxSizing -> box-sizing - * - * @access private - * @function domToCSS - * @param {string} name - String name of camelCase prop we want to convert - * @returns {string} The kebab-case version of the supplied name - */ - - function domToCSS(name) { - return name.replace(/([A-Z])/g, function(str, m1) { - return '-' + m1.toLowerCase(); - }).replace(/^ms-/, '-ms-'); - } - ; - - /** - * nativeTestProps allows for us to use native feature detection functionality if available. - * some prefixed form, or false, in the case of an unsupported rule - * - * @access private - * @function nativeTestProps - * @param {array} props - An array of property names - * @param {string} value - A string representing the value we want to check via @supports - * @returns {boolean|undefined} A boolean when @supports exists, undefined otherwise - */ - - // Accepts a list of property names and a single value - // Returns `undefined` if native detection not available - function nativeTestProps(props, value) { - var i = props.length; - // Start with the JS API: http://www.w3.org/TR/css3-conditional/#the-css-interface - if ('CSS' in window && 'supports' in window.CSS) { - // Try every prefixed variant of the property - while (i--) { - if (window.CSS.supports(domToCSS(props[i]), value)) { - return true; - } - } - return false; - } - // Otherwise fall back to at-rule (for Opera 12.x) - else if ('CSSSupportsRule' in window) { - // Build a condition string for every prefixed variant - var conditionText = []; - while (i--) { - conditionText.push('(' + domToCSS(props[i]) + ':' + value + ')'); - } - conditionText = conditionText.join(' or '); - return injectElementWithStyles('@supports (' + conditionText + ') { #modernizr { position: absolute; } }', function(node) { - return getComputedStyle(node, null).position == 'absolute'; - }); - } - return undefined; - } - ; - - /** - * cssToDOM takes a kebab-case string and converts it to camelCase - * e.g. box-sizing -> boxSizing - * - * @access private - * @function cssToDOM - * @param {string} name - String name of kebab-case prop we want to convert - * @returns {string} The camelCase version of the supplied name - */ - - function cssToDOM(name) { - return name.replace(/([a-z])-([a-z])/g, function(str, m1, m2) { - return m1 + m2.toUpperCase(); - }).replace(/^-/, ''); - } - ; - - // testProps is a generic CSS / DOM property test. - - // In testing support for a given CSS property, it's legit to test: - // `elem.style[styleName] !== undefined` - // If the property is supported it will return an empty string, - // if unsupported it will return undefined. - - // We'll take advantage of this quick test and skip setting a style - // on our modernizr element, but instead just testing undefined vs - // empty string. - - // Property names can be provided in either camelCase or kebab-case. - - function testProps(props, prefixed, value, skipValueTest) { - skipValueTest = is(skipValueTest, 'undefined') ? false : skipValueTest; - - // Try native detect first - if (!is(value, 'undefined')) { - var result = nativeTestProps(props, value); - if (!is(result, 'undefined')) { - return result; - } - } - - // Otherwise do it properly - var afterInit, i, propsLength, prop, before; - - // If we don't have a style element, that means we're running async or after - // the core tests, so we'll need to create our own elements to use - - // inside of an SVG element, in certain browsers, the `style` element is only - // defined for valid tags. Therefore, if `modernizr` does not have one, we - // fall back to a less used element and hope for the best. - var elems = ['modernizr', 'tspan']; - while (!mStyle.style) { - afterInit = true; - mStyle.modElem = createElement(elems.shift()); - mStyle.style = mStyle.modElem.style; - } - - // Delete the objects if we created them. - function cleanElems() { - if (afterInit) { - delete mStyle.style; - delete mStyle.modElem; - } - } - - propsLength = props.length; - for (i = 0; i < propsLength; i++) { - prop = props[i]; - before = mStyle.style[prop]; - - if (contains(prop, '-')) { - prop = cssToDOM(prop); - } - - if (mStyle.style[prop] !== undefined) { - - // If value to test has been passed in, do a set-and-check test. - // 0 (integer) is a valid property value, so check that `value` isn't - // undefined, rather than just checking it's truthy. - if (!skipValueTest && !is(value, 'undefined')) { - - // Needs a try catch block because of old IE. This is slow, but will - // be avoided in most cases because `skipValueTest` will be used. - try { - mStyle.style[prop] = value; - } catch (e) {} - - // If the property value has changed, we assume the value used is - // supported. If `value` is empty string, it'll fail here (because - // it hasn't changed), which matches how browsers have implemented - // CSS.supports() - if (mStyle.style[prop] != before) { - cleanElems(); - return prefixed == 'pfx' ? prop : true; - } - } - // Otherwise just return true, or the property name if this is a - // `prefixed()` call - else { - cleanElems(); - return prefixed == 'pfx' ? prop : true; - } - } - } - cleanElems(); - return false; - } - - ; - - /** - * testProp() investigates whether a given style property is recognized - * Property names can be provided in either camelCase or kebab-case. - * - * @memberof Modernizr - * @name Modernizr.testProp - * @access public - * @optionName Modernizr.testProp() - * @optionProp testProp - * @function testProp - * @param {string} prop - Name of the CSS property to check - * @param {string} [value] - Name of the CSS value to check - * @param {boolean} [useValue] - Whether or not to check the value if @supports isn't supported - * @returns {boolean} - * @example - * - * Just like [testAllProps](#modernizr-testallprops), only it does not check any vendor prefixed - * version of the string. - * - * Note that the property name must be provided in camelCase (e.g. boxSizing not box-sizing) - * - * ```js - * Modernizr.testProp('pointerEvents') // true - * ``` - * - * You can also provide a value as an optional second argument to check if a - * specific value is supported - * - * ```js - * Modernizr.testProp('pointerEvents', 'none') // true - * Modernizr.testProp('pointerEvents', 'penguin') // false - * ``` - */ - - var testProp = ModernizrProto.testProp = function(prop, value, useValue) { - return testProps([prop], undefined, value, useValue); - }; - - - /** - * testStyles injects an element with style element and some CSS rules - * - * @memberof Modernizr - * @name Modernizr.testStyles - * @optionName Modernizr.testStyles() - * @optionProp testStyles - * @access public - * @function testStyles - * @param {string} rule - String representing a css rule - * @param {function} callback - A function that is used to test the injected element - * @param {number} [nodes] - An integer representing the number of additional nodes you want injected - * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes - * @returns {boolean} - * @example - * - * `Modernizr.testStyles` takes a CSS rule and injects it onto the current page - * along with (possibly multiple) DOM elements. This lets you check for features - * that can not be detected by simply checking the [IDL](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Interface_development_guide/IDL_interface_rules). - * - * ```js - * Modernizr.testStyles('#modernizr { width: 9px; color: papayawhip; }', function(elem, rule) { - * // elem is the first DOM node in the page (by default #modernizr) - * // rule is the first argument you supplied - the CSS rule in string form - * - * addTest('widthworks', elem.style.width === '9px') - * }); - * ``` - * - * If your test requires multiple nodes, you can include a third argument - * indicating how many additional div elements to include on the page. The - * additional nodes are injected as children of the `elem` that is returned as - * the first argument to the callback. - * - * ```js - * Modernizr.testStyles('#modernizr {width: 1px}; #modernizr2 {width: 2px}', function(elem) { - * document.getElementById('modernizr').style.width === '1px'; // true - * document.getElementById('modernizr2').style.width === '2px'; // true - * elem.firstChild === document.getElementById('modernizr2'); // true - * }, 1); - * ``` - * - * By default, all of the additional elements have an ID of `modernizr[n]`, where - * `n` is its index (e.g. the first additional, second overall is `#modernizr2`, - * the second additional is `#modernizr3`, etc.). - * If you want to have more meaningful IDs for your function, you can provide - * them as the fourth argument, as an array of strings - * - * ```js - * Modernizr.testStyles('#foo {width: 10px}; #bar {height: 20px}', function(elem) { - * elem.firstChild === document.getElementById('foo'); // true - * elem.lastChild === document.getElementById('bar'); // true - * }, 2, ['foo', 'bar']); - * ``` - * - */ - - var testStyles = ModernizrProto.testStyles = injectElementWithStyles; - -/*! -{ - "name": "@font-face", - "property": "fontface", - "authors": ["Diego Perini", "Mat Marquis"], - "tags": ["css"], - "knownBugs": [ - "False Positive: WebOS https://github.com/Modernizr/Modernizr/issues/342", - "False Postive: WP7 https://github.com/Modernizr/Modernizr/issues/538" - ], - "notes": [{ - "name": "@font-face detection routine by Diego Perini", - "href": "http://javascript.nwbox.com/CSSSupport/" - },{ - "name": "Filament Group @font-face compatibility research", - "href": "https://docs.google.com/presentation/d/1n4NyG4uPRjAA8zn_pSQ_Ket0RhcWC6QlZ6LMjKeECo0/edit#slide=id.p" - },{ - "name": "Filament Grunticon/@font-face device testing results", - "href": "https://docs.google.com/spreadsheet/ccc?key=0Ag5_yGvxpINRdHFYeUJPNnZMWUZKR2ItMEpRTXZPdUE#gid=0" - },{ - "name": "CSS fonts on Android", - "href": "https://stackoverflow.com/questions/3200069/css-fonts-on-android" - },{ - "name": "@font-face and Android", - "href": "http://archivist.incutio.com/viewlist/css-discuss/115960" - }] -} -!*/ - - var blacklist = (function() { - var ua = navigator.userAgent; - var wkvers = ua.match(/applewebkit\/([0-9]+)/gi) && parseFloat(RegExp.$1); - var webos = ua.match(/w(eb)?osbrowser/gi); - var wppre8 = ua.match(/windows phone/gi) && ua.match(/iemobile\/([0-9])+/gi) && parseFloat(RegExp.$1) >= 9; - var oldandroid = wkvers < 533 && ua.match(/android/gi); - return webos || oldandroid || wppre8; - }()); - if (blacklist) { - Modernizr.addTest('fontface', false); - } else { - testStyles('@font-face {font-family:"font";src:url("https://")}', function(node, rule) { - var style = document.getElementById('smodernizr'); - var sheet = style.sheet || style.styleSheet; - var cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : ''; - var bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0; - Modernizr.addTest('fontface', bool); - }); - } -; - - /** - * If the browsers follow the spec, then they would expose vendor-specific style as: - * elem.style.WebkitBorderRadius - * instead of something like the following, which would be technically incorrect: - * elem.style.webkitBorderRadius - - * Webkit ghosts their properties in lowercase but Opera & Moz do not. - * Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+ - * erik.eae.net/archives/2008/03/10/21.48.10/ - - * More here: github.com/Modernizr/Modernizr/issues/issue/21 - * - * @access private - * @returns {string} The string representing the vendor-specific style properties - */ - - var omPrefixes = 'Moz O ms Webkit'; - - - var cssomPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.split(' ') : []); - ModernizrProto._cssomPrefixes = cssomPrefixes; - - - /** - * List of JavaScript DOM values used for tests - * - * @memberof Modernizr - * @name Modernizr._domPrefixes - * @optionName Modernizr._domPrefixes - * @optionProp domPrefixes - * @access public - * @example - * - * Modernizr._domPrefixes is exactly the same as [_prefixes](#modernizr-_prefixes), but rather - * than kebab-case properties, all properties are their Capitalized variant - * - * ```js - * Modernizr._domPrefixes === [ "Moz", "O", "ms", "Webkit" ]; - * ``` - */ - - var domPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.toLowerCase().split(' ') : []); - ModernizrProto._domPrefixes = domPrefixes; - - - /** - * testDOMProps is a generic DOM property test; if a browser supports - * a certain property, it won't return undefined for it. - * - * @access private - * @function testDOMProps - * @param {array.} props - An array of properties to test for - * @param {object} obj - An object or Element you want to use to test the parameters again - * @param {boolean|object} elem - An Element to bind the property lookup again. Use `false` to prevent the check - */ - function testDOMProps(props, obj, elem) { - var item; - - for (var i in props) { - if (props[i] in obj) { - - // return the property name as a string - if (elem === false) { - return props[i]; - } - - item = obj[props[i]]; - - // let's bind a function - if (is(item, 'function')) { - // bind to obj unless overriden - return fnBind(item, elem || obj); - } - - // return the unbound function or obj or value - return item; - } - } - return false; - } - - ; - - /** - * testPropsAll tests a list of DOM properties we want to check against. - * We specify literally ALL possible (known and/or likely) properties on - * the element including the non-vendor prefixed one, for forward- - * compatibility. - * - * @access private - * @function testPropsAll - * @param {string} prop - A string of the property to test for - * @param {string|object} [prefixed] - An object to check the prefixed properties on. Use a string to skip - * @param {HTMLElement|SVGElement} [elem] - An element used to test the property and value against - * @param {string} [value] - A string of a css value - * @param {boolean} [skipValueTest] - An boolean representing if you want to test if value sticks when set - */ - function testPropsAll(prop, prefixed, elem, value, skipValueTest) { - - var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1), - props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' '); - - // did they call .prefixed('boxSizing') or are we just testing a prop? - if (is(prefixed, 'string') || is(prefixed, 'undefined')) { - return testProps(props, prefixed, value, skipValueTest); - - // otherwise, they called .prefixed('requestAnimationFrame', window[, elem]) - } else { - props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' '); - return testDOMProps(props, prefixed, elem); - } - } - - // Modernizr.testAllProps() investigates whether a given style property, - // or any of its vendor-prefixed variants, is recognized - // - // Note that the property names must be provided in the camelCase variant. - // Modernizr.testAllProps('boxSizing') - ModernizrProto.testAllProps = testPropsAll; - - - - /** - * testAllProps determines whether a given CSS property is supported in the browser - * - * @memberof Modernizr - * @name Modernizr.testAllProps - * @optionName Modernizr.testAllProps() - * @optionProp testAllProps - * @access public - * @function testAllProps - * @param {string} prop - String naming the property to test (either camelCase or kebab-case) - * @param {string} [value] - String of the value to test - * @param {boolean} [skipValueTest=false] - Whether to skip testing that the value is supported when using non-native detection - * @example - * - * testAllProps determines whether a given CSS property, in some prefixed form, - * is supported by the browser. - * - * ```js - * testAllProps('boxSizing') // true - * ``` - * - * It can optionally be given a CSS value in string form to test if a property - * value is valid - * - * ```js - * testAllProps('display', 'block') // true - * testAllProps('display', 'penguin') // false - * ``` - * - * A boolean can be passed as a third parameter to skip the value check when - * native detection (@supports) isn't available. - * - * ```js - * testAllProps('shapeOutside', 'content-box', true); - * ``` - */ - - function testAllProps(prop, value, skipValueTest) { - return testPropsAll(prop, undefined, undefined, value, skipValueTest); - } - ModernizrProto.testAllProps = testAllProps; - -/*! -{ - "name": "CSS Supports", - "property": "supports", - "caniuse": "css-featurequeries", - "tags": ["css"], - "builderAliases": ["css_supports"], - "notes": [{ - "name": "W3 Spec", - "href": "http://dev.w3.org/csswg/css3-conditional/#at-supports" - },{ - "name": "Related Github Issue", - "href": "github.com/Modernizr/Modernizr/issues/648" - },{ - "name": "W3 Info", - "href": "http://dev.w3.org/csswg/css3-conditional/#the-csssupportsrule-interface" - }] -} -!*/ - - var newSyntax = 'CSS' in window && 'supports' in window.CSS; - var oldSyntax = 'supportsCSS' in window; - Modernizr.addTest('supports', newSyntax || oldSyntax); - -/*! -{ - "name": "CSS Transforms 3D", - "property": "csstransforms3d", - "caniuse": "transforms3d", - "tags": ["css"], - "warnings": [ - "Chrome may occassionally fail this test on some systems; more info: https://code.google.com/p/chromium/issues/detail?id=129004" - ] -} -!*/ - - Modernizr.addTest('csstransforms3d', function() { - var ret = !!testAllProps('perspective', '1px', true); - var usePrefix = Modernizr._config.usePrefixes; - - // Webkit's 3D transforms are passed off to the browser's own graphics renderer. - // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in - // some conditions. As a result, Webkit typically recognizes the syntax but - // will sometimes throw a false positive, thus we must do a more thorough check: - if (ret && (!usePrefix || 'webkitPerspective' in docElement.style)) { - var mq; - var defaultStyle = '#modernizr{width:0;height:0}'; - // Use CSS Conditional Rules if available - if (Modernizr.supports) { - mq = '@supports (perspective: 1px)'; - } else { - // Otherwise, Webkit allows this media query to succeed only if the feature is enabled. - // `@media (transform-3d),(-webkit-transform-3d){ ... }` - mq = '@media (transform-3d)'; - if (usePrefix) { - mq += ',(-webkit-transform-3d)'; - } - } - - mq += '{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}'; - - testStyles(defaultStyle + mq, function(elem) { - ret = elem.offsetWidth === 7 && elem.offsetHeight === 18; - }); - } - - return ret; - }); - -/*! -{ - "name": "CSS :target pseudo-class", - "caniuse": "css-sel3", - "property": "target", - "tags": ["css"], - "notes": [{ - "name": "MDN documentation", - "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/:target" - }], - "authors": ["@zachleat"], - "warnings": ["Opera Mini supports :target but doesn't update the hash for anchor links."] -} -!*/ -/* DOC -Detects support for the ':target' CSS pseudo-class. -*/ - - // querySelector - Modernizr.addTest('target', function() { - var doc = window.document; - if (!('querySelectorAll' in doc)) { - return false; - } - - try { - doc.querySelectorAll(':target'); - return true; - } catch (e) { - return false; - } - }); - -/*! -{ - "name": "ES5 String.prototype.contains", - "property": "contains", - "authors": ["Robert Kowalski"], - "tags": ["es6"] -} -!*/ -/* DOC -Check if browser implements ECMAScript 6 `String.prototype.contains` per specification. -*/ - - Modernizr.addTest('contains', is(String.prototype.contains, 'function')); - - - // Run each test - testRunner(); - - // Remove the "no-js" class if it exists - setClasses(classes); - - delete ModernizrProto.addTest; - delete ModernizrProto.addAsyncTest; - - // Run the things that are supposed to run after the tests - for (var i = 0; i < Modernizr._q.length; i++) { - Modernizr._q[i](); - } - - // Leak Modernizr namespace - window.Modernizr = Modernizr; - - -; - -})(window, document); \ No newline at end of file diff --git a/material/assets/javascripts/modernizr-d1e05123d4.js b/material/assets/javascripts/modernizr-d1e05123d4.js new file mode 100644 index 000000000..d7330594b --- /dev/null +++ b/material/assets/javascripts/modernizr-d1e05123d4.js @@ -0,0 +1 @@ +!function(e,t,n){function r(e,t){return typeof e===t}function o(){var e,t,n,o,i,a,s;for(var l in E)if(E.hasOwnProperty(l)){if(e=[],t=E[l],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;nu;u++)if(h=e[u],g=N.style[h],l(h,"-")&&(h=m(h)),N.style[h]!==n){if(i||r(o,"undefined"))return a(),"pfx"==t?h:!0;try{N.style[h]=o}catch(y){}if(N.style[h]!=g)return a(),"pfx"==t?h:!0}return a(),!1}function g(e,t,n){var o;for(var i in e)if(e[i]in t)return n===!1?e[i]:(o=t[e[i]],r(o,"function")?s(o,n||t):o);return!1}function v(e,t,n,o,i){var a=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+z.join(a+" ")+a).split(" ");return r(t,"string")||r(t,"undefined")?h(s,t,o,i):(s=(e+" "+F.join(a+" ")+a).split(" "),g(s,t,n))}function y(e,t,r){return v(e,n,n,t,r)}var E=[],S={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){E.push({name:e,fn:t,options:n})},addAsyncTest:function(e){E.push({name:null,fn:e})}},b=function(){};b.prototype=S,b=new b;var w,C=[],x=t.documentElement,T="svg"===x.nodeName.toLowerCase();!function(){var e={}.hasOwnProperty;w=r(e,"undefined")||r(e.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),S._l={},S.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),b.hasOwnProperty(e)&&setTimeout(function(){b._trigger(e,b[e])},0)},S._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout(function(){var e,r;for(e=0;e",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=x.elements;return"string"==typeof e?e.split(" "):e}function o(e,t){var n=x.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),x.elements=n+" "+e,c(t)}function i(e){var t=C[e[b]];return t||(t={},w++,e[b]=w,C[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():S.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!o.canHaveChildren||E.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;l>a;a++)o.createElement(s[a]);return o}function l(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return x.shivMethods?a(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(x,t.frag)}function c(e){e||(e=t);var r=i(e);return!x.shivCSS||h||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),g||l(e,r),e}function f(e){for(var t,n=e.getElementsByTagName("*"),o=n.length,i=RegExp("^(?:"+r().join("|")+")$","i"),a=[];o--;)t=n[o],i.test(t.nodeName)&&a.push(t.applyElement(u(t)));return a}function u(e){for(var t,n=e.attributes,r=n.length,o=e.ownerDocument.createElement(_+":"+e.nodeName);r--;)t=n[r],t.specified&&o.setAttribute(t.nodeName,t.nodeValue);return o.style.cssText=e.style.cssText,o}function d(e){for(var t,n=e.split("{"),o=n.length,i=RegExp("(^|[\\s,>+~])("+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=[],u=l.length,p=Array(u);u--;)p[u]=l[u];for(;s=p.pop();)if(!s.disabled&&T.test(s.media)){try{i=s.imports,a=i.length}catch(m){a=0}for(u=0;a>u;u++)p.push(i[u]);try{c.push(s.cssText)}catch(m){}}c=d(c.reverse().join("")),o=f(e),r=n(e,c)}),l.attachEvent("onafterprint",function(){p(o),clearTimeout(a._removeSheetTimer),a._removeSheetTimer=setTimeout(t,500)}),e.printShived=!0,e)}var h,g,v="3.7.3",y=e.html5||{},E=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,S=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,b="_html5shiv",w=0,C={};!function(){try{var e=t.createElement("a");e.innerHTML="",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 x={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=x,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)}();x.type+=" print",x.shivPrint=m,m(t),"object"==typeof module&&module.exports&&(module.exports=x)}("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});var j=(S.testProp=function(e,t,r){return h([e],n,t,r)},S.testStyles=u),P=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=533>t&&e.match(/android/gi);return n||o||r}();P?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 k="Moz O ms Webkit",z=S._config.usePrefixes?k.split(" "):[];S._cssomPrefixes=z;var F=S._config.usePrefixes?k.toLowerCase().split(" "):[];S._domPrefixes=F,S.testAllProps=v,S.testAllProps=y;var $="CSS"in e&&"supports"in e.CSS,A="supportsCSS"in e;b.addTest("supports",$||A),b.addTest("csstransforms3d",function(){var e=!!y("perspective","1px",!0),t=b._config.usePrefixes;if(e&&(!t||"webkitPerspective"in x.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("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(C),delete S.addTest,delete S.addAsyncTest;for(var q=0;q - + {% for path in extra_css %} {% endfor %} - + diff --git a/material/header.html b/material/header.html index 3eddad033..5e41a917f 100644 --- a/material/header.html +++ b/material/header.html @@ -12,8 +12,26 @@
    diff --git a/material/manifest.json b/material/manifest.json index 6b643ea4d..c9c960898 100644 --- a/material/manifest.json +++ b/material/manifest.json @@ -1,6 +1,6 @@ { "assets/images/favicon.ico": "assets/images/favicon-e565ddfa3b.ico", "assets/javascripts/application.js": "assets/javascripts/application-a7f7c32389.js", - "assets/javascripts/modernizr.js": "assets/javascripts/modernizr-30b4746408.js", - "assets/stylesheets/application.css": "assets/stylesheets/application-cbf902c7ca.css" + "assets/javascripts/modernizr.js": "assets/javascripts/modernizr-d1e05123d4.js", + "assets/stylesheets/application.css": "assets/stylesheets/application-76344d4d6f.css" } \ No newline at end of file diff --git a/src/assets/stylesheets/extensions/_permalinks.scss b/src/assets/stylesheets/extensions/_permalinks.scss index a8437a2dd..bda6c084d 100644 --- a/src/assets/stylesheets/extensions/_permalinks.scss +++ b/src/assets/stylesheets/extensions/_permalinks.scss @@ -41,23 +41,26 @@ transition: opacity .125s .25s, transform .25s .25s, color .25s; + } /* * Only show permalinks in active state */ h1, h2, h3, h4, h5, h6 { - &:hover .headerlink { + &:hover .headerlink, + &:target .headerlink { margin-left: 1.0rem; opacity: 1; transform: translate3d(0, 0, 0); + } - /* - * Active link - */ - &:hover { - color: $md-color-accent; - } + /* + * Active or targeted link + */ + &:hover .headerlink:hover, + &:target .headerlink { + color: $md-color-accent; } } } \ No newline at end of file diff --git a/src/assets/stylesheets/layout/_header.scss b/src/assets/stylesheets/layout/_header.scss index c09974011..df6999ab2 100644 --- a/src/assets/stylesheets/layout/_header.scss +++ b/src/assets/stylesheets/layout/_header.scss @@ -87,11 +87,12 @@ } /* - * Search bar within header + * Search bar within header - the right aligment removes jitter */ &-search { position: relative; margin: 0.6rem 0.4rem 0.6rem 0; + text-align: right; /* * Icon @@ -106,16 +107,16 @@ } /* - * Search field - the float is a hack for non-jittery transitions + * Search field */ &__input { + display: inline-block; width: 23.0rem; height: 3.6rem; padding-left: 4.4rem; padding-right: 0.8rem; - float: right; font-size: ms(0); - background: $md-color-primary--dark; + background: $md-color-white--lightest; color: $md-color-white; border-radius: px2rem(2px); transition: color .25s, @@ -126,7 +127,7 @@ * Placeholder color */ &::placeholder { - color: $md-color-white--light; + color: $md-color-white; transition: color .25s; } diff --git a/src/header.html b/src/header.html index 76119827e..ad9daee50 100644 --- a/src/header.html +++ b/src/header.html @@ -45,11 +45,16 @@ From fec7e13bea9bcbda185a1b4c53781fd984c39eaf Mon Sep 17 00:00:00 2001 From: squidfunk Date: Fri, 2 Sep 2016 00:33:45 +0200 Subject: [PATCH 004/202] Admonition styles and removed bower as dependency --- Gulpfile.js | 9 +- bower.json | 24 -- docs/getting-started.md | 18 +- ...7f7c32389.js => application-e9877e2824.js} | 2 +- material/assets/javascripts/application.js | 2 +- .../javascripts/modernizr-31a00ebfc6.js | 1 + .../javascripts/modernizr-d1e05123d4.js | 1 - material/assets/javascripts/modernizr.js | 2 +- .../stylesheets/application-76344d4d6f.css | 1 - .../stylesheets/application-8e9e9d1cff.css | 1 + material/assets/stylesheets/application.css | 2 +- material/base.html | 26 +- material/header.html | 15 +- material/manifest.json | 6 +- package.json | 6 +- src/assets/fonts/icon.eot | Bin 2224 -> 0 bytes src/assets/fonts/icon.json | 348 ------------------ src/assets/fonts/icon.svg | 22 -- src/assets/fonts/icon.ttf | Bin 2072 -> 0 bytes src/assets/fonts/icon.woff | Bin 2148 -> 0 bytes src/assets/javascripts/application.js | 50 +++ .../javascripts/components/scrollspy.js | 6 +- src/assets/stylesheets/_config.scss | 8 +- src/assets/stylesheets/_shame.scss | 53 ++- src/assets/stylesheets/application.scss | 5 +- src/assets/stylesheets/base/_icons.scss | 28 +- .../stylesheets/extensions/_admonition.scss | 90 ++++- src/assets/stylesheets/helpers/_px2em.scss | 4 +- src/assets/stylesheets/layout/_base.scss | 14 +- src/assets/stylesheets/layout/_header.scss | 72 +--- src/assets/stylesheets/layout/_search.scss | 179 +++++++++ src/assets/stylesheets/layout/_sidebar.scss | 4 +- src/base.html | 24 +- src/header.html | 40 +- 34 files changed, 497 insertions(+), 566 deletions(-) delete mode 100644 bower.json rename material/assets/javascripts/{application-a7f7c32389.js => application-e9877e2824.js} (94%) create mode 100644 material/assets/javascripts/modernizr-31a00ebfc6.js delete mode 100644 material/assets/javascripts/modernizr-d1e05123d4.js delete mode 100644 material/assets/stylesheets/application-76344d4d6f.css create mode 100644 material/assets/stylesheets/application-8e9e9d1cff.css delete mode 100755 src/assets/fonts/icon.eot delete mode 100644 src/assets/fonts/icon.json delete mode 100755 src/assets/fonts/icon.svg delete mode 100755 src/assets/fonts/icon.ttf delete mode 100755 src/assets/fonts/icon.woff diff --git a/Gulpfile.js b/Gulpfile.js index 13fc4133a..96baa6a44 100755 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -97,9 +97,9 @@ gulp.task('assets:stylesheets', function() { .pipe( sass({ includePaths: [ - 'bower_components/modular-scale/stylesheets', - 'bower_components/quantum-colors', - 'bower_components/quantum-shadows' + 'node_modules/modularscale-sass/stylesheets', + 'node_modules/material-design-color', + 'node_modules/material-shadows' ] })) .pipe( @@ -153,8 +153,7 @@ gulp.task('assets:javascripts', function() { resolve: { modulesDirectories: [ 'src/assets/javascripts', - 'node_modules', - 'bower_components' + 'node_modules' ], extensions: [ '', '.js' diff --git a/bower.json b/bower.json deleted file mode 100644 index c812ef7f4..000000000 --- a/bower.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "mkdocs-material", - "version": "0.2.1", - "description": "A material design theme for MkDocs", - "homepage": "http://squidfunk.github.io/mkdocs-material/", - "authors": [ - "squidfunk " - ], - "license": "MIT", - "moduleType": [ - "globals" - ], - "ignore": [ - "**/.*", - "bower_components", - "node_modules" - ], - "private": true, - "devDependencies": { - "modular-scale": "^2.1.1", - "quantum-colors": "^1.0.1", - "quantum-shadows": "^1.0.0" - } -} diff --git a/docs/getting-started.md b/docs/getting-started.md index 7bb1ca45b..b926efb69 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -270,9 +270,21 @@ This will print: More colors can be freely defined. -> MkDocs supports several [Markdown extensions][]. The following extensions are -> not enabled by default (see the link for which are enabled by default), so you -> have to switch them on explicitly. +!!! hint "hint, note default" + +!!! tip "tip, idea" + +!!! check "check, success" + +!!! warning + +!!! failure "fail, failure" + +!!! fatal "fatal, danger" + +!!! bug "error, bug" + +!!! bug ## Full example diff --git a/material/assets/javascripts/application-a7f7c32389.js b/material/assets/javascripts/application-e9877e2824.js similarity index 94% rename from material/assets/javascripts/application-a7f7c32389.js rename to material/assets/javascripts/application-e9877e2824.js index f95f41d54..69f14d3dc 100644 --- a/material/assets/javascripts/application-a7f7c32389.js +++ b/material/assets/javascripts/application-e9877e2824.js @@ -1,4 +1,4 @@ -!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);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-nav--toc .md-nav__item a");o.listen(),window.addEventListener("resize",t)})},function(e,t,n){var i;!function(){"use strict";/** +!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);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-nav--toc .md-nav__item a");o.listen(),window.addEventListener("resize",t);var a=0,c=document.getElementById("md-toggle-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))})})},function(e,t,n){var i;!function(){"use strict";/** * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs. * * @codingstandard ftlabs-jsv2 diff --git a/material/assets/javascripts/application.js b/material/assets/javascripts/application.js index f95f41d54..69f14d3dc 100644 --- a/material/assets/javascripts/application.js +++ b/material/assets/javascripts/application.js @@ -1,4 +1,4 @@ -!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);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-nav--toc .md-nav__item a");o.listen(),window.addEventListener("resize",t)})},function(e,t,n){var i;!function(){"use strict";/** +!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);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-nav--toc .md-nav__item a");o.listen(),window.addEventListener("resize",t);var a=0,c=document.getElementById("md-toggle-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))})})},function(e,t,n){var i;!function(){"use strict";/** * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs. * * @codingstandard ftlabs-jsv2 diff --git a/material/assets/javascripts/modernizr-31a00ebfc6.js b/material/assets/javascripts/modernizr-31a00ebfc6.js new file mode 100644 index 000000000..a4a69031d --- /dev/null +++ b/material/assets/javascripts/modernizr-31a00ebfc6.js @@ -0,0 +1 @@ +!function(e,t,n){function r(e,t){return typeof e===t}function o(){var e,t,n,o,i,a,s;for(var l in b)if(b.hasOwnProperty(l)){if(e=[],t=b[l],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;nf;f++)if(h=e[f],g=N.style[h],l(h,"-")&&(h=m(h)),N.style[h]!==n){if(i||r(o,"undefined"))return a(),"pfx"==t?h:!0;try{N.style[h]=o}catch(y){}if(N.style[h]!=g)return a(),"pfx"==t?h:!0}return a(),!1}function g(e,t,n){var o;for(var i in e)if(e[i]in t)return n===!1?e[i]:(o=t[e[i]],r(o,"function")?s(o,n||t):o);return!1}function v(e,t,n,o,i){var a=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+P.join(a+" ")+a).split(" ");return r(t,"string")||r(t,"undefined")?h(s,t,o,i):(s=(e+" "+A.join(a+" ")+a).split(" "),g(s,t,n))}function y(e,t,r){return v(e,n,n,t,r)}var b=[],E={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){b.push({name:e,fn:t,options:n})},addAsyncTest:function(e){b.push({name:null,fn:e})}},S=function(){};S.prototype=E,S=new S;var x,w=[],C=t.documentElement,T="svg"===C.nodeName.toLowerCase();!function(){var e={}.hasOwnProperty;x=r(e,"undefined")||r(e.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),E._l={},E.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),S.hasOwnProperty(e)&&setTimeout(function(){S._trigger(e,S[e])},0)},E._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout(function(){var e,r;for(e=0;e",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=w[e[S]];return t||(t={},x++,e[S]=x,w[x]=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||b.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;l>a;a++)o.createElement(s[a]);return o}function l(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return C.shivMethods?a(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(C,t.frag)}function c(e){e||(e=t);var r=i(e);return!C.shivCSS||h||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),g||l(e,r),e}function u(e){for(var t,n=e.getElementsByTagName("*"),o=n.length,i=RegExp("^(?:"+r().join("|")+")$","i"),a=[];o--;)t=n[o],i.test(t.nodeName)&&a.push(t.applyElement(f(t)));return a}function f(e){for(var t,n=e.attributes,r=n.length,o=e.ownerDocument.createElement(_+":"+e.nodeName);r--;)t=n[r],t.specified&&o.setAttribute(t.nodeName,t.nodeValue);return o.style.cssText=e.style.cssText,o}function d(e){for(var t,n=e.split("{"),o=n.length,i=RegExp("(^|[\\s,>+~])("+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;a>f;f++)p.push(i[f]);try{c.push(s.cssText)}catch(m){}}c=d(c.reverse().join("")),o=u(e),r=n(e,c)}),l.attachEvent("onafterprint",function(){p(o),clearTimeout(a._removeSheetTimer),a._removeSheetTimer=setTimeout(t,500)}),e.printShived=!0,e)}var h,g,v="3.7.3",y=e.html5||{},b=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,E=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,S="_html5shiv",x=0,w={};!function(){try{var e=t.createElement("a");e.innerHTML="",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")};S._q.push(function(){delete _.elem});var N={style:_.elem.style};S._q.unshift(function(){delete N.style});var k=(E.testProp=function(e,t,r){return h([e],n,t,r)},E.testStyles=f),j=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=533>t&&e.match(/android/gi);return n||o||r}();j?S.addTest("fontface",!1):k('@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]);S.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;S.addTest("supports",F||$),S.addTest("csstransforms3d",function(){var e=!!y("perspective","1px",!0),t=S._config.usePrefixes;if(e&&(!t||"webkitPerspective"in C.style)){var n,r="#modernizr{width:0;height:0}";S.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}}",k(r+n,function(t){e=7===t.offsetWidth&&18===t.offsetHeight})}return e}),S.addTest("checked",function(){return k("#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})}),S.addTest("target",function(){var t=e.document;if(!("querySelectorAll"in t))return!1;try{return t.querySelectorAll(":target"),!0}catch(n){return!1}}),S.addTest("contains",r(String.prototype.contains,"function")),o(),i(w),delete E.addTest,delete E.addAsyncTest;for(var q=0;qu;u++)if(h=e[u],g=N.style[h],l(h,"-")&&(h=m(h)),N.style[h]!==n){if(i||r(o,"undefined"))return a(),"pfx"==t?h:!0;try{N.style[h]=o}catch(y){}if(N.style[h]!=g)return a(),"pfx"==t?h:!0}return a(),!1}function g(e,t,n){var o;for(var i in e)if(e[i]in t)return n===!1?e[i]:(o=t[e[i]],r(o,"function")?s(o,n||t):o);return!1}function v(e,t,n,o,i){var a=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+z.join(a+" ")+a).split(" ");return r(t,"string")||r(t,"undefined")?h(s,t,o,i):(s=(e+" "+F.join(a+" ")+a).split(" "),g(s,t,n))}function y(e,t,r){return v(e,n,n,t,r)}var E=[],S={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){E.push({name:e,fn:t,options:n})},addAsyncTest:function(e){E.push({name:null,fn:e})}},b=function(){};b.prototype=S,b=new b;var w,C=[],x=t.documentElement,T="svg"===x.nodeName.toLowerCase();!function(){var e={}.hasOwnProperty;w=r(e,"undefined")||r(e.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),S._l={},S.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),b.hasOwnProperty(e)&&setTimeout(function(){b._trigger(e,b[e])},0)},S._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout(function(){var e,r;for(e=0;e",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=x.elements;return"string"==typeof e?e.split(" "):e}function o(e,t){var n=x.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),x.elements=n+" "+e,c(t)}function i(e){var t=C[e[b]];return t||(t={},w++,e[b]=w,C[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():S.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!o.canHaveChildren||E.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;l>a;a++)o.createElement(s[a]);return o}function l(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return x.shivMethods?a(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(x,t.frag)}function c(e){e||(e=t);var r=i(e);return!x.shivCSS||h||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),g||l(e,r),e}function f(e){for(var t,n=e.getElementsByTagName("*"),o=n.length,i=RegExp("^(?:"+r().join("|")+")$","i"),a=[];o--;)t=n[o],i.test(t.nodeName)&&a.push(t.applyElement(u(t)));return a}function u(e){for(var t,n=e.attributes,r=n.length,o=e.ownerDocument.createElement(_+":"+e.nodeName);r--;)t=n[r],t.specified&&o.setAttribute(t.nodeName,t.nodeValue);return o.style.cssText=e.style.cssText,o}function d(e){for(var t,n=e.split("{"),o=n.length,i=RegExp("(^|[\\s,>+~])("+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=[],u=l.length,p=Array(u);u--;)p[u]=l[u];for(;s=p.pop();)if(!s.disabled&&T.test(s.media)){try{i=s.imports,a=i.length}catch(m){a=0}for(u=0;a>u;u++)p.push(i[u]);try{c.push(s.cssText)}catch(m){}}c=d(c.reverse().join("")),o=f(e),r=n(e,c)}),l.attachEvent("onafterprint",function(){p(o),clearTimeout(a._removeSheetTimer),a._removeSheetTimer=setTimeout(t,500)}),e.printShived=!0,e)}var h,g,v="3.7.3",y=e.html5||{},E=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,S=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,b="_html5shiv",w=0,C={};!function(){try{var e=t.createElement("a");e.innerHTML="",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 x={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=x,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)}();x.type+=" print",x.shivPrint=m,m(t),"object"==typeof module&&module.exports&&(module.exports=x)}("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});var j=(S.testProp=function(e,t,r){return h([e],n,t,r)},S.testStyles=u),P=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=533>t&&e.match(/android/gi);return n||o||r}();P?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 k="Moz O ms Webkit",z=S._config.usePrefixes?k.split(" "):[];S._cssomPrefixes=z;var F=S._config.usePrefixes?k.toLowerCase().split(" "):[];S._domPrefixes=F,S.testAllProps=v,S.testAllProps=y;var $="CSS"in e&&"supports"in e.CSS,A="supportsCSS"in e;b.addTest("supports",$||A),b.addTest("csstransforms3d",function(){var e=!!y("perspective","1px",!0),t=b._config.usePrefixes;if(e&&(!t||"webkitPerspective"in x.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("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(C),delete S.addTest,delete S.addAsyncTest;for(var q=0;qu;u++)if(h=e[u],g=N.style[h],l(h,"-")&&(h=m(h)),N.style[h]!==n){if(i||r(o,"undefined"))return a(),"pfx"==t?h:!0;try{N.style[h]=o}catch(y){}if(N.style[h]!=g)return a(),"pfx"==t?h:!0}return a(),!1}function g(e,t,n){var o;for(var i in e)if(e[i]in t)return n===!1?e[i]:(o=t[e[i]],r(o,"function")?s(o,n||t):o);return!1}function v(e,t,n,o,i){var a=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+z.join(a+" ")+a).split(" ");return r(t,"string")||r(t,"undefined")?h(s,t,o,i):(s=(e+" "+F.join(a+" ")+a).split(" "),g(s,t,n))}function y(e,t,r){return v(e,n,n,t,r)}var E=[],S={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){E.push({name:e,fn:t,options:n})},addAsyncTest:function(e){E.push({name:null,fn:e})}},b=function(){};b.prototype=S,b=new b;var w,C=[],x=t.documentElement,T="svg"===x.nodeName.toLowerCase();!function(){var e={}.hasOwnProperty;w=r(e,"undefined")||r(e.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),S._l={},S.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),b.hasOwnProperty(e)&&setTimeout(function(){b._trigger(e,b[e])},0)},S._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout(function(){var e,r;for(e=0;e",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=x.elements;return"string"==typeof e?e.split(" "):e}function o(e,t){var n=x.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),x.elements=n+" "+e,c(t)}function i(e){var t=C[e[b]];return t||(t={},w++,e[b]=w,C[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():S.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!o.canHaveChildren||E.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;l>a;a++)o.createElement(s[a]);return o}function l(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return x.shivMethods?a(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(x,t.frag)}function c(e){e||(e=t);var r=i(e);return!x.shivCSS||h||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),g||l(e,r),e}function f(e){for(var t,n=e.getElementsByTagName("*"),o=n.length,i=RegExp("^(?:"+r().join("|")+")$","i"),a=[];o--;)t=n[o],i.test(t.nodeName)&&a.push(t.applyElement(u(t)));return a}function u(e){for(var t,n=e.attributes,r=n.length,o=e.ownerDocument.createElement(_+":"+e.nodeName);r--;)t=n[r],t.specified&&o.setAttribute(t.nodeName,t.nodeValue);return o.style.cssText=e.style.cssText,o}function d(e){for(var t,n=e.split("{"),o=n.length,i=RegExp("(^|[\\s,>+~])("+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=[],u=l.length,p=Array(u);u--;)p[u]=l[u];for(;s=p.pop();)if(!s.disabled&&T.test(s.media)){try{i=s.imports,a=i.length}catch(m){a=0}for(u=0;a>u;u++)p.push(i[u]);try{c.push(s.cssText)}catch(m){}}c=d(c.reverse().join("")),o=f(e),r=n(e,c)}),l.attachEvent("onafterprint",function(){p(o),clearTimeout(a._removeSheetTimer),a._removeSheetTimer=setTimeout(t,500)}),e.printShived=!0,e)}var h,g,v="3.7.3",y=e.html5||{},E=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,S=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,b="_html5shiv",w=0,C={};!function(){try{var e=t.createElement("a");e.innerHTML="",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 x={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=x,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)}();x.type+=" print",x.shivPrint=m,m(t),"object"==typeof module&&module.exports&&(module.exports=x)}("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});var j=(S.testProp=function(e,t,r){return h([e],n,t,r)},S.testStyles=u),P=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=533>t&&e.match(/android/gi);return n||o||r}();P?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 k="Moz O ms Webkit",z=S._config.usePrefixes?k.split(" "):[];S._cssomPrefixes=z;var F=S._config.usePrefixes?k.toLowerCase().split(" "):[];S._domPrefixes=F,S.testAllProps=v,S.testAllProps=y;var $="CSS"in e&&"supports"in e.CSS,A="supportsCSS"in e;b.addTest("supports",$||A),b.addTest("csstransforms3d",function(){var e=!!y("perspective","1px",!0),t=b._config.usePrefixes;if(e&&(!t||"webkitPerspective"in x.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("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(C),delete S.addTest,delete S.addAsyncTest;for(var q=0;qf;f++)if(h=e[f],g=N.style[h],l(h,"-")&&(h=m(h)),N.style[h]!==n){if(i||r(o,"undefined"))return a(),"pfx"==t?h:!0;try{N.style[h]=o}catch(y){}if(N.style[h]!=g)return a(),"pfx"==t?h:!0}return a(),!1}function g(e,t,n){var o;for(var i in e)if(e[i]in t)return n===!1?e[i]:(o=t[e[i]],r(o,"function")?s(o,n||t):o);return!1}function v(e,t,n,o,i){var a=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+P.join(a+" ")+a).split(" ");return r(t,"string")||r(t,"undefined")?h(s,t,o,i):(s=(e+" "+A.join(a+" ")+a).split(" "),g(s,t,n))}function y(e,t,r){return v(e,n,n,t,r)}var b=[],E={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){b.push({name:e,fn:t,options:n})},addAsyncTest:function(e){b.push({name:null,fn:e})}},S=function(){};S.prototype=E,S=new S;var x,w=[],C=t.documentElement,T="svg"===C.nodeName.toLowerCase();!function(){var e={}.hasOwnProperty;x=r(e,"undefined")||r(e.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),E._l={},E.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),S.hasOwnProperty(e)&&setTimeout(function(){S._trigger(e,S[e])},0)},E._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout(function(){var e,r;for(e=0;e",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=w[e[S]];return t||(t={},x++,e[S]=x,w[x]=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||b.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;l>a;a++)o.createElement(s[a]);return o}function l(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return C.shivMethods?a(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(C,t.frag)}function c(e){e||(e=t);var r=i(e);return!C.shivCSS||h||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),g||l(e,r),e}function u(e){for(var t,n=e.getElementsByTagName("*"),o=n.length,i=RegExp("^(?:"+r().join("|")+")$","i"),a=[];o--;)t=n[o],i.test(t.nodeName)&&a.push(t.applyElement(f(t)));return a}function f(e){for(var t,n=e.attributes,r=n.length,o=e.ownerDocument.createElement(_+":"+e.nodeName);r--;)t=n[r],t.specified&&o.setAttribute(t.nodeName,t.nodeValue);return o.style.cssText=e.style.cssText,o}function d(e){for(var t,n=e.split("{"),o=n.length,i=RegExp("(^|[\\s,>+~])("+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;a>f;f++)p.push(i[f]);try{c.push(s.cssText)}catch(m){}}c=d(c.reverse().join("")),o=u(e),r=n(e,c)}),l.attachEvent("onafterprint",function(){p(o),clearTimeout(a._removeSheetTimer),a._removeSheetTimer=setTimeout(t,500)}),e.printShived=!0,e)}var h,g,v="3.7.3",y=e.html5||{},b=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,E=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,S="_html5shiv",x=0,w={};!function(){try{var e=t.createElement("a");e.innerHTML="",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")};S._q.push(function(){delete _.elem});var N={style:_.elem.style};S._q.unshift(function(){delete N.style});var k=(E.testProp=function(e,t,r){return h([e],n,t,r)},E.testStyles=f),j=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=533>t&&e.match(/android/gi);return n||o||r}();j?S.addTest("fontface",!1):k('@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]);S.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;S.addTest("supports",F||$),S.addTest("csstransforms3d",function(){var e=!!y("perspective","1px",!0),t=S._config.usePrefixes;if(e&&(!t||"webkitPerspective"in C.style)){var n,r="#modernizr{width:0;height:0}";S.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}}",k(r+n,function(t){e=7===t.offsetWidth&&18===t.offsetHeight})}return e}),S.addTest("checked",function(){return k("#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})}),S.addTest("target",function(){var t=e.document;if(!("querySelectorAll"in t))return!1;try{return t.querySelectorAll(":target"),!0}catch(n){return!1}}),S.addTest("contains",r(String.prototype.contains,"function")),o(),i(w),delete E.addTest,delete E.addAsyncTest;for(var q=0;q {% endif %} {% endblock %} - - - + + + + {% for path in extra_css %} {% endfor %} - + @@ -87,7 +73,7 @@ var base_url = '{{ base_url }}'; var repo_url = '{{ repo_url }}'; - + {% for path in extra_javascript %} {% endfor %} diff --git a/material/header.html b/material/header.html index 5e41a917f..e17d336cf 100644 --- a/material/header.html +++ b/material/header.html @@ -9,13 +9,14 @@ {{ page_title | default(site_name, true) }} -
    + diff --git a/src/nav-item.html b/src/nav-item.html index 887059c29..fc5ba402e 100644 --- a/src/nav-item.html +++ b/src/nav-item.html @@ -58,6 +58,30 @@ class="md-nav__link md-nav__link--active"> {{ nav_item.title }} + + + + + + + + + {% else %} diff --git a/src/search.html b/src/search.html new file mode 100644 index 000000000..e69de29bb From 841b493df66bf03921efd1b05c147863c513bb50 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Thu, 8 Sep 2016 22:29:26 +0200 Subject: [PATCH 015/202] Adjusted error handling in px2em --- src/assets/stylesheets/helpers/_px2em.scss | 16 ++++++++++++---- src/assets/stylesheets/themes/_default.scss | 12 ------------ 2 files changed, 12 insertions(+), 16 deletions(-) delete mode 100644 src/assets/stylesheets/themes/_default.scss diff --git a/src/assets/stylesheets/helpers/_px2em.scss b/src/assets/stylesheets/helpers/_px2em.scss index da40340cc..0756797c4 100644 --- a/src/assets/stylesheets/helpers/_px2em.scss +++ b/src/assets/stylesheets/helpers/_px2em.scss @@ -35,9 +35,13 @@ /// @function px2em($size, $base: 16px) { @if unit($size) == px { - @return ($size / $base) * 1.0em; + @if unit($base) == px { + @return ($size / $base) * 1.0em; + } @else { + @error "Invalid base: #{$base} - unit must be 'px'"; + } } @else { - @error "Invalid unit: #{$size} - must be px"; + @error "Invalid size: #{$size} - unit must be 'px'"; } } @@ -52,8 +56,12 @@ /// @function px2rem($size, $base: 10px) { @if unit($size) == px { - @return ($size / $base) * 1.0rem; + @if unit($base) == px { + @return ($size / $base) * 1.0rem; + } @else { + @error "Invalid base: #{$base} - unit must be 'px'"; + } } @else { - @error "Invalid unit: #{$size} - must be px"; + @error "Invalid size: #{$size} - unit must be 'px'"; } } diff --git a/src/assets/stylesheets/themes/_default.scss b/src/assets/stylesheets/themes/_default.scss deleted file mode 100644 index a64631714..000000000 --- a/src/assets/stylesheets/themes/_default.scss +++ /dev/null @@ -1,12 +0,0 @@ -// ---------------------------------------------------------------------------- -// Theme colors -// ---------------------------------------------------------------------------- - -// Headlines -// $md-theme-h1-color: $md-color-black--light; -// $md-theme-h2-color: $md-color-black; -// $md-theme-h3-color: $md-color-black; -// $md-theme-h4-color: $md-color-black; -// $md-theme-h5-6-color: $md-color-black--light; -// -// $md-theme-hr-color: $md-color-black--lighter; From 37310eb52dd35e66cf7c4cde5c125e4c5a024571 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sun, 11 Sep 2016 19:00:53 +0200 Subject: [PATCH 016/202] Refactored Gulp workflow and added styles for extensions --- .gitignore | 4 +- Gulpfile.js | 202 ++++++++++------- material/assets/fonts/icon.eot | Bin 2224 -> 0 bytes material/assets/fonts/icon.svg | 22 -- material/assets/fonts/icon.ttf | Bin 2072 -> 0 bytes material/assets/fonts/icon.woff | Bin 2148 -> 0 bytes material/assets/images/favicon-e565ddfa3b.ico | Bin 1150 -> 0 bytes .../icons/bitbucket-black-850dc5f8b2.svg | 1 + .../assets/images/icons/bitbucket-black.svg | 3 - .../icons/bitbucket-white-42306ad0de.svg | 1 + .../assets/images/icons/bitbucket-white.svg | 3 - .../images/icons/github-black-3dffdcccb0.svg | 1 + material/assets/images/icons/github-black.svg | 3 - .../images/icons/github-white-75cacf3601.svg | 1 + material/assets/images/icons/github-white.svg | 3 - .../images/icons/gitlab-black-bedc10d7f4.svg | 1 + .../images/icons/gitlab-white-3c8a368006.svg | 1 + ...6219c4975.js => application-ac947cb450.js} | 2 +- material/assets/javascripts/application.js | 8 - material/assets/javascripts/modernizr.js | 1 - .../stylesheets/application-6e34e5e667.css | 1 + .../stylesheets/application-9be6329335.css | 1 - material/assets/stylesheets/application.css | 1 - material/base.html | 11 +- material/footer.html | 2 +- material/header.html | 21 +- material/manifest.json | 6 - package.json | 5 +- src/assets/images/icons/bitbucket-black.svg | 21 +- src/assets/images/icons/bitbucket-white.svg | 21 +- src/assets/images/icons/github-black.svg | 26 ++- src/assets/images/icons/github-white.svg | 26 ++- src/assets/images/icons/gitlab-black.svg | 31 +++ src/assets/images/icons/gitlab-white.svg | 32 +++ src/assets/javascripts/application.js | 2 +- src/assets/stylesheets/_shame.scss | 213 +++++++++++++++++- src/assets/stylesheets/base/_reset.scss | 1 - src/assets/stylesheets/base/_typeset.scss | 2 +- src/assets/stylesheets/layout/_base.scss | 1 + src/assets/stylesheets/layout/_search.scss | 2 +- src/base.html | 20 +- src/footer.html | 2 +- src/header.html | 30 ++- 43 files changed, 541 insertions(+), 194 deletions(-) delete mode 100755 material/assets/fonts/icon.eot delete mode 100755 material/assets/fonts/icon.svg delete mode 100755 material/assets/fonts/icon.ttf delete mode 100755 material/assets/fonts/icon.woff delete mode 100644 material/assets/images/favicon-e565ddfa3b.ico create mode 100644 material/assets/images/icons/bitbucket-black-850dc5f8b2.svg delete mode 100644 material/assets/images/icons/bitbucket-black.svg create mode 100644 material/assets/images/icons/bitbucket-white-42306ad0de.svg delete mode 100644 material/assets/images/icons/bitbucket-white.svg create mode 100644 material/assets/images/icons/github-black-3dffdcccb0.svg delete mode 100644 material/assets/images/icons/github-black.svg create mode 100644 material/assets/images/icons/github-white-75cacf3601.svg delete mode 100644 material/assets/images/icons/github-white.svg create mode 100644 material/assets/images/icons/gitlab-black-bedc10d7f4.svg create mode 100644 material/assets/images/icons/gitlab-white-3c8a368006.svg rename material/assets/javascripts/{application-56219c4975.js => application-ac947cb450.js} (95%) delete mode 100644 material/assets/javascripts/application.js delete mode 100644 material/assets/javascripts/modernizr.js create mode 100644 material/assets/stylesheets/application-6e34e5e667.css delete mode 100644 material/assets/stylesheets/application-9be6329335.css delete mode 100644 material/assets/stylesheets/application.css delete mode 100644 material/manifest.json create mode 100644 src/assets/images/icons/gitlab-black.svg create mode 100644 src/assets/images/icons/gitlab-white.svg diff --git a/.gitignore b/.gitignore index 9c5346675..0dacbf28e 100644 --- a/.gitignore +++ b/.gitignore @@ -21,12 +21,12 @@ # Mac OS X internals .DS_Store -# Bower and NPM libraries -bower_components +# NPM libraries node_modules # Build files build +manifest.json MANIFEST site diff --git a/Gulpfile.js b/Gulpfile.js index 51238b9f4..9a2e78f70 100755 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -28,16 +28,16 @@ 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 collect = require('gulp-rev-collector'); 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 minimage = require('gulp-image-optimization'); +var minsvg = require('gulp-svgmin'); var modernizr = require('gulp-modernizr'); var mqpacker = require('css-mqpacker'); var notifier = require('node-notifier'); @@ -53,6 +53,7 @@ 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'); /* ---------------------------------------------------------------------------- @@ -62,6 +63,9 @@ var webpack = require('webpack'); /* MkDocs server */ var server = null; +/* Watching context */ +var watch = false; + /* ---------------------------------------------------------------------------- * Overrides * ------------------------------------------------------------------------- */ @@ -97,22 +101,45 @@ gulp.src = function() { * ------------------------------------------------------------------------- */ /* - * Build stylesheets from SASS source. + * Clean stylesheets generated by build. */ -gulp.task('assets:lint:stylesheets', function() { - return gulp.src('src/assets/stylesheets/*.scss') - .pipe(gulpif(args.production, - sasslint({ - configFile: './.sass-lint.yml' - }))) - .pipe(gulpif(args.production, sasslint.format())) - .pipe(gulpif(args.production, sasslint.failOnError())); +gulp.task('assets:clean:stylesheets', function() { + 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)); +}); + +/* + * Clean images generated by build. + */ +gulp.task('assets:clean:images', function() { + 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' +]); + /* * Build stylesheets from SASS source. */ -gulp.task('assets:stylesheets', function() { +gulp.task('assets:build:stylesheets', args.production ? [ + 'assets:clean:stylesheets', + 'assets:build:images', +] : [], function() { return gulp.src('src/assets/stylesheets/*.scss') .pipe(gulpif(args.sourcemaps, sourcemaps.init())) .pipe( @@ -130,13 +157,24 @@ gulp.task('assets:stylesheets', function() { ])) .pipe(gulpif(args.sourcemaps, sourcemaps.write())) .pipe(gulpif(args.production, mincss())) - .pipe(gulp.dest('material/assets/stylesheets')); + .pipe(gulpif(args.production, rev())) + .pipe(gulpif(args.production, + version({ manifest: gulp.src('manifest.json') }))) + .pipe(gulp.dest('material/assets/stylesheets')) + .pipe(gulpif(args.production, + rev.manifest('manifest.json', { + base: 'material/assets', + merge: true + }))) + .pipe(gulpif(args.production, gulp.dest('material/assets'))); }); /* * Build javascripts by transpiling ES6 with babel. */ -gulp.task('assets:javascripts', function() { +gulp.task('assets:build:javascripts', args.production ? [ + 'assets:clean:javascripts' +] : [], function() { return gulp.src('src/assets/javascripts/**/*.js') .pipe( stream({ @@ -177,15 +215,22 @@ gulp.task('assets:javascripts', function() { }, devtool: args.sourcemaps ? 'source-map' : '' })) - .pipe(gulp.dest('material/assets/javascripts')); + .pipe(gulpif(args.production, rev())) + .pipe(gulp.dest('material/assets/javascripts')) + .pipe(gulpif(args.production, + rev.manifest('manifest.json', { + base: 'material/assets', + merge: true + }))) + .pipe(gulpif(args.production, gulp.dest('material/assets'))); }); /* * Create a customized modernizr build. */ -gulp.task('assets:modernizr', [ - 'assets:stylesheets', - 'assets:javascripts' +gulp.task('assets:build:modernizr', [ + 'assets:build:stylesheets', + 'assets:build:javascripts' ], function() { return gulp.src([ 'material/assets/stylesheets/*.css', @@ -202,35 +247,64 @@ gulp.task('assets:modernizr', [ })) .pipe(concat('modernizr.js')) .pipe(gulpif(args.production, uglify())) - .pipe(gulp.dest('material/assets/javascripts')); + .pipe(gulpif(args.production, rev())) + .pipe(gulp.dest('material/assets/javascripts')) + .pipe(gulpif(args.production, + rev.manifest('manifest.json', { + base: 'material/assets', + merge: true + }))) + .pipe(gulpif(args.production, gulp.dest('material/assets'))); }); /* - * Copy static assets like images and webfonts. + * Copy and minify vector graphics. */ -gulp.task('assets:static', function() { - return gulp.src('src/assets/images/**/*') +gulp.task('assets:build:images:svg', function() { + return gulp.src('src/assets/images/**/*.svg') + .pipe(gulpif(args.production, minsvg())) + .pipe(gulpif(args.production, rev())) + .pipe(gulp.dest('material/assets/images')) .pipe(gulpif(args.production, - minimage({ - optimizationLevel: 5, - progressive: true, - interlaced: true + rev.manifest('manifest.json', { + base: 'material/assets', + merge: true }))) - .pipe(gulp.dest('material/assets/images')); + .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')) +}); + +/* + * Copy images. + */ +gulp.task('assets:build:images', [ + 'assets:clean:images' +], function() { + return gulp.start([ + 'assets:build:images:svg', + 'assets:build:images:ico' + ]); }); /* * Minify views. */ -gulp.task('assets:views', args.production ? [ - 'assets:modernizr', - 'assets:revisions:clean', - 'assets:revisions' +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( + return gulp.src('src/*.html') + .pipe(gulpif(watch, changed('material'))) + .pipe( minhtml({ collapseBooleanAttributes: true, removeComments: true, @@ -242,38 +316,7 @@ gulp.task('assets:views', args.production ? [ .pipe(replace('$theme-version$', metadata.version)) .pipe(compact()) .pipe(gulpif(args.production, - addsrc.append([ - 'material/manifest.json', - 'material/**/*.css' - ]))) - .pipe(gulpif(args.production, collect())) - .pipe(ignore.exclude(/manifest\.json$/)) - .pipe(gulp.dest('material')); -}); - -/* - * Clean outdated revisions. - */ -gulp.task('assets:revisions:clean', function() { - return gulp.src(['material/**/*.{ico,css,js,png,jpg,gif}']) - .pipe(ignore.include(/-[a-f0-9]{8,}\.(ico|css|js|png|jpg|gif)$/)) - .pipe(vinyl(clean)); -}); - -/* - * Revision assets after build. - */ -gulp.task('assets:revisions', [ - 'assets:revisions:clean', - 'assets:stylesheets', - 'assets:javascripts', - 'assets:static' -], function() { - return gulp.src(['material/**/*.{ico,css,js,png,jpg,gif}']) - .pipe(ignore.exclude(/-[a-f0-9]{8,}\.(css|js|png|jpg|gif)$/)) - .pipe(rev()) - .pipe(gulp.dest('material')) - .pipe(rev.manifest('manifest.json')) + version({ manifest: gulp.src('manifest.json') }))) .pipe(gulp.dest('material')); }); @@ -281,38 +324,38 @@ gulp.task('assets:revisions', [ * Build assets. */ gulp.task('assets:build', [ - 'assets:stylesheets', - 'assets:javascripts', - 'assets:modernizr', - 'assets:static', - 'assets:views' + '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; /* Rebuild stylesheets */ gulp.watch([ 'src/assets/stylesheets/**/*.scss' - ], ['assets:stylesheets']); + ], ['assets:build:stylesheets']); /* Rebuild javascripts */ gulp.watch([ - 'src/assets/javascripts/**/*.js', - 'bower.json' - ], ['assets:javascripts']); + 'src/assets/javascripts/**/*.js' + ], ['assets:build:javascripts']); - /* Copy static assets */ + /* Copy images */ gulp.watch([ - 'src/assets/{fonts,images}/*' - ], ['assets:static']); + 'src/assets/images/**/*' + ], ['assets:build:images']); /* Minify views */ gulp.watch([ 'src/*.html' - ], ['assets:views']); + ], ['assets:build:views']); }); /* ---------------------------------------------------------------------------- @@ -360,6 +403,7 @@ gulp.task('mkdocs:serve', function() { * Build assets and documentation. */ gulp.task('build', [ + 'assets:clean', 'assets:build' ].concat(args.mkdocs ? 'mkdocs:build' diff --git a/material/assets/fonts/icon.eot b/material/assets/fonts/icon.eot deleted file mode 100755 index 8f81638c2de436e1b5cc77b6a2693b2b347a0151..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2224 zcmaJDYiN^K^qhP1ZcHEMVbZM4%Vs7uwoQ|)E~(XOx7OBXnq))T&RAn>*Cw^Cqp}}H zWH6912NR|+2m5JcjIkeMjv=!Q9249yfx%!u#)^-T>W{&MHQBjeBBo>Pe4KmF^E>CB z@7#O8&r|?g2oV@;1cVDHB*W2-a$#G6b3^#>-#P#loPbHlK$=uKI0z}2f>SUHNmw9> z5fUU>fJL$rHa6%4A9RqW){j^bqzea^bdbuq5*;Zk-LE^Cdn?+_Wk$3IeMJy!S`Wh)UMyN+J zdS?0mGDhF6kI!%~<+qJq>2&vEpxeis4jnV-TbREq7%~}5A-CPp7U&N8yNm|C!pSZ= z>RMgx`%^o6Qv2I!?&%)eT36VWFT?1`lcUl3`6$Mm(PLi)Z77M4~2lu_KixyTMMWFbEgdpD<-HjI^xqTD%xRVN3f% z27EufM7BCq_F{-eA6ANNH2Jt&hXy?n=(b9Pj&yDA7Bp1}?(gblf$p{dxyryAvDrJc zt^F=*bbI@7kDasKZ>5j8H`V(+mJUPmWnFWsN4v+*4sUM2nLSNzr@QTW$GB0}ROgND*=9A% zw1)nnmfd#y?v|l`gH~p?ZtFkf)fup1^YGd6?&$gJGyIAekox zZ*nZ1`&86Qhw@P=Z(>&x;ARp0>8hS~9}KyeD>li(=rCx4^e?QEnx+3`oEyA6+GNZnmZ#7YHL z5IITs5QomaULXEb^rwKI?mhVE*tF(gTJylu*7C253QKlw|iZm6P z(d9W@r8&tvtF(;hi7G9p>(o@G6(o;TX$^Ek_QYf+{q!nMq!t!WWYV@yU&nvnzqQ7- z^ug5BsoCVh#%sLRU?7uTvQ4GZsfFZH>X_~5Y1`mrW+anI`(Qx2;FrKgKL9DZ>czF6 gge97fk?bg(rg2dERTv>l@iX9~idJf0Tk{R{Kaui$V*mgE diff --git a/material/assets/fonts/icon.svg b/material/assets/fonts/icon.svg deleted file mode 100755 index 86250e7b4..000000000 --- a/material/assets/fonts/icon.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/material/assets/fonts/icon.ttf b/material/assets/fonts/icon.ttf deleted file mode 100755 index b5ab5601bed7765790037c721c2ee1c7d444a7a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2072 zcmaJ>ZD^ZS6h7zPd^bx!mX9TkZNApHq|4go%g&_h)~(vEUF()a8EswGW$kL4bZsXc z{#b?xf`|$Z+`tL`T!ufyAL2xYE5gLVlqDbt{t(MPB;9@p4s7DNZ{D%&kLTsw`<$

    vJhI<5Xe z^&QFMB)b;UtBYWSqa?48?8v4UGUKsFzmfbg(%Sf&xy$DPi zbfnwchv86wxm^ZkGPbc`Pb6wFS)yL2t0NqW1bfUTqsq-LxEk6$od+|!dou?+Y3~h9 zY;P#-DOO?Z^y#tj#l>+<>OGUe-8Hl1=4scviv7i!dF-^PzW_;|q^3}((HZq>k@AFj za`SOHRw-aIR%U7}ZV;|qiIO54r&n>b%tw?$r;Xb*d)E+ zLNcE$rBZdZYot1yCMT7`AXeUd%+%!=(zRk6$#NWpFMS^h;0NI)@-?8k52LgOu-0U= zCBVG~G#Lq?*De7A**d&!XpsRA_VlrEs3T0F3b4l=&MtlXfX6<*vvZ`^$=Tkwvd6qz z8iPJtmnr?Sp|w$G)EeJ75P4^Ki&gI)c_r2P(eIxe!uGI<-PJcMj4@A(P2KKs_Ky0u zY-`}I-b1@A;pd_gcHE*z#F6Dju3&7>Vf1w|G`p?(`K!fQwLxu;wu}Bk^=rD%Wq6eY zc~C6oNH~UGRY!LKyE`J?ZP;y&M5){Wr@4s+Fxq9d^dSupt=(pox{WSsVA7_dyGQ%T zkLHfS+_m?{LzCx6wl?A1z80_B+wr_>(yVA{@F(`|uv-;+)4*`sUZ-@(rOxUz_){IXb+m(ESuc#BROaaae4B#(WznI{#M;k znD=Nk8f^~`59wO>`-Z2YR;7NICpfCtZB^K&&Rt51V#M4rnyDoB(|4iA;f>}+;x z5otP{++V0d0sZLTyuwn%euOGiis-N8X;i3RN$~RmPl`F;uH@0}4XCtm2B;alSGl#i zTDf&^@W;=v^QH}3D}UNqE(z!PfayTO(nue&J!2t7nh~I_*9l`!Y*`4VjnRT zN2H^_cpFT>oA54t4&T6Sd;!12+jyTTn2qcrYZJUi-4XPpI!TZh1AHOZh9ZTG8Fll3 zj5+Cd%2+}8sEn2L{p)3{B7Lunbzp;&lo1tL(rCz1!wd{CB4bYaZW${GPsvybX0XUu zMf$jmbr6F5sp(u6PQf(fAe+i8EuYF|9o>O0NI?dcV3|y000$i$fUbJydVDxDb7nrh z1cxbT2F}1dq+zMvVKA3nam-}0nWgkf=7i(;S;x?HZZwz624GN1utF(jC^{>pO~VT9 cCrEc3&eA$0)i+9>qL=`6wATCjoC1DrZ;vj6}9 diff --git a/material/assets/fonts/icon.woff b/material/assets/fonts/icon.woff deleted file mode 100755 index ed0f20d5b80ab98072f3557225b3333e01b78670..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2148 zcmaJ?U2M};6hG(Qeym;Bb)z4&t6RTVr5$BkzZkY-Fqm#^Y(iTNVUx0zjk&dB8w&A( z8e?KYjQT(#L^1J^5+8grk{BY32}Tk$w26s{CdP%2q=N?^NL=f=|NfEk;{E5G`#WF% zbMEQ+-@ZLQGz18=8fKtT+PBtZfuCRFM|SoCU;}B73uHeVHCj?Ez9{;wK zTUn*D_W$R{332`_ehf+gc8O7y@KJ5YhY&;!$@L2j^^(8?0P8LMM)d{^a3azm(bMIS zfRu%hoooWzi3=|~D5MA-b&3&2aI9i2uExtracIOW6c|0?H$$~W zZ9y!=*Vf_)tPsDs7NdhB6d}+3tSBZMy=t#;i_#gmKVB}!H#Q{BF2%~_Sb0P64eD(k z3OrBm<)9XEQD?aJn4IA}hfUH8DkSsCQYuwfJIy)O;WRm^6b7;K<`bqa$B>Q{+ent< zD0~4L6~GU|%jBy^bw5Ul2e8&;vn9a2dNdgcpw}(|J=r?F?P!q!5BB!6aHum(p$f3a z9nNlD$DqePv7>9W&&k=|ce2O5P0c}{t=p7-Mc>w}HEN7+9*Dd@(qz@SM_)~Kee(OK zhp;1TV)t|{3S-REYEyT3oPA^drmcrvRh&Z~^%oU97IgGw;hGw@_ zw{WdEr`D^@(GJmHsD4A|xdN||AP+eZdXI)&A~eej51Z$iVC(RU|96Bn+}^DBZUFQ1>X@m8%S;;ip%T zC`Qa3qnS!_KYb@^(9x;gEzTCV29c)2$^C^Y6wr_U&8sX$|R8 z@T8dYZAu>9)`&_AXLP3y-LKp}d$w}>{?LzKVAm}hwpISJ-KyNBN%K)miDJY&YUw3m zx5+}J)FAUE5{XIzOY|hKUAvk}<+<;l66GmTOp2rQJq25wUUv)C$xc41+%-H(AWe5A zm8g_hNz^3KLmYYUjpo?jVm`(C<=%tOpY8ImEbel;MWjV>(tSr4mRQ8ao9dULW~r$} z7|D5}0$p)g+KbO*$tLVVmn8BLQE{}iV1#!1Z+QzofG^=&xP!a!YrKOGn1b2JF0vZn zb?S~-Ppgvznd#vxxi%CjWX!0W2V~4izeC0f!bfGSr0-uRV-@N9WUK`noTQAX(2%Bq zEH%tP52G^Xr0R1(LwEqj{ug`Uae@E< diff --git a/material/assets/images/favicon-e565ddfa3b.ico b/material/assets/images/favicon-e565ddfa3b.ico deleted file mode 100644 index e85006a3ce1c6fd81faa6d5a13095519c4a6fc96..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1150 zcmd6lF-yZh9L1kl>(HSEK`2y^4yB6->f+$wD)=oNY!UheIt03Q=;qj=;8*Bap_4*& za8yAl;wmmx5Yyi^7dXN-WYdJ-{qNqpcez|5t#Fr0qTSYcPTG`I2PBk8r$~4kg^0zN zCJe(rhix3do!L$bZ+IuZ{i08x=JR3=e+M4pv0KsKA??{u_*EFfo|`p&t`Vf=jn{)F z1fKk9hWsmYwqWAP^JO*5u*R;*L&dX3H$%S7oB$f0{ISh{QVXuncnzN67WQH2`lip7 zhX+VI$6x$1+$8gMjh4+1l0N#8_0Fh=N#EwpKk{SeE!)SHFB@xQFX3y+8sF#_@!bDW eIdI-IC`$c%>bk?KbPeN9RHtL<1^)v~#xMt8oB^@` diff --git a/material/assets/images/icons/bitbucket-black-850dc5f8b2.svg b/material/assets/images/icons/bitbucket-black-850dc5f8b2.svg new file mode 100644 index 000000000..8f79a03b7 --- /dev/null +++ b/material/assets/images/icons/bitbucket-black-850dc5f8b2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/material/assets/images/icons/bitbucket-black.svg b/material/assets/images/icons/bitbucket-black.svg deleted file mode 100644 index d65ad38fc..000000000 --- a/material/assets/images/icons/bitbucket-black.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/material/assets/images/icons/bitbucket-white-42306ad0de.svg b/material/assets/images/icons/bitbucket-white-42306ad0de.svg new file mode 100644 index 000000000..1ddc25338 --- /dev/null +++ b/material/assets/images/icons/bitbucket-white-42306ad0de.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/material/assets/images/icons/bitbucket-white.svg b/material/assets/images/icons/bitbucket-white.svg deleted file mode 100644 index d25b23ba1..000000000 --- a/material/assets/images/icons/bitbucket-white.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/material/assets/images/icons/github-black-3dffdcccb0.svg b/material/assets/images/icons/github-black-3dffdcccb0.svg new file mode 100644 index 000000000..4139a689a --- /dev/null +++ b/material/assets/images/icons/github-black-3dffdcccb0.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/material/assets/images/icons/github-black.svg b/material/assets/images/icons/github-black.svg deleted file mode 100644 index 839301a8a..000000000 --- a/material/assets/images/icons/github-black.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/material/assets/images/icons/github-white-75cacf3601.svg b/material/assets/images/icons/github-white-75cacf3601.svg new file mode 100644 index 000000000..79d0364ec --- /dev/null +++ b/material/assets/images/icons/github-white-75cacf3601.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/material/assets/images/icons/github-white.svg b/material/assets/images/icons/github-white.svg deleted file mode 100644 index 0662058c0..000000000 --- a/material/assets/images/icons/github-white.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/material/assets/images/icons/gitlab-black-bedc10d7f4.svg b/material/assets/images/icons/gitlab-black-bedc10d7f4.svg new file mode 100644 index 000000000..7b6bd271e --- /dev/null +++ b/material/assets/images/icons/gitlab-black-bedc10d7f4.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/material/assets/images/icons/gitlab-white-3c8a368006.svg b/material/assets/images/icons/gitlab-white-3c8a368006.svg new file mode 100644 index 000000000..48fd49d5f --- /dev/null +++ b/material/assets/images/icons/gitlab-white-3c8a368006.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/material/assets/javascripts/application-56219c4975.js b/material/assets/javascripts/application-ac947cb450.js similarity index 95% rename from material/assets/javascripts/application-56219c4975.js rename to material/assets/javascripts/application-ac947cb450.js index ab02dbb29..b9b3f3865 100644 --- a/material/assets/javascripts/application-56219c4975.js +++ b/material/assets/javascripts/application-ac947cb450.js @@ -1,4 +1,4 @@ -!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);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-nav--toc .md-nav__link");o.listen(),window.addEventListener("resize",t);var a=0,c=document.getElementById("md-toggle-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))})})},function(e,t,n){var i;!function(){"use strict";/** +!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);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-nav--toc .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))})})},function(e,t,n){var i;!function(){"use strict";/** * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs. * * @codingstandard ftlabs-jsv2 diff --git a/material/assets/javascripts/application.js b/material/assets/javascripts/application.js deleted file mode 100644 index ab02dbb29..000000000 --- a/material/assets/javascripts/application.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);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-nav--toc .md-nav__link");o.listen(),window.addEventListener("resize",t);var a=0,c=document.getElementById("md-toggle-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))})})},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}]); \ No newline at end of file diff --git a/material/assets/javascripts/modernizr.js b/material/assets/javascripts/modernizr.js deleted file mode 100644 index 48561b997..000000000 --- a/material/assets/javascripts/modernizr.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t,n){function r(e,t){return typeof e===t}function o(){var e,t,n,o,i,a,s;for(var l in S)if(S.hasOwnProperty(l)){if(e=[],t=S[l],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;nf;f++)if(h=e[f],g=N.style[h],l(h,"-")&&(h=m(h)),N.style[h]!==n){if(i||r(o,"undefined"))return a(),"pfx"==t?h:!0;try{N.style[h]=o}catch(y){}if(N.style[h]!=g)return a(),"pfx"==t?h:!0}return a(),!1}function g(e,t,n){var o;for(var i in e)if(e[i]in t)return n===!1?e[i]:(o=t[e[i]],r(o,"function")?s(o,n||t):o);return!1}function v(e,t,n,o,i){var a=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+P.join(a+" ")+a).split(" ");return r(t,"string")||r(t,"undefined")?h(s,t,o,i):(s=(e+" "+A.join(a+" ")+a).split(" "),g(s,t,n))}function y(e,t,r){return v(e,n,n,t,r)}var S=[],E={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){S.push({name:e,fn:t,options:n})},addAsyncTest:function(e){S.push({name:null,fn:e})}},b=function(){};b.prototype=E,b=new b;var w,x=[],C=t.documentElement,T="svg"===C.nodeName.toLowerCase();!function(){var e={}.hasOwnProperty;w=r(e,"undefined")||r(e.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),E._l={},E.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),b.hasOwnProperty(e)&&setTimeout(function(){b._trigger(e,b[e])},0)},E._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout(function(){var e,r;for(e=0;e",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;l>a;a++)o.createElement(s[a]);return o}function l(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return C.shivMethods?a(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(C,t.frag)}function c(e){e||(e=t);var r=i(e);return!C.shivCSS||h||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),g||l(e,r),e}function u(e){for(var t,n=e.getElementsByTagName("*"),o=n.length,i=RegExp("^(?:"+r().join("|")+")$","i"),a=[];o--;)t=n[o],i.test(t.nodeName)&&a.push(t.applyElement(f(t)));return a}function f(e){for(var t,n=e.attributes,r=n.length,o=e.ownerDocument.createElement(_+":"+e.nodeName);r--;)t=n[r],t.specified&&o.setAttribute(t.nodeName,t.nodeValue);return o.style.cssText=e.style.cssText,o}function d(e){for(var t,n=e.split("{"),o=n.length,i=RegExp("(^|[\\s,>+~])("+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;a>f;f++)p.push(i[f]);try{c.push(s.cssText)}catch(m){}}c=d(c.reverse().join("")),o=u(e),r=n(e,c)}),l.attachEvent("onafterprint",function(){p(o),clearTimeout(a._removeSheetTimer),a._removeSheetTimer=setTimeout(t,500)}),e.printShived=!0,e)}var h,g,v="3.7.3",y=e.html5||{},S=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,E=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,b="_html5shiv",w=0,x={};!function(){try{var e=t.createElement("a");e.innerHTML="",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 k=E.testStyles=f,j=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=533>t&&e.match(/android/gi);return n||o||r}();j?b.addTest("fontface",!1):k('@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}}",k(r+n,function(t){e=7===t.offsetWidth&&18===t.offsetHeight})}return e}),b.addTest("checked",function(){return k("#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-content--typeset kbd{display:inline-block;padding:.4rem .5rem .5rem;border:.1rem solid #ccc;border-radius:.3rem;border-bottom-color:#bbb;background-color:#fcfcfc;color:#555;font-size:85%;line-height:1rem;box-shadow:inset 0 -.1rem 0 #bbb;vertical-align:.1rem;word-break:break-word}.md-content--typeset small{color:rgba(0,0,0,.54)}.md-content--typeset sub,.md-content--typeset sup{margin-left:.1rem}.md-content--typeset blockquote{padding-left:1.2rem;border-left:.4rem solid rgba(0,0,0,.26);color:rgba(0,0,0,.54)}.md-content--typeset ul{list-style-type:disc}.md-content--typeset ol ol{list-style-type:lower-alpha}.md-content--typeset ol ol ol{list-style-type:lower-roman}.md-content--typeset ol,.md-content--typeset ul{margin-left:1rem;padding:0}.md-content--typeset ol li,.md-content--typeset ul li{margin-bottom:1rem;margin-left:2rem}.md-content--typeset ol li:last-child,.md-content--typeset ul li:last-child{margin-bottom:0}.md-content--typeset ol li ol,.md-content--typeset ol li ul,.md-content--typeset ul li ol,.md-content--typeset ul li ul{margin-bottom:1rem;margin-left:1rem;padding-top:1rem}html{height:100%}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:1%}.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{display:inline-block;position:relative;margin:.4rem;padding:.8rem;-webkit-transition:opacity .25s;transition:opacity .25s;font-size:2.4rem;cursor:pointer;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-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{display:inline-block;margin:.4rem;padding:.8rem;-webkit-transition:background .25s;transition:background .25s;font-size:2.4rem;cursor:pointer}.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.2}.md-nav__title{margin:0;font-size:inherit;line-height:inherit}.md-nav--toc{border-left:.4rem solid #3f51b5}.md-nav__list{margin:0;padding:0;list-style:none}.md-nav__list .md-nav__list{margin-left:1.2rem}.md-nav__toggle~.md-nav__list{max-height:0;overflow:hidden}.md-nav__toggle:checked~.md-nav__list{max-height:100%}.md-nav__item{margin:.8rem 0 0;line-height:1.6rem}.md-nav__link{display:block;-webkit-transition:color .125s;transition:color .125s;text-overflow:ellipsis;overflow:hidden}.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-search{position:relative}.md-search__overlay{display:none}.md-search__inner{padding:.8rem .8rem 0}.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 .8rem 0 6.4rem;border-radius:.2rem}.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;-webkit-overflow-scrolling:touch}.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-sidebar__inner{padding:1.2rem}.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:2rem;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.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}.md-content--typeset .footnote{color:rgba(0,0,0,.54);font-size:80%}.md-content--typeset .footnote>ol{margin-left:0}.md-content--typeset .footnote>ol>li:hover .footnote-backref,.md-content--typeset .footnote>ol>li:target .footnote-backref{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.md-content--typeset .footnote>ol>li:hover .footnote-backref:hover,.md-content--typeset .footnote>ol>li:target .footnote-backref{color:#536dfe}.md-content--typeset .footnote-ref:before{position:absolute;margin-top:-8.4rem;padding-top:8.4rem;content:" ";pointer-events:none}.md-content--typeset .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}.md-content--typeset .footnote-backref:first-letter{font-size:0}.md-content--typeset .footnote-backref:after{content:"keyboard_return"}.md-content--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-content--typeset [id]:hover .headerlink,.md-content--typeset [id]:target .headerlink{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.md-content--typeset [id]:hover .headerlink:hover,.md-content--typeset [id]:target .headerlink{color:#536dfe}.md-content--typeset h1[id]:before{display:block;margin-top:-11rem;padding-top:11rem;content:" "}.md-content--typeset h2[id]:before{display:block;margin-top:-8.2rem;padding-top:8.2rem;content:" "}.md-content--typeset h3[id]:before{display:block;margin-top:-8.4rem;padding-top:8.4rem;content:" "}.md-content--typeset h4[id]:before{display:block;margin-top:-8.6rem;padding-top:8.6rem;content:" "}.md-content--typeset h5[id]:before,.md-content--typeset h6[id]:before{display:block;margin-top:-9rem;padding-top:9rem;content:" "}.md-search__suggest{background:#fff;border-radius:0 0 .3rem .3rem;color:#000;text-align:left;border-top:.1rem solid rgba(0,0,0,.07);display:none}.md-search__input:focus~.md-search__suggest{display:block}.md-search__input:focus{border-radius:.3rem .3rem 0 0}.md-header-source{position:relative;display:table-cell;white-space:nowrap;min-width:23rem;max-width:23rem;height:4.8rem;font-size:1.3rem;vertical-align:middle;padding-right:.8rem;padding-left:4rem;-webkit-transition:opacity .25s;transition:opacity .25s}.md-header-source:hover{opacity:.7}.md-header-source:before{content:" ";display:block;background-image:url(../images/icons/github-white-75cacf3601.svg);background-size:2.4rem 2.4rem;background-repeat:no-repeat;width:2.4rem;height:2.4rem;position:absolute;left:.8rem;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.md-header-source .title{font-weight:700;overflow:hidden;text-overflow:ellipsis}.md-header-source .count{color:hsla(0,0%,100%,.7);font-weight:700;font-size:1.1rem}.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}.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}article{overflow:auto}.floater{display:none;float:right;margin-top:9px;font-size:13px;padding-left:2.6rem}.floater:before{content:"edit"}.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}@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-sidebar--primary{position:fixed;top:0;width:24.2em;height:100%;-webkit-transform:translate3d(-24.2em,0,0);transform:translate3d(-24.2em,0,0);-webkit-transition:-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1),-webkit-transform .25s cubic-bezier(.4,0,.2,1);background:#fff;z-index:3}.no-csstransforms3d .md-sidebar--primary{display:none}.md-toggle--drawer:checked~.md-container .md-sidebar--primary{-webkit-transform:translateZ(0);transform:translateZ(0)}.no-csstransforms3d .md-toggle--drawer:checked~.md-container .md-sidebar--primary{display:block}.md-sidebar--primary .md-sidebar__scrollwrap{margin:0}}@media only screen and (min-width:60em){.md-content{margin-right:24.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-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__inner{padding:.4rem}.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:hsla(0,0%,100%,.12);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%,.3)}.md-search__input:focus{width:72.8rem;background:#fff;color:rgba(0,0,0,.87)}.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:44.9375em){.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 .15s cubic-bezier(.1,.7,.1,1);transition:opacity .15s .15s,-webkit-transform .3s .15s cubic-bezier(.1,.7,.1,1);transition:transform .3s .15s cubic-bezier(.1,.7,.1,1),opacity .15s .15s;transition:transform .3s .15s cubic-bezier(.1,.7,.1,1),opacity .15s .15s,-webkit-transform .3s .15s cubic-bezier(.1,.7,.1,1)}.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: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-9be6329335.css b/material/assets/stylesheets/application-9be6329335.css deleted file mode 100644 index 13beee5e7..000000000 --- a/material/assets/stylesheets/application-9be6329335.css +++ /dev/null @@ -1 +0,0 @@ -.md-content--typeset .footnote-backref,.md-icon{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-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{font-size:62.5%;-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}input{-webkit-appearance:none;-moz-appearance:none;appearance:none}body,kbd{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,.no-fontface kbd{font-family:Helvetica Neue,Helvetica,Arial,sans-serif}code,pre{font-family:Roboto Mono,Courier New,Courier,monospace;font-weight:500;-webkit-font-feature-settings:"kern","onum","liga";font-feature-settings:"kern","onum","liga"}.no-fontface code,.no-fontface pre{font-family:Courier New,Courier,monospace}.md-content--typeset{font-size:1.6rem;line-height:1.6}.md-content--typeset blockquote,.md-content--typeset ol,.md-content--typeset p,.md-content--typeset ul{margin:1.25em 0}.md-content--typeset h1{margin:0 0 4rem;color:rgba(0,0,0,.54);font-size:3.125rem;font-weight:300;letter-spacing:-.01em;line-height:1.3}.md-content--typeset h2{margin:4rem 0 1.6rem;font-size:2.5rem;font-weight:300;letter-spacing:-.01em;line-height:1.4}.md-content--typeset h3{margin:3.2rem 0 1.6rem;font-size:2rem;font-weight:400;letter-spacing:-.01em;line-height:1.5}.md-content--typeset h2+h3{margin-top:1.6rem}.md-content--typeset h4{margin:1.6rem 0;font-size:1.6rem;font-weight:700;letter-spacing:-.01em}.md-content--typeset h5,.md-content--typeset h6{margin:1.6rem 0;color:rgba(0,0,0,.54);font-size:1.28rem;font-weight:700;letter-spacing:-.01em}.md-content--typeset h5{text-transform:uppercase}.md-content--typeset hr{margin:2.4rem 0;border-bottom:.1rem dotted rgba(0,0,0,.26)}.md-content--typeset a{color:#3f51b5}.md-content--typeset a,.md-content--typeset a:before{-webkit-transition:color .125s;transition:color .125s}.md-content--typeset a:active,.md-content--typeset a:hover{color:#536dfe}.md-content--typeset code{margin:0 .4rem;padding:.1rem 0;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-content--typeset pre{margin:2rem 0;padding:1rem 1.2rem;background:#f7f7f7;color:#37474f;font-size:85%;line-height:1.4;overflow-x:scroll}.md-content--typeset pre>code{font-size:inherit}.md-content--typeset kbd{display:inline-block;padding:.4rem .5rem .5rem;border:.1rem solid #ccc;border-radius:.3rem;border-bottom-color:#bbb;background-color:#fcfcfc;color:#555;font-size:85%;line-height:1rem;box-shadow:inset 0 -.1rem 0 #bbb;vertical-align:.1rem;word-break:break-word}.md-content--typeset small{color:rgba(0,0,0,.54)}.md-content--typeset sub,.md-content--typeset sup{margin-left:.1rem}.md-content--typeset blockquote{padding-left:1.2rem;border-left:.4rem solid rgba(0,0,0,.26);color:rgba(0,0,0,.54)}.md-content--typeset ul{list-style-type:disc}.md-content--typeset ol ol{list-style-type:lower-alpha}.md-content--typeset ol ol ol{list-style-type:lower-roman}.md-content--typeset ol,.md-content--typeset ul{margin-left:1rem;padding:0}.md-content--typeset ol li,.md-content--typeset ul li{margin-bottom:1rem;margin-left:2rem}.md-content--typeset ol li:last-child,.md-content--typeset ul li:last-child{margin-bottom:0}.md-content--typeset ol li ol,.md-content--typeset ol li ul,.md-content--typeset ul li ol,.md-content--typeset ul li ul{margin-bottom:1rem;margin-left:1rem;padding-top:1rem}html{height:100%}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;vertical-align:top}.md-flex__cell--shrink{width:1%}.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{display:inline-block;position:relative;margin:.4rem;padding:.8rem;-webkit-transition:opacity .25s;transition:opacity .25s;font-size:2.4rem;cursor:pointer;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-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{display:inline-block;margin:.4rem;padding:.8rem;-webkit-transition:background .25s;transition:background .25s;font-size:2.4rem;cursor:pointer}.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.2}.md-nav__title{margin:0;font-size:inherit;line-height:inherit}.md-nav--toc{border-left:.4rem solid #3f51b5}.md-nav__list{margin:0;padding:0;list-style:none}.md-nav__list .md-nav__list{margin-left:1.2rem}.md-nav__toggle~.md-nav__list{max-height:0;overflow:hidden}.md-nav__toggle:checked~.md-nav__list{max-height:100%}.md-nav__item{margin:.8rem 0 0;line-height:1.6rem}.md-nav__link{display:block;-webkit-transition:color .125s;transition:color .125s;text-overflow:ellipsis;overflow:hidden}.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-search{position:relative}.md-search__overlay{display:none}.md-search__inner{padding:.8rem .8rem 0}.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 .8rem 0 6.4rem;border-radius:.2rem}.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;-webkit-overflow-scrolling:touch}.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-sidebar__inner{padding:1.2rem}.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:2rem;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.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}.md-content--typeset .footnote{color:rgba(0,0,0,.54);font-size:80%}.md-content--typeset .footnote>ol{margin-left:0}.md-content--typeset .footnote>ol>li:hover .footnote-backref,.md-content--typeset .footnote>ol>li:target .footnote-backref{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.md-content--typeset .footnote>ol>li:hover .footnote-backref:hover,.md-content--typeset .footnote>ol>li:target .footnote-backref{color:#536dfe}.md-content--typeset .footnote-ref:before{position:absolute;margin-top:-8.4rem;padding-top:8.4rem;content:" ";pointer-events:none}.md-content--typeset .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}.md-content--typeset .footnote-backref:first-letter{font-size:0}.md-content--typeset .footnote-backref:after{content:"keyboard_return"}.md-content--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-content--typeset [id]:hover .headerlink,.md-content--typeset [id]:target .headerlink{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.md-content--typeset [id]:hover .headerlink:hover,.md-content--typeset [id]:target .headerlink{color:#536dfe}.md-content--typeset h1[id]:before{display:block;margin-top:-11rem;padding-top:11rem;content:" "}.md-content--typeset h2[id]:before{display:block;margin-top:-8.2rem;padding-top:8.2rem;content:" "}.md-content--typeset h3[id]:before{display:block;margin-top:-8.4rem;padding-top:8.4rem;content:" "}.md-content--typeset h4[id]:before{display:block;margin-top:-8.6rem;padding-top:8.6rem;content:" "}.md-content--typeset h5[id]:before,.md-content--typeset h6[id]:before{display:block;margin-top:-9rem;padding-top:9rem;content:" "}.md-search__suggest{background:#fff;border-radius:0 0 .3rem .3rem;color:#000;text-align:left;border-top:.1rem solid rgba(0,0,0,.07);display:none}.md-search__input:focus~.md-search__suggest{display:block}.md-search__input:focus{border-radius:.3rem .3rem 0 0}.md-icon--github:before{content:" ";display:block;background-image:url(../images/icons/github-white.svg);background-size:2.4rem 2.4rem;background-repeat:no-repeat;height:2.4rem}.md-header-nav__source{display:table;white-space:nowrap}@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-sidebar--primary{position:fixed;top:0;width:24.2em;height:100%;-webkit-transform:translate3d(-24.2em,0,0);transform:translate3d(-24.2em,0,0);-webkit-transition:-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1),-webkit-transform .25s cubic-bezier(.4,0,.2,1);background:#fff;z-index:3}.no-csstransforms3d .md-sidebar--primary{display:none}.md-toggle--drawer:checked~.md-container .md-sidebar--primary{-webkit-transform:translateZ(0);transform:translateZ(0)}.no-csstransforms3d .md-toggle--drawer:checked~.md-container .md-sidebar--primary{display:block}.md-sidebar--primary .md-sidebar__scrollwrap{margin:0}}@media only screen and (min-width:60em){.md-content{margin-right:24.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-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__inner{padding:.4rem}.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:hsla(0,0%,100%,.12);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%,.3)}.md-search__input:focus{width:40rem;background:#fff;color:rgba(0,0,0,.87)}.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:44.9375em){.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 .15s cubic-bezier(.1,.7,.1,1);transition:opacity .15s .15s,-webkit-transform .3s .15s cubic-bezier(.1,.7,.1,1);transition:transform .3s .15s cubic-bezier(.1,.7,.1,1),opacity .15s .15s;transition:transform .3s .15s cubic-bezier(.1,.7,.1,1),opacity .15s .15s,-webkit-transform .3s .15s cubic-bezier(.1,.7,.1,1)}.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: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.css b/material/assets/stylesheets/application.css deleted file mode 100644 index 13beee5e7..000000000 --- a/material/assets/stylesheets/application.css +++ /dev/null @@ -1 +0,0 @@ -.md-content--typeset .footnote-backref,.md-icon{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-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{font-size:62.5%;-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}input{-webkit-appearance:none;-moz-appearance:none;appearance:none}body,kbd{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,.no-fontface kbd{font-family:Helvetica Neue,Helvetica,Arial,sans-serif}code,pre{font-family:Roboto Mono,Courier New,Courier,monospace;font-weight:500;-webkit-font-feature-settings:"kern","onum","liga";font-feature-settings:"kern","onum","liga"}.no-fontface code,.no-fontface pre{font-family:Courier New,Courier,monospace}.md-content--typeset{font-size:1.6rem;line-height:1.6}.md-content--typeset blockquote,.md-content--typeset ol,.md-content--typeset p,.md-content--typeset ul{margin:1.25em 0}.md-content--typeset h1{margin:0 0 4rem;color:rgba(0,0,0,.54);font-size:3.125rem;font-weight:300;letter-spacing:-.01em;line-height:1.3}.md-content--typeset h2{margin:4rem 0 1.6rem;font-size:2.5rem;font-weight:300;letter-spacing:-.01em;line-height:1.4}.md-content--typeset h3{margin:3.2rem 0 1.6rem;font-size:2rem;font-weight:400;letter-spacing:-.01em;line-height:1.5}.md-content--typeset h2+h3{margin-top:1.6rem}.md-content--typeset h4{margin:1.6rem 0;font-size:1.6rem;font-weight:700;letter-spacing:-.01em}.md-content--typeset h5,.md-content--typeset h6{margin:1.6rem 0;color:rgba(0,0,0,.54);font-size:1.28rem;font-weight:700;letter-spacing:-.01em}.md-content--typeset h5{text-transform:uppercase}.md-content--typeset hr{margin:2.4rem 0;border-bottom:.1rem dotted rgba(0,0,0,.26)}.md-content--typeset a{color:#3f51b5}.md-content--typeset a,.md-content--typeset a:before{-webkit-transition:color .125s;transition:color .125s}.md-content--typeset a:active,.md-content--typeset a:hover{color:#536dfe}.md-content--typeset code{margin:0 .4rem;padding:.1rem 0;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-content--typeset pre{margin:2rem 0;padding:1rem 1.2rem;background:#f7f7f7;color:#37474f;font-size:85%;line-height:1.4;overflow-x:scroll}.md-content--typeset pre>code{font-size:inherit}.md-content--typeset kbd{display:inline-block;padding:.4rem .5rem .5rem;border:.1rem solid #ccc;border-radius:.3rem;border-bottom-color:#bbb;background-color:#fcfcfc;color:#555;font-size:85%;line-height:1rem;box-shadow:inset 0 -.1rem 0 #bbb;vertical-align:.1rem;word-break:break-word}.md-content--typeset small{color:rgba(0,0,0,.54)}.md-content--typeset sub,.md-content--typeset sup{margin-left:.1rem}.md-content--typeset blockquote{padding-left:1.2rem;border-left:.4rem solid rgba(0,0,0,.26);color:rgba(0,0,0,.54)}.md-content--typeset ul{list-style-type:disc}.md-content--typeset ol ol{list-style-type:lower-alpha}.md-content--typeset ol ol ol{list-style-type:lower-roman}.md-content--typeset ol,.md-content--typeset ul{margin-left:1rem;padding:0}.md-content--typeset ol li,.md-content--typeset ul li{margin-bottom:1rem;margin-left:2rem}.md-content--typeset ol li:last-child,.md-content--typeset ul li:last-child{margin-bottom:0}.md-content--typeset ol li ol,.md-content--typeset ol li ul,.md-content--typeset ul li ol,.md-content--typeset ul li ul{margin-bottom:1rem;margin-left:1rem;padding-top:1rem}html{height:100%}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;vertical-align:top}.md-flex__cell--shrink{width:1%}.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{display:inline-block;position:relative;margin:.4rem;padding:.8rem;-webkit-transition:opacity .25s;transition:opacity .25s;font-size:2.4rem;cursor:pointer;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-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{display:inline-block;margin:.4rem;padding:.8rem;-webkit-transition:background .25s;transition:background .25s;font-size:2.4rem;cursor:pointer}.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.2}.md-nav__title{margin:0;font-size:inherit;line-height:inherit}.md-nav--toc{border-left:.4rem solid #3f51b5}.md-nav__list{margin:0;padding:0;list-style:none}.md-nav__list .md-nav__list{margin-left:1.2rem}.md-nav__toggle~.md-nav__list{max-height:0;overflow:hidden}.md-nav__toggle:checked~.md-nav__list{max-height:100%}.md-nav__item{margin:.8rem 0 0;line-height:1.6rem}.md-nav__link{display:block;-webkit-transition:color .125s;transition:color .125s;text-overflow:ellipsis;overflow:hidden}.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-search{position:relative}.md-search__overlay{display:none}.md-search__inner{padding:.8rem .8rem 0}.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 .8rem 0 6.4rem;border-radius:.2rem}.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;-webkit-overflow-scrolling:touch}.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-sidebar__inner{padding:1.2rem}.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:2rem;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.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}.md-content--typeset .footnote{color:rgba(0,0,0,.54);font-size:80%}.md-content--typeset .footnote>ol{margin-left:0}.md-content--typeset .footnote>ol>li:hover .footnote-backref,.md-content--typeset .footnote>ol>li:target .footnote-backref{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.md-content--typeset .footnote>ol>li:hover .footnote-backref:hover,.md-content--typeset .footnote>ol>li:target .footnote-backref{color:#536dfe}.md-content--typeset .footnote-ref:before{position:absolute;margin-top:-8.4rem;padding-top:8.4rem;content:" ";pointer-events:none}.md-content--typeset .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}.md-content--typeset .footnote-backref:first-letter{font-size:0}.md-content--typeset .footnote-backref:after{content:"keyboard_return"}.md-content--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-content--typeset [id]:hover .headerlink,.md-content--typeset [id]:target .headerlink{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.md-content--typeset [id]:hover .headerlink:hover,.md-content--typeset [id]:target .headerlink{color:#536dfe}.md-content--typeset h1[id]:before{display:block;margin-top:-11rem;padding-top:11rem;content:" "}.md-content--typeset h2[id]:before{display:block;margin-top:-8.2rem;padding-top:8.2rem;content:" "}.md-content--typeset h3[id]:before{display:block;margin-top:-8.4rem;padding-top:8.4rem;content:" "}.md-content--typeset h4[id]:before{display:block;margin-top:-8.6rem;padding-top:8.6rem;content:" "}.md-content--typeset h5[id]:before,.md-content--typeset h6[id]:before{display:block;margin-top:-9rem;padding-top:9rem;content:" "}.md-search__suggest{background:#fff;border-radius:0 0 .3rem .3rem;color:#000;text-align:left;border-top:.1rem solid rgba(0,0,0,.07);display:none}.md-search__input:focus~.md-search__suggest{display:block}.md-search__input:focus{border-radius:.3rem .3rem 0 0}.md-icon--github:before{content:" ";display:block;background-image:url(../images/icons/github-white.svg);background-size:2.4rem 2.4rem;background-repeat:no-repeat;height:2.4rem}.md-header-nav__source{display:table;white-space:nowrap}@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-sidebar--primary{position:fixed;top:0;width:24.2em;height:100%;-webkit-transform:translate3d(-24.2em,0,0);transform:translate3d(-24.2em,0,0);-webkit-transition:-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1),-webkit-transform .25s cubic-bezier(.4,0,.2,1);background:#fff;z-index:3}.no-csstransforms3d .md-sidebar--primary{display:none}.md-toggle--drawer:checked~.md-container .md-sidebar--primary{-webkit-transform:translateZ(0);transform:translateZ(0)}.no-csstransforms3d .md-toggle--drawer:checked~.md-container .md-sidebar--primary{display:block}.md-sidebar--primary .md-sidebar__scrollwrap{margin:0}}@media only screen and (min-width:60em){.md-content{margin-right:24.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-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__inner{padding:.4rem}.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:hsla(0,0%,100%,.12);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%,.3)}.md-search__input:focus{width:40rem;background:#fff;color:rgba(0,0,0,.87)}.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:44.9375em){.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 .15s cubic-bezier(.1,.7,.1,1);transition:opacity .15s .15s,-webkit-transform .3s .15s cubic-bezier(.1,.7,.1,1);transition:transform .3s .15s cubic-bezier(.1,.7,.1,1),opacity .15s .15s;transition:transform .3s .15s cubic-bezier(.1,.7,.1,1),opacity .15s .15s,-webkit-transform .3s .15s cubic-bezier(.1,.7,.1,1)}.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: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 5cff6d0f3..90da3ee15 100644 --- a/material/base.html +++ b/material/base.html @@ -20,14 +20,14 @@ {% endif %} - + - + + {% for path in extra_css %} {% endfor %} - @@ -36,7 +36,7 @@ {% include "header.html" %}

    -
    +
    {% set h1 = "\x3ch1 id=" in content %} {% if nav %} {% include "nav.html" %} @@ -46,6 +46,7 @@ {% endif %}
    +
    Edit on GitHub
    {{ content }}
    @@ -72,7 +73,7 @@ var base_url = '{{ base_url }}'; var repo_url = '{{ repo_url }}'; - + {% for path in extra_javascript %} {% endfor %} diff --git a/material/footer.html b/material/footer.html index 1fa656092..f046abb2a 100644 --- a/material/footer.html +++ b/material/footer.html @@ -1,7 +1,7 @@
    \ No newline at end of file + diff --git a/material/header.html b/material/partials/header.html similarity index 52% rename from material/header.html rename to material/partials/header.html index 41a4bb342..e0d409fbb 100644 --- a/material/header.html +++ b/material/partials/header.html @@ -9,31 +9,9 @@ {{ page_title | default(site_name, true) }}
    -
    +
    -
    -
    -
    - - -
    - FOO
    - FOO
    - FOO
    - FOO
    - FOO
    - FOO
    - FOO
    - FOO
    - FOO
    - FOO
    - FOO
    - FOO
    - FOO
    - FOO
    -
    -
    -
    + {% include "partials/search.html" %}
    {% if "github." in repo_url %} {% set platform = "md-source--github" %} @@ -47,13 +25,11 @@
    - - \ No newline at end of file + diff --git a/material/partials/nav-item.html b/material/partials/nav-item.html new file mode 100644 index 000000000..ab2b4cb58 --- /dev/null +++ b/material/partials/nav-item.html @@ -0,0 +1,50 @@ +{% if nav_item.children or nav_item == current_page %} +
  • + {% if nav_item == current_page %} + {% set path = "toc" %} + {% endif %} + {% if nav_item.active and not nav_item == current_page %} + + {% else %} + + {% endif %} + {% if nav_item == current_page %} + + + {{ nav_item.title }} + + {% include "partials/toc.html" %} + {% else %} + + + {% endif %} +
  • +{% else %} +
  • + {% if nav_item.active %} + + {{ nav_item.title }} + + {% else %} + + {{ nav_item.title }} + + {% endif %} +
  • +{% endif %} diff --git a/material/partials/nav.html b/material/partials/nav.html new file mode 100644 index 000000000..9ee94a692 --- /dev/null +++ b/material/partials/nav.html @@ -0,0 +1,9 @@ + diff --git a/material/partials/search.html b/material/partials/search.html new file mode 100644 index 000000000..600cf1b5b --- /dev/null +++ b/material/partials/search.html @@ -0,0 +1,20 @@ + \ No newline at end of file diff --git a/material/partials/toc-item.html b/material/partials/toc-item.html new file mode 100644 index 000000000..3b4f4d76c --- /dev/null +++ b/material/partials/toc-item.html @@ -0,0 +1,14 @@ +
  • + + {{ toc_item.title }} + + {% if toc_item.children %} + + {% endif %} +
  • diff --git a/material/partials/toc.html b/material/partials/toc.html new file mode 100644 index 000000000..ba8c68c30 --- /dev/null +++ b/material/partials/toc.html @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/material/search.html b/material/search.html deleted file mode 100644 index e69de29bb..000000000 diff --git a/material/toc-item.html b/material/toc-item.html deleted file mode 100644 index 36abc89c0..000000000 --- a/material/toc-item.html +++ /dev/null @@ -1,12 +0,0 @@ -
  • - - {{ toc_item.title }} - - {% if toc_item.children %} -
      - {% for toc_item in toc_item.children %} - {% include "toc-item.html" %} - {% endfor %} -
    - {% endif %} -
  • \ No newline at end of file diff --git a/material/toc.html b/material/toc.html deleted file mode 100644 index 560682ecb..000000000 --- a/material/toc.html +++ /dev/null @@ -1,17 +0,0 @@ -
    -
    - -
    -
    \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 289d1c3ad..7ea561816 100755 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -25,7 +25,7 @@ site_author: Martin Donath site_url: http://squidfunk.github.io/mkdocs-material/ # Repository -repo_name: GitHub +repo_name: squidfunk/mkdocs-material repo_url: https://github.com/squidfunk/mkdocs-material # Copyright @@ -33,7 +33,6 @@ copyright: 'Copyright © 2016 Martin Donath' # Documentation and theme theme_dir: material -theme: amelia # Options extra: @@ -48,11 +47,11 @@ extra: # Extensions markdown_extensions: - - admonition - - codehilite - - footnotes - - meta - - toc: + - markdown.extensions.admonition + - markdown.extensions.codehilite + - markdown.extensions.footnotes + - markdown.extensions.meta + - markdown.extensions.toc: permalink: '¶' # Page tree @@ -65,6 +64,10 @@ pages: - Footnotes: extensions/footnotes.md - Permalinks: extensions/permalinks.md - Meta: extensions/meta.md + - Foo: + - Test: + - Permalinks: extensions/permalinks.md + - Meta: index.md - Specimen: specimen.md - Customization: customization.md - License: license.md \ No newline at end of file diff --git a/src/404.html b/src/404.html index 2fd9f9570..9ebf68294 100644 --- a/src/404.html +++ b/src/404.html @@ -1 +1,28 @@ -TBD \ No newline at end of file + + +{% extends "base.html" %} + + +{% block content %} +

    404 - Not found

    +{% endblock %} \ No newline at end of file diff --git a/src/assets/images/icons/bitbucket-black.svg b/src/assets/images/icons/bitbucket-black.svg index 322d76ed9..0ab16772c 100644 --- a/src/assets/images/icons/bitbucket-black.svg +++ b/src/assets/images/icons/bitbucket-black.svg @@ -1,20 +1,20 @@ + 1.5q-9.75-4.25-13.375-14.5t-0.125-20.5 13-14.5q9-4.5 18.125-3t16 8.875 + 6.875 16.875zM231.5 209.5q-3.5-26.75-28.25-41t-49.25-3.25q-15.75 + 7-25.125 22.125t-8.625 32.375q1 22.75 19.375 38.75t41.375 14q22.75-2 + 38-21t12.5-42zM291.25 + 74q-5-6.75-14-11.125t-14.5-5.5-17.75-3.125q-72.75-11.75-141.5 0.5-10.75 + 1.75-16.5 3t-13.75 5.5-12.5 10.75q7.5 7 19 11.375t18.375 5.5 21.875 + 2.875q57 7.25 112 0.25 15.75-2 22.375-3t18.125-5.375 18.75-11.625zM305.5 + 332.75q-2 6.5-3.875 19.125t-3.5 21-7.125 17.5-14.5 14.125q-21.5 + 12-47.375 17.875t-50.5 5.5-50.375-4.625q-11.5-2-20.375-4.5t-19.125-6.75-18.25-10.875-13-15.375q-6.25-24-14.25-73l1.5-4 + 4.5-2.25q55.75 37 126.625 37t126.875-37q5.25 1.5 6 5.75t-1.25 11.25-2 + 9.25zM350.75 92.5q-6.5 41.75-27.75 163.75-1.25 7.5-6.75 14t-10.875 + 10-13.625 7.75q-63 31.5-152.5 + 22-62-6.75-98.5-34.75-3.75-3-6.375-6.625t-4.25-8.75-2.25-8.5-1.5-9.875-1.375-8.75q-2.25-12.5-6.625-37.5t-7-40.375-5.875-36.875-5.5-39.5q0.75-6.5 + 4.375-12.125t7.875-9.375 11.25-7.5 11.5-5.625 12-4.625q31.25-11.5 + 78.25-16 94.75-9.25 169 12.5 38.75 11.5 53.75 30.5 4 5 4.125 + 12.75t-1.375 13.5z" /> diff --git a/src/assets/images/icons/bitbucket-white.svg b/src/assets/images/icons/bitbucket-white.svg index 8a411881a..1a8210a4a 100644 --- a/src/assets/images/icons/bitbucket-white.svg +++ b/src/assets/images/icons/bitbucket-white.svg @@ -1,20 +1,20 @@ + 1.5q-9.75-4.25-13.375-14.5t-0.125-20.5 13-14.5q9-4.5 18.125-3t16 8.875 + 6.875 16.875zM231.5 209.5q-3.5-26.75-28.25-41t-49.25-3.25q-15.75 + 7-25.125 22.125t-8.625 32.375q1 22.75 19.375 38.75t41.375 14q22.75-2 + 38-21t12.5-42zM291.25 + 74q-5-6.75-14-11.125t-14.5-5.5-17.75-3.125q-72.75-11.75-141.5 0.5-10.75 + 1.75-16.5 3t-13.75 5.5-12.5 10.75q7.5 7 19 11.375t18.375 5.5 21.875 + 2.875q57 7.25 112 0.25 15.75-2 22.375-3t18.125-5.375 18.75-11.625zM305.5 + 332.75q-2 6.5-3.875 19.125t-3.5 21-7.125 17.5-14.5 14.125q-21.5 + 12-47.375 17.875t-50.5 5.5-50.375-4.625q-11.5-2-20.375-4.5t-19.125-6.75-18.25-10.875-13-15.375q-6.25-24-14.25-73l1.5-4 + 4.5-2.25q55.75 37 126.625 37t126.875-37q5.25 1.5 6 5.75t-1.25 11.25-2 + 9.25zM350.75 92.5q-6.5 41.75-27.75 163.75-1.25 7.5-6.75 14t-10.875 + 10-13.625 7.75q-63 31.5-152.5 + 22-62-6.75-98.5-34.75-3.75-3-6.375-6.625t-4.25-8.75-2.25-8.5-1.5-9.875-1.375-8.75q-2.25-12.5-6.625-37.5t-7-40.375-5.875-36.875-5.5-39.5q0.75-6.5 + 4.375-12.125t7.875-9.375 11.25-7.5 11.5-5.625 12-4.625q31.25-11.5 + 78.25-16 94.75-9.25 169 12.5 38.75 11.5 53.75 30.5 4 5 4.125 + 12.75t-1.375 13.5z" fill="white" /> diff --git a/src/assets/images/icons/github-black.svg b/src/assets/images/icons/github-black.svg index c1c87085a..843e3ac14 100644 --- a/src/assets/images/icons/github-black.svg +++ b/src/assets/images/icons/github-black.svg @@ -1,25 +1,18 @@ - - + + diff --git a/src/assets/images/icons/github-white.svg b/src/assets/images/icons/github-white.svg index 544a0fc6a..b475cdf2c 100644 --- a/src/assets/images/icons/github-white.svg +++ b/src/assets/images/icons/github-white.svg @@ -1,25 +1,18 @@ - - + + diff --git a/src/assets/javascripts/application.js b/src/assets/javascripts/application.js index 50c3bfc94..95e36f5de 100644 --- a/src/assets/javascripts/application.js +++ b/src/assets/javascripts/application.js @@ -118,7 +118,44 @@ document.addEventListener('DOMContentLoaded', function() { } }); +// setTimeout(function() { + fetch('https://api.github.com/repos/squidfunk/mkdocs-material') + .then(function(response) { + return response.json() + }).then(function(data) { + var stars = data.stargazers_count; + var forks = data.forks_count; + // store in session!!! + var list = document.querySelector('.md-source__facts'); + // list.innerHTML += '
  • ' + stars + ' Stars
  • \n'; + // list.innerHTML += '
  • ' + forks + ' Forks
  • \n'; + + var li = document.createElement('li'); + li.className = 'md-source__fact md-source__fact--hidden'; + li.innerText = stars + ' Stars'; + list.appendChild(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); + + setTimeout(function(li) { + li.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) + }); +// }, 1000); }); \ No newline at end of file diff --git a/src/assets/javascripts/components/sidebar.js b/src/assets/javascripts/components/sidebar.js index 560ee35c5..709eec72c 100644 --- a/src/assets/javascripts/components/sidebar.js +++ b/src/assets/javascripts/components/sidebar.js @@ -92,7 +92,7 @@ class Sidebar { */ reset() { this.el_.classList.remove('md-js__sidebar--locked'); - this.el_.style.height_ = ''; + this.el_.style.height = ''; /* Reset parameters */ this.height_ = 0; diff --git a/src/assets/stylesheets/_config.scss b/src/assets/stylesheets/_config.scss index b8f24a6d5..21160a4ce 100644 --- a/src/assets/stylesheets/_config.scss +++ b/src/assets/stylesheets/_config.scss @@ -54,17 +54,34 @@ $break-devices: ( // ---------------------------------------------------------------------------- // Primary and accent colors -$md-color-primary: $clr-indigo-500; -$md-color-accent: $clr-indigo-a200; +$md-color-primary: $clr-indigo-500; +$md-color-accent: $clr-indigo-a200; // Shades of black -$md-color-black: hsla(0, 0%, 0%, 0.87); -$md-color-black--light: hsla(0, 0%, 0%, 0.54); -$md-color-black--lighter: hsla(0, 0%, 0%, 0.26); -$md-color-black--lightest: hsla(0, 0%, 0%, 0.07); +$md-color-black: hsla(0, 0%, 0%, 0.87); +$md-color-black--light: hsla(0, 0%, 0%, 0.54); +$md-color-black--lighter: hsla(0, 0%, 0%, 0.26); +$md-color-black--lightest: hsla(0, 0%, 0%, 0.07); // Shades of white -$md-color-white: hsla(0, 0%, 100%, 1.00); -$md-color-white--light: hsla(0, 0%, 100%, 0.70); -$md-color-white--lighter: hsla(0, 0%, 100%, 0.30); -$md-color-white--lightest: hsla(0, 0%, 100%, 0.12); +$md-color-white: hsla(0, 0%, 100%, 1.00); +$md-color-white--light: hsla(0, 0%, 100%, 0.70); +$md-color-white--lighter: hsla(0, 0%, 100%, 0.30); +$md-color-white--lightest: hsla(0, 0%, 100%, 0.12); + +// ---------------------------------------------------------------------------- +// Sizing and spacing +// ---------------------------------------------------------------------------- + +// Icons +$md-icon-size: $ms-base * 1.5; +$md-icon-padding: $ms-base * 0.5; +$md-icon-margin: $ms-base * 0.25; + +// Code blocks +$md-code-background: #F7F7F7; +$md-code-color: #37474F; + +// Keystrokes +$md-keyboard-background: #FCFCFC; +$md-keyboard-color: #555555; diff --git a/src/assets/stylesheets/_shame.scss b/src/assets/stylesheets/_shame.scss index b550744a4..a4e946850 100644 --- a/src/assets/stylesheets/_shame.scss +++ b/src/assets/stylesheets/_shame.scss @@ -77,7 +77,27 @@ } .md-search-term { + position: relative; + padding: 0 0.8rem 0 4.8rem; + line-height: 4.0rem; // don't use line height???? + font-size: 1.6rem; + &::before { + @extend %md-icon; + + position: absolute; + + content: "access_time"; + font-size: 2.4rem; + line-height: 4.0rem; // this sucks... + left: 1.2rem; + color: $md-color-black--lighter; + } + transition: background .25s; + cursor: pointer; + &:hover { + background: mix($md-color-white, $md-color-primary, 90%); + } } .checklist { @@ -234,3 +254,48 @@ mark { padding: 0 16px; } +// [tablet -]: Adjust spacing on screens +@include break-to-device(tablet) { + .md-sidebar--primary { + .md-nav--secondary .md-nav { + position: static; // TODO DODODODODO + + .md-nav__item { + padding-left: 1.2rem; + } + } + // second level list! + .md-nav--secondary .md-nav__list .md-nav__list { + position: static; + pointer-events: initial; //!!! + } + .md-nav__item { + // transition: background .25s; + // + // & :hover { + // background: lighten($md-color-primary, 50%); + // } + } + } +} + +// .md-nav--secondary > .md-nav__title { +// // -webkit-overflow-scrolling: touch; +// @include z-depth(1); +// } +// .md-nav__toggle:checked ~ .md-nav > .md-nav__list { +// +// > :first-child { +// border-top: 0; +// } +// +// background: +// linear-gradient(white 10%, rgba(255,255,255,0)), // cover +// linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0) 60%); // shadow +// background-repeat: no-repeat; +// background-color: white; +// background-size: 100% 20px, 100% 4px; +// +// /* Opera doesn't support this in the shorthand */ +// background-attachment: local, scroll; +// } \ No newline at end of file diff --git a/src/assets/stylesheets/base/_icons.scss b/src/assets/stylesheets/base/_icons.scss index 989057186..a987234ee 100644 --- a/src/assets/stylesheets/base/_icons.scss +++ b/src/assets/stylesheets/base/_icons.scss @@ -24,9 +24,8 @@ // Icon set // ---------------------------------------------------------------------------- -// Base icon class -%md-icon, -.md-icon { +// Icon placeholders +%md-icon { font-family: "Material Icons"; font-style: normal; font-variant: normal; @@ -41,17 +40,31 @@ // Enable font-smoothing in Webkit and FF -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -} -// Build representational classes -@each $ligature, $name in ( - "arrow_back": "back", - "arrow_forward": "forward", - "close": "close", - "menu": "menu", - "search": "search" -) { - .md-icon--#{$name}::before { - content: $ligature; + // Icon rendered as button + &__button { + display: inline-block; + margin: $md-icon-margin; + padding: $md-icon-padding; + font-size: $md-icon-size; + cursor: pointer; + } +} + +// Representational classes +.md-icon { + @extend %md-icon; + + // Build representational classes + @each $ligature, $name in ( + "arrow_back": "back", + "arrow_forward": "forward", + "close": "close", + "menu": "menu", + "search": "search" + ) { + &--#{$name}::before { + content: $ligature; + } } } diff --git a/src/assets/stylesheets/base/_reset.scss b/src/assets/stylesheets/base/_reset.scss index 4a0f5f3ba..8af839b34 100644 --- a/src/assets/stylesheets/base/_reset.scss +++ b/src/assets/stylesheets/base/_reset.scss @@ -42,9 +42,7 @@ html { } // Prevent adjustments of font size after orientation changes in IE and iOS -// and set base font-size to 10px for simple rem calculations. html { - font-size: 62.5%; text-size-adjust: none; } diff --git a/src/assets/stylesheets/base/_typeset.scss b/src/assets/stylesheets/base/_typeset.scss index 249bc5c5e..2c5d595e6 100644 --- a/src/assets/stylesheets/base/_typeset.scss +++ b/src/assets/stylesheets/base/_typeset.scss @@ -25,8 +25,7 @@ // ---------------------------------------------------------------------------- // Default fonts -body, -kbd { +body { font-family: "Roboto", Helvetica, Arial, sans-serif; font-weight: 400; font-feature-settings: "kern", "onum", "liga"; @@ -43,9 +42,10 @@ kbd { // Proportionally spaced fonts pre, -code { +code, +kbd { font-family: "Roboto Mono", "Courier New", Courier, monospace; - font-weight: 500; + font-weight: 400; font-feature-settings: "kern", "onum", "liga"; // Use system fonts, if browser doesn't support webfonts @@ -60,6 +60,7 @@ code { // Content that is typeset .md-content--typeset { + color: $md-color-black; font-size: ms(0); line-height: 1.6; @@ -68,7 +69,7 @@ code { ul, ol, blockquote { - margin: 1.25em 0; + margin: 1.0em 0; } // 1st level headline @@ -155,23 +156,34 @@ code { margin: 0 0.4rem; padding: 0.1rem 0; border-radius: 0.2rem; - background: #F7F7F7; - color: #37474F; + background: $md-code-background; + color: $md-code-color; font-size: 85%; - box-shadow: 0.4rem 0 0 #F7F7F7, - -0.4rem 0 0 #F7F7F7; + box-shadow: 0.4rem 0 0 $md-code-background, + -0.4rem 0 0 $md-code-background; word-break: break-word; - box-decoration-break: clone; } + // Disable containing block inside headlines + h1 code, + h2 code, + h3 code, + h4 code, + h5 code, + h6 code { + margin: 0; + background: transparent; + box-shadow: none; + } + // Formatted code blocks pre { - margin: 2.0rem 0; + margin: 1.0em 0; padding: 1.0rem 1.2rem; border-radius: 0.2rem; - background: #F7F7F7; - color: #37474F; + background: $md-code-background; + color: $md-code-color; font-size: 85%; line-height: 1.4; overflow-x: scroll; @@ -182,25 +194,26 @@ code { } } - // Keyboard tags + // Keystrokes kbd { display: inline-block; padding: 0.4rem 0.5rem 0.5rem; - border: px2rem(1px) solid #CCCCCC; + border: px2rem(1px) solid darken($md-keyboard-background, 20%); border-radius: px2rem(3px); - border-bottom-color: #BBBBBB; - background-color: #FCFCFC; - color: #555555; + border-bottom-color: darken($md-keyboard-background, 25%); + background-color: $md-keyboard-background; + color: $md-keyboard-color; font-size: 85%; line-height: 1.0rem; - box-shadow: 0 #{-(px2rem(1px))} 0 #BBBBBB inset; + box-shadow: 0 #{-(px2rem(1px))} 0 + darken($md-keyboard-background, 30%) inset; vertical-align: 0.1rem; word-break: break-word; } // Smaller text small { - color: $md-color-black--light; + opacity: 0.75; } // Superscript and subscript @@ -239,9 +252,15 @@ code { // List elements li { - margin-bottom: 1.0rem; + margin-bottom: 0.5em; margin-left: 2.0rem; + // Decrease vertical spacing + p, + blockquote { + margin: 0.5em 0; + } + // Remove margin on last element &:last-child { margin-bottom: 0; diff --git a/src/assets/stylesheets/extensions/_admonition.scss b/src/assets/stylesheets/extensions/_admonition.scss index 73b988831..b3dbf8aaf 100644 --- a/src/assets/stylesheets/extensions/_admonition.scss +++ b/src/assets/stylesheets/extensions/_admonition.scss @@ -36,7 +36,7 @@ // Icon &::before { display: block; - position: absolute; + position: absolute; // TODO: inherit icon! top: 0.2rem; left: -2.6rem; float: left; @@ -53,7 +53,7 @@ color: $clr-blue-a400; font-size: ms(-1); font-weight: 700; - line-height: 2.0rem; + line-height: 2; text-transform: uppercase; // Ensure smaller spacing to next element @@ -79,6 +79,7 @@ // Build representational classes @each $names, $appearance in ( + summary tldr: $clr-light-blue-a400 "subject", tip idea: $clr-teal-a700 "whatshot", success check done: $clr-green-a400 "done", warning warn: $clr-orange-a400 "warning", diff --git a/src/assets/stylesheets/extensions/_footnotes.scss b/src/assets/stylesheets/extensions/_footnotes.scss index 603e735e4..a13e028ba 100644 --- a/src/assets/stylesheets/extensions/_footnotes.scss +++ b/src/assets/stylesheets/extensions/_footnotes.scss @@ -24,76 +24,72 @@ // Footnotes extension // ---------------------------------------------------------------------------- -// Scoped in typesetted content for greater specificity -.md-content--typeset { +// Footnote +.footnote { + color: $md-color-black--light; + font-size: 80%; - // Footnote - .footnote { - color: $md-color-black--light; - font-size: 80%; + // Remove additional spacing on footnotes + ol { + margin-left: 0; + } - // Remove additional spacing on footnotes - > ol { - margin-left: 0; + // Single footnote + li { - // Single footnote - > li { + // TODO: this doesn't work entirely + // &::before { + // display: block; + // content: ""; + // padding-top: (5.6rem + 2.4rem + 0.4rem); + // margin-top: -(5.6rem + 2.4rem + 0.4rem); + // } - // TODO: this doesn't work entirely - // &::before { - // display: block; - // content: " "; - // padding-top: (5.6rem + 2.4rem + 0.4rem); - // margin-top: -(5.6rem + 2.4rem + 0.4rem); - // } - - // Make back references visible on hover - &:hover .footnote-backref, - &:target .footnote-backref { - transform: translate3d(0, 0, 0); - opacity: 1; - } - - // Active or targeted back reference - &:hover .footnote-backref:hover, - &:target .footnote-backref { - color: $md-color-accent; - } - } + // Make back references visible on hover + &:hover .footnote-backref, + &:target .footnote-backref { + transform: translate3d(0, 0, 0); + opacity: 1; } - // Correct anchor offset - &-ref::before { - position: absolute; - margin-top: -(5.6rem + 2.4rem + 0.4rem); - padding-top: (5.6rem + 2.4rem + 0.4rem); - content: " "; - pointer-events: none; + // Active or targeted back reference + &:hover .footnote-backref:hover, + &:target .footnote-backref { + color: $md-color-accent; + } + } + + // Correct anchor offset + &-ref::before { + position: absolute; + margin-top: -(5.6rem + 2.4rem); + padding-top: (5.6rem + 2.4rem); + content: ""; + pointer-events: none; + } + + // Make back reference text transparent for icon + &-backref { + @extend %md-icon; + + position: absolute; + transform: translate3d(0.5rem, 0, 0); + transition: transform 0.25s 0.125s, + color 0.25s, + opacity 0.125s 0.125s; + color: $md-color-black--lighter; + font-size: 2.0rem; + opacity: 0; + vertical-align: middle; + + // Hack: remove Unicode arrow for icon + &::first-letter { + font-size: 0; } - // Make back reference text transparent for icon - &-backref { - @extend %md-icon; - - position: absolute; - transform: translate3d(0.5rem, 0, 0); - transition: transform 0.25s 0.125s, - color 0.25s, - opacity 0.125s 0.125s; - color: $md-color-black--lighter; - font-size: 2.0rem; - opacity: 0; - vertical-align: middle; - - // Hack: remove Unicode arrow for icon - &::first-letter { - font-size: 0; - } - - // Back reference icon - &::after { - content: "keyboard_return"; - } + // Back reference icon + &::after { + content: "keyboard_return"; } } } diff --git a/src/assets/stylesheets/extensions/_permalinks.scss b/src/assets/stylesheets/extensions/_permalinks.scss index 4d1721223..bd4c8a561 100644 --- a/src/assets/stylesheets/extensions/_permalinks.scss +++ b/src/assets/stylesheets/extensions/_permalinks.scss @@ -69,7 +69,7 @@ display: block; margin-top: -(5.6rem + 2.4rem + $delta); padding-top: (5.6rem + 2.4rem + $delta); - content: " "; + content: ""; } } } diff --git a/src/assets/stylesheets/layout/_base.scss b/src/assets/stylesheets/layout/_base.scss index 0be1af0f4..9fa3c6acf 100644 --- a/src/assets/stylesheets/layout/_base.scss +++ b/src/assets/stylesheets/layout/_base.scss @@ -24,9 +24,11 @@ // Grid // ---------------------------------------------------------------------------- -// Stretch container to viewport +// Stretch container to viewport and set base font-size to 10px for simple +// calculations base on relative ems (rems). html { height: 100%; + font-size: 62.5%; // [screen medium +] Set base font-size to 11px @include break-from-device(screen medium) { @@ -35,7 +37,7 @@ html { // [screen large +] Set base font-size to 12px @include break-from-device(screen large) { - font-size: 75.00%; + font-size: 75%; } } @@ -76,9 +78,9 @@ hr { .md-main { margin-top: 5.6rem; - // Bottom spacing to account for footer + // Bottom spacing to account for header and footer &__inner { - margin-top: 3.0rem; + margin-top: 2.4rem + 0.6rem; margin-bottom: 9.2rem; overflow: auto; } @@ -106,8 +108,8 @@ hr { opacity: 0; z-index: 2; - // [tablet landscape -]: Trigger overlay - @include break-to-device(tablet landscape) { + // [tablet -]: Trigger overlay + @include break-to-device(tablet) { // Expanded drawer .md-toggle--drawer:checked ~ & { diff --git a/src/assets/stylesheets/layout/_content.scss b/src/assets/stylesheets/layout/_content.scss index 8fb09753f..52d698ca5 100644 --- a/src/assets/stylesheets/layout/_content.scss +++ b/src/assets/stylesheets/layout/_content.scss @@ -32,8 +32,8 @@ margin-right: 24.2rem; } - // [screen small +]: Add space for table of contents - @include break-from-device(screen small) { + // [screen +]: Add space for table of contents + @include break-from-device(screen) { margin-left: 24.2rem; } @@ -44,8 +44,8 @@ // Hack: this is necessary for floating the edit button overflow: auto; - // [screen small +]: Add space for table of contents - @include break-from-device(screen small) { + // [screen +]: Increase spacing + @include break-from-device(screen) { margin: 2.4rem; } } diff --git a/src/assets/stylesheets/layout/_footer.scss b/src/assets/stylesheets/layout/_footer.scss index 70bda4d0a..dc852d715 100644 --- a/src/assets/stylesheets/layout/_footer.scss +++ b/src/assets/stylesheets/layout/_footer.scss @@ -83,12 +83,9 @@ // Link icon &__icon { - display: inline-block; - margin: 0.4rem; - padding: 0.8rem; + @extend %md-icon__button; + transition: background 0.25s; - font-size: 2.4rem; - cursor: pointer; } // Link title diff --git a/src/assets/stylesheets/layout/_header.scss b/src/assets/stylesheets/layout/_header.scss index 4d211bd74..a6fa776de 100644 --- a/src/assets/stylesheets/layout/_header.scss +++ b/src/assets/stylesheets/layout/_header.scss @@ -44,13 +44,10 @@ // Header icon &__icon { - display: inline-block; + @extend %md-icon__button; + position: relative; - margin: 0.4rem; - padding: 0.8rem; transition: opacity 0.25s; - font-size: 2.4rem; - cursor: pointer; z-index: 1; // Hovered icon diff --git a/src/assets/stylesheets/layout/_nav.scss b/src/assets/stylesheets/layout/_nav.scss index 0f3a4df22..d6b3e1d5e 100644 --- a/src/assets/stylesheets/layout/_nav.scss +++ b/src/assets/stylesheets/layout/_nav.scss @@ -29,16 +29,27 @@ font-size: ms(-1); line-height: 1.2; - // Title - &__title { - margin: 0; - font-size: inherit; - line-height: inherit; + // Table of contents + &--secondary { + border-left: px2rem(4px) solid $md-color-primary; } - // Table of contents - &--toc { - border-left: px2rem(4px) solid $md-color-primary; + // Title + &__title { + display: block; + margin: 0; + padding: 1.2rem 1.2rem 0; + font-size: inherit; + font-weight: 700; + line-height: inherit; + + // Icon, hidden by default + &::before { + @extend %md-icon, %md-icon__button; + + display: none; + content: "arrow_back"; + } } // List of items @@ -46,28 +57,27 @@ margin: 0; padding: 0; list-style: none; - - // 2nd+ level list - & & { - margin-left: 1.2rem; - } - - // Hide list by default - .md-nav__toggle ~ & { - max-height: 0; - overflow: hidden; - } - - // Expand list, if toggle is checked - .md-nav__toggle:checked ~ & { - max-height: 100%; - } } // List item &__item { - margin: 0.8rem 0 0; - line-height: 1.6rem; + padding: 0.625em 1.2rem 0; + line-height: 1.3; + + // Add bottom spacing to last item + &:last-child { + padding-bottom: 0.625em; + } + + // 2nd+ level items + & & { + padding-right: 0; + + // Remove bottom spacing for nested items + &:last-child { + padding-bottom: 0; + } + } } // Link inside item @@ -75,8 +85,34 @@ display: block; transition: color 0.125s; text-overflow: ellipsis; + cursor: pointer; overflow: hidden; + // Icon + &::after { + @extend %md-icon; + + // Item contains a nested list + .md-nav__item--nested > & { + content: "expand_more"; + } + } + + // Hide link to table of contents by default + &[for="toc"] { + display: none; + + // Hide table of contents by default + html & ~ .md-nav { + display: none; + } + + // Hide icon for current item + + .md-nav__link::after { + display: none; + } + } + // Marked item &--marked { color: $md-color-black--light; @@ -89,4 +125,187 @@ color: $md-color-accent; } } + + // [tablet -]: Layered navigation + @include break-to-device(tablet) { + + // Stretch primary navigation to drawer + &--primary, + &--primary .md-nav { + display: flex; + position: absolute; + top: 0; + right: 0; + left: 0; + flex-direction: column; + width: auto; + height: 100%; + z-index: 1; + } + + // Adjust styles for primary navigation + &--primary { + background: $md-color-white; + + // Move subsequent navigations off + .md-nav__toggle ~ .md-nav { + @include z-depth(4); + + left: 0.4rem; + background: $md-color-white; + } + + // Title + .md-nav__title { + position: relative; + padding: 0.4rem 1.6rem 0.4rem 5.6rem; + background: $md-color-black--lightest; + color: $md-color-black--light; + font-size: 1.8rem; + font-weight: 400; + line-height: 4.8rem; + text-overflow: ellipsis; + white-space: nowrap; + cursor: pointer; + overflow: hidden; + + // Icon + &::before { + display: block; + position: absolute; + left: 0.4rem; + width: 4.0rem; + height: 4.0rem; + color: $md-color-black--light; + } + } + + // List of items + .md-nav__list { + flex: 1; + overflow-y: scroll; + } + + // List item + .md-nav__item { + padding: 0; + border-top: 0.1rem solid $md-color-black--lightest; + font-size: 1.6rem; + } + + // Link inside item + .md-nav__link { + position: relative; + padding: 1.6rem; + + // Rotate icon + &::after { + position: absolute; + right: 1.2rem; + transform: rotate(-90deg); + color: $md-color-black--light; + font-size: 2.4rem; + line-height: 2.0rem; + } + } + } + + // Hide nested navigation by default + .md-nav__toggle ~ & { + display: none; + + // Animate appearance, if browser supports 3D transforms + .csstransforms3d & { + display: block; + transform: translate3d(100%, 0, 0); + transition: transform 0.25s cubic-bezier(0.8, 0.0, 0.6, 1.0), + opacity 0.125s 0.05s; + opacity: 0; + } + } + + // Expand nested navigation, if toggle is checked + .md-nav__toggle:checked ~ & { + display: block; + + // Animate appearance, if browser supports 3D transforms + .csstransforms3d & { + transform: translate3d(0, 0, 0); + transition: transform 0.25s cubic-bezier(0.4, 0.0, 0.2, 1.0), + opacity 0.125s 0.125s; + opacity: 1; + } + } + } + + // [tablet portrait -]: Show table of contents in drawer + @include break-to-device(tablet portrait) { + + // Remove border on secondary navigation + &--secondary { + border-left: 0; + } + + // Show link to table of contents + &__link[for="toc"] { + display: block; + + // Unrotate icon for table of contents + &::after { + transform: none; + content: "toc"; + } + + // Hide link to current item + + .md-nav__link { + display: none; + } + + // Show table of contents + html & ~ .md-nav { + display: flex; + } + } + } + + // [screen +]: Tree-like navigation + @include break-from-device(screen) { + + // Hide nested navigation by default + .md-nav__toggle ~ & { + max-height: 0; + overflow: hidden; + } + + // Expand nested navigation, if toggle is checked + .md-nav__toggle:checked ~ & { + max-height: 100%; + } + + // Title + &__title { + + // Hide titles for nested navigation + & + .md-nav__list & { + display: none; + } + } + + // Link inside item + &__link { + + // Item contains a nested list + .md-nav__item--nested > &::after { + display: inline-block; + transform-origin: 0.5em 0.475em; + transition: transform 0.25s; + vertical-align: -0.125em; + } + + // Rotate icon for expanded lists + .md-nav__item--nested .md-nav__toggle:checked ~ &::after { + transform: rotate(180deg); + } + } + } } diff --git a/src/assets/stylesheets/layout/_search.scss b/src/assets/stylesheets/layout/_search.scss index 4d9ea6749..12167d732 100644 --- a/src/assets/stylesheets/layout/_search.scss +++ b/src/assets/stylesheets/layout/_search.scss @@ -26,7 +26,14 @@ // Application search .md-search { - position: relative; + // position: relative; + padding: 0.8rem 0.8rem 0; + + // [tablet +]: Header-embedded search + @include break-from-device(tablet) { + padding: 0.4rem; + padding-right: 3.2rem; + } // Search overlay &__overlay { @@ -60,17 +67,6 @@ } } - // Inner wrapper - &__inner { - padding: 0.8rem 0.8rem 0; - - // [tablet +]: Header-embedded search - @include break-from-device(tablet) { - padding: 0.4rem; - padding-right: 3.2rem; - } - } - // Search form &__form { position: relative; @@ -86,10 +82,10 @@ // Icon &__icon { position: absolute; - top: 0.8rem; - left: 1.2rem; + top: $md-icon-padding; + left: $md-icon-padding + $md-icon-margin; transition: color 0.25s; - font-size: 2.4rem; + font-size: $md-icon-size; cursor: pointer; // [mobile -]: Use back arrow as search icon @@ -105,7 +101,7 @@ // Search field &__input { - padding: 0 0.8rem 0 6.4rem; + padding: 0 1.6rem 0 6.4rem; border-radius: px2rem(2px); text-overflow: ellipsis; diff --git a/src/assets/stylesheets/layout/_sidebar.scss b/src/assets/stylesheets/layout/_sidebar.scss index 8a21f9240..8bd2cab17 100644 --- a/src/assets/stylesheets/layout/_sidebar.scss +++ b/src/assets/stylesheets/layout/_sidebar.scss @@ -37,19 +37,20 @@ top: 5.6rem; } - // [tablet landscape -]: Convert navigation to drawer - @include break-to-device(tablet landscape) { + // [tablet -]: Convert navigation to drawer + @include break-to-device(tablet) { // Render primary sidebar as a slideout container &--primary { position: fixed; top: 0; - width: 24.2em; + left: -24.2rem; + width: 24.2rem; height: 100%; - transform: translate3d(-24.2em, 0, 0); + transform: translate3d(0, 0, 0); transition: transform 0.25s cubic-bezier(0.4, 0.0, 0.2, 1.0); background: $md-color-white; - z-index: 3; + z-index: 2; // Just hide drawer, if browser doesn't support 3D transforms .no-csstransforms3d & { @@ -58,13 +59,18 @@ // Expanded drawer .md-toggle--drawer:checked ~ .md-container & { - transform: translate3d(0, 0, 0); + transform: translate3d(24.2rem, 0, 0); // Just show drawer, if browser doesn't support 3D transforms .no-csstransforms3d & { display: block; } } + + // Hide overflow for nested navigation + .md-sidebar__scrollwrap { + overflow: hidden; + } } } @@ -82,8 +88,8 @@ margin-left: 100%; transform: translate(-100%, 0); - // [screen small +]: Limit to grid - @include break-from-device(screen small) { + // [screen +]: Limit to grid + @include break-from-device(screen) { margin-left: 120.0rem; } } @@ -94,10 +100,10 @@ &__scrollwrap { margin: 2.4rem 0.4rem; overflow-y: scroll; - -webkit-overflow-scrolling: touch; + // -webkit-overflow-scrolling: touch; // TODO: define on sidebar - // [tablet landscape -]: Adjust margins - @include break-to-device(tablet landscape) { + // [tablet -]: Adjust margins + @include break-to-device(tablet) { // Adjust margins for primary scrollbar .md-sidebar--primary & { @@ -128,10 +134,9 @@ // Actual sidebar content &__inner { - padding: 1.2rem; - // [screen small +]: Add line for reference - @include break-from-device(screen small) { + // [screen +]: Add line for reference + @include break-from-device(screen) { border-right: px2rem(1px) solid $md-color-black--lightest; } } diff --git a/src/assets/stylesheets/layout/_source.scss b/src/assets/stylesheets/layout/_source.scss index 01cdc5341..d378bcdc5 100644 --- a/src/assets/stylesheets/layout/_source.scss +++ b/src/assets/stylesheets/layout/_source.scss @@ -54,12 +54,12 @@ display: block; position: absolute; top: 50%; - left: 0.8rem; - width: 2.4rem; - height: 2.4rem; + left: $md-icon-padding; + width: $md-icon-size; + height: $md-icon-size; transform: translateY(-50%); background-repeat: no-repeat; - background-size: 2.4rem 2.4rem; + background-size: $md-icon-size $md-icon-size; content: ""; } } diff --git a/src/base.html b/src/base.html index 3bca7dbca..23cbb7a2e 100644 --- a/src/base.html +++ b/src/base.html @@ -63,7 +63,7 @@ + href="https://fonts.googleapis.com/css?family=Roboto+Mono:400" /> @@ -86,7 +86,7 @@ - {% include "header.html" %} + {% include "partials/header.html" %}
    @@ -105,22 +105,43 @@ {% if nav %} - {% include "nav.html" %} +
    +
    +
    + {% include "partials/nav.html" %} +
    +
    +
    {% endif %} {% if toc %} - {% include "toc.html" %} +
    +
    +
    + {% include "partials/toc.html" %} +
    +
    +
    {% endif %}
    - -
    Edit on GitHub
    + + {% block content %} - {{ content }} + + {% if edit_uri %} + + Edit + + {% endif %} + + + {{ content }} + {% endblock %}
    @@ -144,7 +165,7 @@
    - {% include "footer.html" %} + {% include "partials/footer.html" %}
    @@ -157,4 +178,4 @@ {% endfor %} - \ No newline at end of file + diff --git a/src/footer.html b/src/partials/footer.html similarity index 99% rename from src/footer.html rename to src/partials/footer.html index a45778a06..4c8cc7296 100644 --- a/src/footer.html +++ b/src/partials/footer.html @@ -70,4 +70,4 @@
    {% endif %} - \ No newline at end of file + diff --git a/src/header.html b/src/partials/header.html similarity index 66% rename from src/header.html rename to src/partials/header.html index fe2070431..b0693ac8c 100644 --- a/src/header.html +++ b/src/partials/header.html @@ -41,40 +41,17 @@ -
    +
    -
    -
    -
    - - -
    - FOO
    - FOO
    - FOO
    - FOO
    - FOO
    - FOO
    - FOO
    - FOO
    - FOO
    - FOO
    - FOO
    - FOO
    - FOO
    - FOO
    -
    -
    -
    + + + {% include "partials/search.html" %}
    {% if "github." in repo_url %} {% set platform = "md-source--github" %} @@ -91,16 +68,11 @@
    {{ repo_name }}
    -
    - 0.2.4 · 177 Stars · 46 Forks -
    +
      +
    • v0.2.4
    • +
    - - - - \ No newline at end of file + diff --git a/src/nav-item.html b/src/partials/nav-item.html similarity index 56% rename from src/nav-item.html rename to src/partials/nav-item.html index fc5ba402e..45fb0d7e3 100644 --- a/src/nav-item.html +++ b/src/partials/nav-item.html @@ -21,33 +21,54 @@ --> -{% if nav_item.children %} -
  • +{% if nav_item.children or nav_item == current_page %} +
  • + {% if nav_item == current_page %} + {% set path = "toc" %} + {% endif %} - - {% if nav_item.active %} + + {% if nav_item.active and not nav_item == current_page %} {% else %} {% endif %} - -
      - - {% for nav_item in nav_item.children %} - {% set temp = path %} - {% set path = path + "-" + loop.index | string %} - {% include "nav-item.html" %} - {% set path = temp %} - {% endfor %} -
    + + {% if nav_item == current_page %} + + + {{ nav_item.title }} + + + + {% include "partials/toc.html" %} + {% else %} + + + {% endif %}
  • @@ -58,30 +79,6 @@ class="md-nav__link md-nav__link--active"> {{ nav_item.title }} - - - - - - - - - {% else %} @@ -89,4 +86,4 @@ {% endif %} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/nav.html b/src/partials/nav.html similarity index 73% rename from src/nav.html rename to src/partials/nav.html index f965b01f2..30f0d15f1 100644 --- a/src/nav.html +++ b/src/partials/nav.html @@ -21,16 +21,12 @@ --> -
    -
    - -
    -
    \ No newline at end of file + diff --git a/src/partials/search.html b/src/partials/search.html new file mode 100644 index 000000000..c4ad8b23f --- /dev/null +++ b/src/partials/search.html @@ -0,0 +1,50 @@ + + + + \ No newline at end of file diff --git a/src/toc-item.html b/src/partials/toc-item.html similarity index 87% rename from src/toc-item.html rename to src/partials/toc-item.html index 82ab867a6..521c6ad9b 100644 --- a/src/toc-item.html +++ b/src/partials/toc-item.html @@ -29,10 +29,12 @@ {% if toc_item.children %} -
      - {% for toc_item in toc_item.children %} - {% include "toc-item.html" %} - {% endfor %} -
    + {% endif %} - \ No newline at end of file + diff --git a/src/toc.html b/src/partials/toc.html similarity index 57% rename from src/toc.html rename to src/partials/toc.html index 92c167d4e..bd8183076 100644 --- a/src/toc.html +++ b/src/partials/toc.html @@ -21,29 +21,25 @@ --> -
    -
    -
    -
    \ No newline at end of file + + {% if toc and (toc | first) %} + +
      + {% for toc_item in toc %} + {% include "partials/toc-item.html" %} + {% endfor %} +
    + {% endif %} + \ No newline at end of file diff --git a/src/search.html b/src/search.html deleted file mode 100644 index e69de29bb..000000000 From 2fd1740f3d279f94fa0362189e61cc34114bbff6 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Fri, 23 Sep 2016 12:39:47 +0200 Subject: [PATCH 020/202] Fixed bug in scrollspy --- .../{application-48691dba51.js => application-409da39d08.js} | 4 ++-- material/assets/stylesheets/application-cbcef7edd5.css | 2 +- material/base.html | 2 +- src/assets/javascripts/application.js | 2 +- src/assets/javascripts/components/scrollspy.js | 3 +-- 5 files changed, 6 insertions(+), 7 deletions(-) rename material/assets/javascripts/{application-48691dba51.js => application-409da39d08.js} (81%) diff --git a/material/assets/javascripts/application-48691dba51.js b/material/assets/javascripts/application-409da39d08.js similarity index 81% rename from material/assets/javascripts/application-48691dba51.js rename to material/assets/javascripts/application-409da39d08.js index bb087444b..2b8b2d3db 100644 --- a/material/assets/javascripts/application-48691dba51.js +++ b/material/assets/javascripts/application-409da39d08.js @@ -1,8 +1,8 @@ -!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),u=i(c);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 u["default"](".md-nav--toc .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))}),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.querySelector(".md-source__facts"),o=document.createElement("li");o.className="md-source__fact md-source__fact--hidden",o.innerText=t+" Stars",i.appendChild(o),setTimeout(function(e){e.classList.remove("md-source__fact--hidden")},100,o),o=document.createElement("li"),o.className="md-source__fact md-source__fact--hidden",o.innerText=n+" Forks",i.appendChild(o),setTimeout(function(e){e.classList.remove("md-source__fact--hidden")},500,o)})["catch"](function(e){console.log("parsing failed",e)})})},function(e,t,n){var i;!function(){"use strict";/** +!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),u=i(c);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 u["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))}),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.querySelector(".md-source__facts"),o=document.createElement("li");o.className="md-source__fact md-source__fact--hidden",o.innerText=t+" Stars",i.appendChild(o),setTimeout(function(e){e.classList.remove("md-source__fact--hidden")},100,o),o=document.createElement("li"),o.className="md-source__fact md-source__fact--hidden",o.innerText=n+" Forks",i.appendChild(o),setTimeout(function(e){e.classList.remove("md-source__fact--hidden")},500,o)})["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,u=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),u=s&&/OS [6-7]_\d/.test(navigator.userAgent),l=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,l=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,u&&(r=e.changedTouches[0],l=document.elementFromPoint(r.pageX-window.pageXOffset,r.pageY-window.pageYOffset)||l,l.fastClickScrollParent=this.targetElement.fastClickScrollParent),i=l.tagName.toLowerCase(),"label"===i){if(t=this.findControl(l)){if(this.focus(l),a)return!1;l=t}}else if(this.needsFocus(l))return e.timeStamp-n>100||s&&window.top!==window&&"input"===i?(this.targetElement=null,!1):(this.focus(l),this.sendClick(l,e),s&&"select"===i||(this.targetElement=null,e.preventDefault()),!1);return!(!s||c||(o=l.fastClickScrollParent,!o||o.fastClickLastScrollTop===o.scrollTop))||(this.needsClick(l)||(e.preventDefault(),this.sendClick(l,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(l&&(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}]); \ No newline at end of file +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,u=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),u=s&&/OS [6-7]_\d/.test(navigator.userAgent),l=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,l=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,u&&(r=e.changedTouches[0],l=document.elementFromPoint(r.pageX-window.pageXOffset,r.pageY-window.pageYOffset)||l,l.fastClickScrollParent=this.targetElement.fastClickScrollParent),i=l.tagName.toLowerCase(),"label"===i){if(t=this.findControl(l)){if(this.focus(l),a)return!1;l=t}}else if(this.needsFocus(l))return e.timeStamp-n>100||s&&window.top!==window&&"input"===i?(this.targetElement=null,!1):(this.focus(l),this.sendClick(l,e),s&&"select"===i||(this.targetElement=null,e.preventDefault()),!1);return!(!s||c||(o=l.fastClickScrollParent,!o||o.fastClickLastScrollTop===o.scrollTop))||(this.needsClick(l)||(e.preventDefault(),this.sendClick(l,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(l&&(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}]); \ No newline at end of file diff --git a/material/assets/stylesheets/application-cbcef7edd5.css b/material/assets/stylesheets/application-cbcef7edd5.css index 3d0a3f233..b236047a3 100644 --- a/material/assets/stylesheets/application-cbcef7edd5.css +++ b/material/assets/stylesheets/application-cbcef7edd5.css @@ -1 +1 @@ -@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{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{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-content--typeset{color:rgba(0,0,0,.87);font-size:1.6rem;line-height:1.6}.md-content--typeset blockquote,.md-content--typeset ol,.md-content--typeset p,.md-content--typeset ul{margin:1em 0}.md-content--typeset h1{margin:0 0 4rem;color:rgba(0,0,0,.54);font-size:3.125rem;font-weight:300;letter-spacing:-.01em;line-height:1.3}.md-content--typeset h2{margin:4rem 0 1.6rem;font-size:2.5rem;font-weight:300;letter-spacing:-.01em;line-height:1.4}.md-content--typeset h3{margin:3.2rem 0 1.6rem;font-size:2rem;font-weight:400;letter-spacing:-.01em;line-height:1.5}.md-content--typeset h2+h3{margin-top:1.6rem}.md-content--typeset h4{margin:1.6rem 0;font-size:1.6rem;font-weight:700;letter-spacing:-.01em}.md-content--typeset h5,.md-content--typeset h6{margin:1.6rem 0;color:rgba(0,0,0,.54);font-size:1.28rem;font-weight:700;letter-spacing:-.01em}.md-content--typeset h5{text-transform:uppercase}.md-content--typeset hr{margin:2.4rem 0;border-bottom:.1rem dotted rgba(0,0,0,.26)}.md-content--typeset a{color:#3f51b5}.md-content--typeset a,.md-content--typeset a:before{-webkit-transition:color .125s;transition:color .125s}.md-content--typeset a:active,.md-content--typeset a:hover{color:#536dfe}.md-content--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-content--typeset h1 code,.md-content--typeset h2 code,.md-content--typeset h3 code,.md-content--typeset h4 code,.md-content--typeset h5 code,.md-content--typeset h6 code{margin:0;background:transparent;box-shadow:none}.md-content--typeset pre{margin:1em 0;padding:1rem 1.2rem;border-radius:.2rem;background:#f7f7f7;color:#37474f;font-size:85%;line-height:1.4;overflow-x:scroll}.md-content--typeset pre>code{font-size:inherit}.md-content--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-content--typeset small{opacity:.75}.md-content--typeset sub,.md-content--typeset sup{margin-left:.1rem}.md-content--typeset blockquote{padding-left:1.2rem;border-left:.4rem solid rgba(0,0,0,.26);color:rgba(0,0,0,.54)}.md-content--typeset ul{list-style-type:disc}.md-content--typeset ol ol{list-style-type:lower-alpha}.md-content--typeset ol ol ol{list-style-type:lower-roman}.md-content--typeset ol,.md-content--typeset ul{margin-left:1rem;padding:0}.md-content--typeset ol li,.md-content--typeset ul li{margin-bottom:.5em;margin-left:2rem}.md-content--typeset ol li blockquote,.md-content--typeset ol li p,.md-content--typeset ul li blockquote,.md-content--typeset ul li p{margin:.5em 0}.md-content--typeset ol li:last-child,.md-content--typeset ul li:last-child{margin-bottom:0}.md-content--typeset ol li ol,.md-content--typeset ol li ul,.md-content--typeset ul li ol,.md-content--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:1%}.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;overflow:auto}.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-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.2}.md-nav--secondary{border-left:.4rem solid #3f51b5}.md-nav__title{display:block;margin:0;padding:1.2rem 1.2rem 0;font-size:inherit;font-weight:700;line-height:inherit}.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;line-height:1.3}.md-nav__item:last-child{padding-bottom:.625em}.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"}.md-nav__link[for=toc],.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-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:table-cell;position:relative;min-width:23rem;max-width:23rem;height:4.8rem;padding:0 1.2rem;-webkit-transition:opacity .25s;transition:opacity .25s;font-size:1.3rem;line-height:1.2;white-space:nowrap;vertical-align:middle}.md-source:hover{opacity:.7}.md-source--bitbucket,.md-source--github,.md-source--gitlab{padding-left:4rem}.md-source--bitbucket:before,.md-source--github:before,.md-source--gitlab:before{display:block;position:absolute;top:50%;left:.8rem;width:2.4rem;height:2.4rem;-webkit-transform:translateY(-50%);transform:translateY(-50%);background-repeat:no-repeat;background-size:2.4rem 2.4rem;content:""}.md-source--bitbucket:before{background-image:url(../images/icons/bitbucket-white-42306ad0de.svg)}.md-source--github:before{background-image:url(../images/icons/github-white-75cacf3601.svg)}.md-source--gitlab:before{background-image:url(../images/icons/gitlab-white-3c8a368006.svg)}.md-source__repository{font-weight:700;text-overflow:ellipsis;overflow:hidden}.md-source__facts{margin:0;padding:0;color:hsla(0,0%,100%,.7);font-size:1.1rem;font-weight:700;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-content--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-content--typeset [id]:hover .headerlink,.md-content--typeset [id]:target .headerlink{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.md-content--typeset [id]:hover .headerlink:hover,.md-content--typeset [id]:target .headerlink{color:#536dfe}.md-content--typeset h1[id]:before{display:block;margin-top:-11rem;padding-top:11rem;content:""}.md-content--typeset h2[id]:before{display:block;margin-top:-8.2rem;padding-top:8.2rem;content:""}.md-content--typeset h3[id]:before{display:block;margin-top:-8.4rem;padding-top:8.4rem;content:""}.md-content--typeset h4[id]:before{display:block;margin-top:-8.6rem;padding-top:8.6rem;content:""}.md-content--typeset h5[id]:before,.md-content--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}.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 (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;width:auto;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}.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;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;overflow:hidden}.md-nav--primary .md-nav__title:before{display:block;position:absolute;left:.4rem;width:4rem;height:4rem;color:rgba(0,0,0,.54)}.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);font-size:1.6rem}.md-nav--primary .md-nav__link{position:relative;padding:1.6rem}.md-nav--primary .md-nav__link:after{position:absolute;right:1.2rem;-webkit-transform:rotate(-90deg);transform:rotate(-90deg);color:rgba(0,0,0,.54);font-size:2.4rem;line-height:2rem}.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-sidebar--primary{position:fixed;top:0;left:-24.2rem;width:24.2rem;height:100%;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition:-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1),-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{-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}.md-sidebar--primary .md-nav--secondary .md-nav{position:static}.md-sidebar--primary .md-nav--secondary .md-nav .md-nav__item{padding-left:1.2rem}.md-sidebar--primary .md-nav--secondary .md-nav__list .md-nav__list{position:static;pointer-events:auto}}@media only screen and (min-width:60em){.md-content{margin-right:24.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__toggle~.md-nav{max-height:0;overflow:hidden}.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:.5em .475em;transform-origin:.5em .475em;-webkit-transition:-webkit-transform .25s;transition:-webkit-transform .25s;transition:transform .25s;transition:transform .25s,-webkit-transform .25s;vertical-align:-.125em}.md-nav__item--nested .md-nav__toggle:checked~.md-nav__link:after{-webkit-transform:rotate(180deg);transform:rotate(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}.md-nav__link[for=toc]{display:block}.md-nav__link[for=toc]:after{-webkit-transform:none;transform:none;content:"toc"}.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}}@media only screen and (max-width:44.9375em){.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:60em) and (min-width:75em){.md-sidebar--secondary.md-js__sidebar--locked{margin-left:120rem}} \ No newline at end of file +@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{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{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-content--typeset{color:rgba(0,0,0,.87);font-size:1.6rem;line-height:1.6}.md-content--typeset blockquote,.md-content--typeset ol,.md-content--typeset p,.md-content--typeset ul{margin:1em 0}.md-content--typeset h1{margin:0 0 4rem;color:rgba(0,0,0,.54);font-size:3.125rem;font-weight:300;letter-spacing:-.01em;line-height:1.3}.md-content--typeset h2{margin:4rem 0 1.6rem;font-size:2.5rem;font-weight:300;letter-spacing:-.01em;line-height:1.4}.md-content--typeset h3{margin:3.2rem 0 1.6rem;font-size:2rem;font-weight:400;letter-spacing:-.01em;line-height:1.5}.md-content--typeset h2+h3{margin-top:1.6rem}.md-content--typeset h4{margin:1.6rem 0;font-size:1.6rem;font-weight:700;letter-spacing:-.01em}.md-content--typeset h5,.md-content--typeset h6{margin:1.6rem 0;color:rgba(0,0,0,.54);font-size:1.28rem;font-weight:700;letter-spacing:-.01em}.md-content--typeset h5{text-transform:uppercase}.md-content--typeset hr{margin:2.4rem 0;border-bottom:.1rem dotted rgba(0,0,0,.26)}.md-content--typeset a{color:#3f51b5}.md-content--typeset a,.md-content--typeset a:before{-webkit-transition:color .125s;transition:color .125s}.md-content--typeset a:active,.md-content--typeset a:hover{color:#536dfe}.md-content--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-content--typeset h1 code,.md-content--typeset h2 code,.md-content--typeset h3 code,.md-content--typeset h4 code,.md-content--typeset h5 code,.md-content--typeset h6 code{margin:0;background:transparent;box-shadow:none}.md-content--typeset pre{margin:1em 0;padding:1rem 1.2rem;border-radius:.2rem;background:#f7f7f7;color:#37474f;font-size:85%;line-height:1.4;overflow-x:scroll}.md-content--typeset pre>code{font-size:inherit}.md-content--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-content--typeset small{opacity:.75}.md-content--typeset sub,.md-content--typeset sup{margin-left:.1rem}.md-content--typeset blockquote{padding-left:1.2rem;border-left:.4rem solid rgba(0,0,0,.26);color:rgba(0,0,0,.54)}.md-content--typeset ul{list-style-type:disc}.md-content--typeset ol ol{list-style-type:lower-alpha}.md-content--typeset ol ol ol{list-style-type:lower-roman}.md-content--typeset ol,.md-content--typeset ul{margin-left:1rem;padding:0}.md-content--typeset ol li,.md-content--typeset ul li{margin-bottom:.5em;margin-left:2rem}.md-content--typeset ol li blockquote,.md-content--typeset ol li p,.md-content--typeset ul li blockquote,.md-content--typeset ul li p{margin:.5em 0}.md-content--typeset ol li:last-child,.md-content--typeset ul li:last-child{margin-bottom:0}.md-content--typeset ol li ol,.md-content--typeset ol li ul,.md-content--typeset ul li ol,.md-content--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:1%}.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;overflow:auto}.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-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.2}.md-nav--secondary{border-left:.4rem solid #3f51b5}.md-nav__title{display:block;margin:0;padding:1.2rem 1.2rem 0;font-size:inherit;font-weight:700;line-height:inherit}.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;line-height:1.3}.md-nav__item:last-child{padding-bottom:.625em}.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"}.md-nav__link[for=toc],.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-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:table-cell;position:relative;min-width:23rem;max-width:23rem;height:4.8rem;padding:0 1.2rem;-webkit-transition:opacity .25s;transition:opacity .25s;font-size:1.3rem;line-height:1.2;white-space:nowrap;vertical-align:middle}.md-source:hover{opacity:.7}.md-source--bitbucket,.md-source--github,.md-source--gitlab{padding-left:4rem}.md-source--bitbucket:before,.md-source--github:before,.md-source--gitlab:before{display:block;position:absolute;top:50%;left:.8rem;width:2.4rem;height:2.4rem;-webkit-transform:translateY(-50%);transform:translateY(-50%);background-repeat:no-repeat;background-size:2.4rem 2.4rem;content:""}.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{font-weight:700;text-overflow:ellipsis;overflow:hidden}.md-source__facts{margin:0;padding:0;color:hsla(0,0%,100%,.7);font-size:1.1rem;font-weight:700;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-content--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-content--typeset [id]:hover .headerlink,.md-content--typeset [id]:target .headerlink{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.md-content--typeset [id]:hover .headerlink:hover,.md-content--typeset [id]:target .headerlink{color:#536dfe}.md-content--typeset h1[id]:before{display:block;margin-top:-11rem;padding-top:11rem;content:""}.md-content--typeset h2[id]:before{display:block;margin-top:-8.2rem;padding-top:8.2rem;content:""}.md-content--typeset h3[id]:before{display:block;margin-top:-8.4rem;padding-top:8.4rem;content:""}.md-content--typeset h4[id]:before{display:block;margin-top:-8.6rem;padding-top:8.6rem;content:""}.md-content--typeset h5[id]:before,.md-content--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}.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 (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;width:auto;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}.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;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;overflow:hidden}.md-nav--primary .md-nav__title:before{display:block;position:absolute;left:.4rem;width:4rem;height:4rem;color:rgba(0,0,0,.54)}.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);font-size:1.6rem}.md-nav--primary .md-nav__link{position:relative;padding:1.6rem}.md-nav--primary .md-nav__link:after{position:absolute;right:1.2rem;-webkit-transform:rotate(-90deg);transform:rotate(-90deg);color:rgba(0,0,0,.54);font-size:2.4rem;line-height:2rem}.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-sidebar--primary{position:fixed;top:0;left:-24.2rem;width:24.2rem;height:100%;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition:-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1),-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{-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}.md-sidebar--primary .md-nav--secondary .md-nav{position:static}.md-sidebar--primary .md-nav--secondary .md-nav .md-nav__item{padding-left:1.2rem}.md-sidebar--primary .md-nav--secondary .md-nav__list .md-nav__list{position:static;pointer-events:auto}}@media only screen and (min-width:60em){.md-content{margin-right:24.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__toggle~.md-nav{max-height:0;overflow:hidden}.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:.5em .475em;transform-origin:.5em .475em;-webkit-transition:-webkit-transform .25s;transition:-webkit-transform .25s;transition:transform .25s;transition:transform .25s,-webkit-transform .25s;vertical-align:-.125em}.md-nav__item--nested .md-nav__toggle:checked~.md-nav__link:after{-webkit-transform:rotate(180deg);transform:rotate(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}.md-nav__link[for=toc]{display:block}.md-nav__link[for=toc]:after{-webkit-transform:none;transform:none;content:"toc"}.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}}@media only screen and (max-width:44.9375em){.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: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 a83392e3e..7c512d622 100644 --- a/material/base.html +++ b/material/base.html @@ -91,7 +91,7 @@ var base_url = '{{ base_url }}'; var repo_url = '{{ repo_url }}'; - + {% for path in extra_javascript %} {% endfor %} diff --git a/src/assets/javascripts/application.js b/src/assets/javascripts/application.js index 95e36f5de..2d831452e 100644 --- a/src/assets/javascripts/application.js +++ b/src/assets/javascripts/application.js @@ -67,7 +67,7 @@ document.addEventListener('DOMContentLoaded', function() { var toc = new Sidebar('.md-sidebar--secondary'); toc.listen(); - var spy = new ScrollSpy('.md-nav--toc .md-nav__link'); + var spy = new ScrollSpy('.md-sidebar--secondary .md-nav--secondary .md-nav__link'); spy.listen(); window.addEventListener('resize', handler); diff --git a/src/assets/javascripts/components/scrollspy.js b/src/assets/javascripts/components/scrollspy.js index 7013f6970..46e95e9d0 100644 --- a/src/assets/javascripts/components/scrollspy.js +++ b/src/assets/javascripts/components/scrollspy.js @@ -53,11 +53,10 @@ class ScrollSpy { * @param {Event} ev - Event */ update(ev) { - let index = this.index_; /* Scroll direction is down */ if (this.offset_ <= window.pageYOffset) { - for (let i = this.index_; i < this.el_.length; i++) { + for (let i = this.index_ + 1; i < this.el_.length; i++) { let anchor = document.querySelector(this.el_[i].hash); if (anchor.offsetTop <= window.pageYOffset) { if (i > 0) From 71d022ef395bfe4d6cdb5d5945224d3050f37675 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Fri, 23 Sep 2016 17:46:16 +0200 Subject: [PATCH 021/202] Refactored repository view and integrated into drawer --- ...09da39d08.js => application-caa33c61a6.js} | 4 +- .../stylesheets/application-a65065dc36.css | 1 + .../stylesheets/application-cbcef7edd5.css | 1 - material/base.html | 2 +- material/partials/header.html | 18 +-- material/partials/nav.html | 5 +- material/partials/source.html | 17 +++ src/assets/javascripts/application.js | 37 +++--- src/assets/stylesheets/_shame.scss | 48 +------- src/assets/stylesheets/base/_typeset.scss | 3 +- .../stylesheets/extensions/_permalinks.scss | 6 +- .../extensions/pymdownx/_critic.scss | 0 .../extensions/pymdownx/_inlinehilite.scss | 0 .../extensions/pymdownx/_tasklist.scss | 0 src/assets/stylesheets/layout/_base.scss | 2 +- src/assets/stylesheets/layout/_header.scss | 13 +++ src/assets/stylesheets/layout/_nav.scss | 105 ++++++++++++++---- src/assets/stylesheets/layout/_sidebar.scss | 7 +- src/assets/stylesheets/layout/_source.scss | 38 +++---- src/partials/header.html | 26 +---- src/partials/nav.html | 5 +- src/partials/source.html | 46 ++++++++ 22 files changed, 227 insertions(+), 157 deletions(-) rename material/assets/javascripts/{application-409da39d08.js => application-caa33c61a6.js} (87%) create mode 100644 material/assets/stylesheets/application-a65065dc36.css delete mode 100644 material/assets/stylesheets/application-cbcef7edd5.css create mode 100644 material/partials/source.html create mode 100644 src/assets/stylesheets/extensions/pymdownx/_critic.scss create mode 100644 src/assets/stylesheets/extensions/pymdownx/_inlinehilite.scss create mode 100644 src/assets/stylesheets/extensions/pymdownx/_tasklist.scss create mode 100644 src/partials/source.html diff --git a/material/assets/javascripts/application-409da39d08.js b/material/assets/javascripts/application-caa33c61a6.js similarity index 87% rename from material/assets/javascripts/application-409da39d08.js rename to material/assets/javascripts/application-caa33c61a6.js index 2b8b2d3db..59781726e 100644 --- a/material/assets/javascripts/application-409da39d08.js +++ b/material/assets/javascripts/application-caa33c61a6.js @@ -1,8 +1,8 @@ -!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),u=i(c);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 u["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))}),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.querySelector(".md-source__facts"),o=document.createElement("li");o.className="md-source__fact md-source__fact--hidden",o.innerText=t+" Stars",i.appendChild(o),setTimeout(function(e){e.classList.remove("md-source__fact--hidden")},100,o),o=document.createElement("li"),o.className="md-source__fact md-source__fact--hidden",o.innerText=n+" Forks",i.appendChild(o),setTimeout(function(e){e.classList.remove("md-source__fact--hidden")},500,o)})["catch"](function(e){console.log("parsing failed",e)})})},function(e,t,n){var i;!function(){"use strict";/** +!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);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))}),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,u=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),u=s&&/OS [6-7]_\d/.test(navigator.userAgent),l=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,l=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,u&&(r=e.changedTouches[0],l=document.elementFromPoint(r.pageX-window.pageXOffset,r.pageY-window.pageYOffset)||l,l.fastClickScrollParent=this.targetElement.fastClickScrollParent),i=l.tagName.toLowerCase(),"label"===i){if(t=this.findControl(l)){if(this.focus(l),a)return!1;l=t}}else if(this.needsFocus(l))return e.timeStamp-n>100||s&&window.top!==window&&"input"===i?(this.targetElement=null,!1):(this.focus(l),this.sendClick(l,e),s&&"select"===i||(this.targetElement=null,e.preventDefault()),!1);return!(!s||c||(o=l.fastClickScrollParent,!o||o.fastClickLastScrollTop===o.scrollTop))||(this.needsClick(l)||(e.preventDefault(),this.sendClick(l,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(l&&(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}]); \ No newline at end of file +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}]); \ No newline at end of file diff --git a/material/assets/stylesheets/application-a65065dc36.css b/material/assets/stylesheets/application-a65065dc36.css new file mode 100644 index 000000000..ec40317b9 --- /dev/null +++ b/material/assets/stylesheets/application-a65065dc36.css @@ -0,0 +1 @@ +@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-content--typeset{font-size:1.6rem;line-height:1.6}.md-content--typeset blockquote,.md-content--typeset ol,.md-content--typeset p,.md-content--typeset ul{margin:1em 0}.md-content--typeset h1{margin:0 0 4rem;color:rgba(0,0,0,.54);font-size:3.125rem;font-weight:300;letter-spacing:-.01em;line-height:1.3}.md-content--typeset h2{margin:4rem 0 1.6rem;font-size:2.5rem;font-weight:300;letter-spacing:-.01em;line-height:1.4}.md-content--typeset h3{margin:3.2rem 0 1.6rem;font-size:2rem;font-weight:400;letter-spacing:-.01em;line-height:1.5}.md-content--typeset h2+h3{margin-top:1.6rem}.md-content--typeset h4{margin:1.6rem 0;font-size:1.6rem;font-weight:700;letter-spacing:-.01em}.md-content--typeset h5,.md-content--typeset h6{margin:1.6rem 0;color:rgba(0,0,0,.54);font-size:1.28rem;font-weight:700;letter-spacing:-.01em}.md-content--typeset h5{text-transform:uppercase}.md-content--typeset hr{margin:2.4rem 0;border-bottom:.1rem dotted rgba(0,0,0,.26)}.md-content--typeset a{color:#3f51b5}.md-content--typeset a,.md-content--typeset a:before{-webkit-transition:color .125s;transition:color .125s}.md-content--typeset a:active,.md-content--typeset a:hover{color:#536dfe}.md-content--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-content--typeset h1 code,.md-content--typeset h2 code,.md-content--typeset h3 code,.md-content--typeset h4 code,.md-content--typeset h5 code,.md-content--typeset h6 code{margin:0;background:transparent;box-shadow:none}.md-content--typeset pre{margin:1em 0;padding:1rem 1.2rem;border-radius:.2rem;background:#f7f7f7;color:#37474f;font-size:85%;line-height:1.4;overflow-x:scroll}.md-content--typeset pre>code{font-size:inherit}.md-content--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-content--typeset small{opacity:.75}.md-content--typeset sub,.md-content--typeset sup{margin-left:.1rem}.md-content--typeset blockquote{padding-left:1.2rem;border-left:.4rem solid rgba(0,0,0,.26);color:rgba(0,0,0,.54)}.md-content--typeset ul{list-style-type:disc}.md-content--typeset ol ol{list-style-type:lower-alpha}.md-content--typeset ol ol ol{list-style-type:lower-roman}.md-content--typeset ol,.md-content--typeset ul{margin-left:1rem;padding:0}.md-content--typeset ol li,.md-content--typeset ul li{margin-bottom:.5em;margin-left:2rem}.md-content--typeset ol li blockquote,.md-content--typeset ol li p,.md-content--typeset ul li blockquote,.md-content--typeset ul li p{margin:.5em 0}.md-content--typeset ol li:last-child,.md-content--typeset ul li:last-child{margin-bottom:0}.md-content--typeset ol li ol,.md-content--typeset ol li ul,.md-content--typeset ul li ol,.md-content--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;overflow:auto}.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-content--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-content--typeset [id] .headerlink:focus,.md-content--typeset [id]:hover .headerlink,.md-content--typeset [id]:target .headerlink{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.md-content--typeset [id] .headerlink:focus,.md-content--typeset [id]:hover .headerlink:hover,.md-content--typeset [id]:target .headerlink{color:#536dfe}.md-content--typeset h1[id]:before{display:block;margin-top:-11rem;padding-top:11rem;content:""}.md-content--typeset h2[id]:before{display:block;margin-top:-8.2rem;padding-top:8.2rem;content:""}.md-content--typeset h3[id]:before{display:block;margin-top:-8.4rem;padding-top:8.4rem;content:""}.md-content--typeset h4[id]:before{display:block;margin-top:-8.6rem;padding-top:8.6rem;content:""}.md-content--typeset h5[id]:before,.md-content--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}.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 (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__toggle~.md-nav{max-height:0;overflow:hidden}.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:.5em .475em;transform-origin:.5em .475em;-webkit-transition:-webkit-transform .25s;transition:-webkit-transform .25s;transition:transform .25s;transition:transform .25s,-webkit-transform .25s;vertical-align:-.125em}.md-nav__item--nested .md-nav__toggle:checked~.md-nav__link:after{-webkit-transform:rotate(180deg);transform:rotate(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 (max-width:44.9375em){.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: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-cbcef7edd5.css b/material/assets/stylesheets/application-cbcef7edd5.css deleted file mode 100644 index b236047a3..000000000 --- a/material/assets/stylesheets/application-cbcef7edd5.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{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{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-content--typeset{color:rgba(0,0,0,.87);font-size:1.6rem;line-height:1.6}.md-content--typeset blockquote,.md-content--typeset ol,.md-content--typeset p,.md-content--typeset ul{margin:1em 0}.md-content--typeset h1{margin:0 0 4rem;color:rgba(0,0,0,.54);font-size:3.125rem;font-weight:300;letter-spacing:-.01em;line-height:1.3}.md-content--typeset h2{margin:4rem 0 1.6rem;font-size:2.5rem;font-weight:300;letter-spacing:-.01em;line-height:1.4}.md-content--typeset h3{margin:3.2rem 0 1.6rem;font-size:2rem;font-weight:400;letter-spacing:-.01em;line-height:1.5}.md-content--typeset h2+h3{margin-top:1.6rem}.md-content--typeset h4{margin:1.6rem 0;font-size:1.6rem;font-weight:700;letter-spacing:-.01em}.md-content--typeset h5,.md-content--typeset h6{margin:1.6rem 0;color:rgba(0,0,0,.54);font-size:1.28rem;font-weight:700;letter-spacing:-.01em}.md-content--typeset h5{text-transform:uppercase}.md-content--typeset hr{margin:2.4rem 0;border-bottom:.1rem dotted rgba(0,0,0,.26)}.md-content--typeset a{color:#3f51b5}.md-content--typeset a,.md-content--typeset a:before{-webkit-transition:color .125s;transition:color .125s}.md-content--typeset a:active,.md-content--typeset a:hover{color:#536dfe}.md-content--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-content--typeset h1 code,.md-content--typeset h2 code,.md-content--typeset h3 code,.md-content--typeset h4 code,.md-content--typeset h5 code,.md-content--typeset h6 code{margin:0;background:transparent;box-shadow:none}.md-content--typeset pre{margin:1em 0;padding:1rem 1.2rem;border-radius:.2rem;background:#f7f7f7;color:#37474f;font-size:85%;line-height:1.4;overflow-x:scroll}.md-content--typeset pre>code{font-size:inherit}.md-content--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-content--typeset small{opacity:.75}.md-content--typeset sub,.md-content--typeset sup{margin-left:.1rem}.md-content--typeset blockquote{padding-left:1.2rem;border-left:.4rem solid rgba(0,0,0,.26);color:rgba(0,0,0,.54)}.md-content--typeset ul{list-style-type:disc}.md-content--typeset ol ol{list-style-type:lower-alpha}.md-content--typeset ol ol ol{list-style-type:lower-roman}.md-content--typeset ol,.md-content--typeset ul{margin-left:1rem;padding:0}.md-content--typeset ol li,.md-content--typeset ul li{margin-bottom:.5em;margin-left:2rem}.md-content--typeset ol li blockquote,.md-content--typeset ol li p,.md-content--typeset ul li blockquote,.md-content--typeset ul li p{margin:.5em 0}.md-content--typeset ol li:last-child,.md-content--typeset ul li:last-child{margin-bottom:0}.md-content--typeset ol li ol,.md-content--typeset ol li ul,.md-content--typeset ul li ol,.md-content--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:1%}.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;overflow:auto}.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-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.2}.md-nav--secondary{border-left:.4rem solid #3f51b5}.md-nav__title{display:block;margin:0;padding:1.2rem 1.2rem 0;font-size:inherit;font-weight:700;line-height:inherit}.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;line-height:1.3}.md-nav__item:last-child{padding-bottom:.625em}.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"}.md-nav__link[for=toc],.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-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:table-cell;position:relative;min-width:23rem;max-width:23rem;height:4.8rem;padding:0 1.2rem;-webkit-transition:opacity .25s;transition:opacity .25s;font-size:1.3rem;line-height:1.2;white-space:nowrap;vertical-align:middle}.md-source:hover{opacity:.7}.md-source--bitbucket,.md-source--github,.md-source--gitlab{padding-left:4rem}.md-source--bitbucket:before,.md-source--github:before,.md-source--gitlab:before{display:block;position:absolute;top:50%;left:.8rem;width:2.4rem;height:2.4rem;-webkit-transform:translateY(-50%);transform:translateY(-50%);background-repeat:no-repeat;background-size:2.4rem 2.4rem;content:""}.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{font-weight:700;text-overflow:ellipsis;overflow:hidden}.md-source__facts{margin:0;padding:0;color:hsla(0,0%,100%,.7);font-size:1.1rem;font-weight:700;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-content--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-content--typeset [id]:hover .headerlink,.md-content--typeset [id]:target .headerlink{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.md-content--typeset [id]:hover .headerlink:hover,.md-content--typeset [id]:target .headerlink{color:#536dfe}.md-content--typeset h1[id]:before{display:block;margin-top:-11rem;padding-top:11rem;content:""}.md-content--typeset h2[id]:before{display:block;margin-top:-8.2rem;padding-top:8.2rem;content:""}.md-content--typeset h3[id]:before{display:block;margin-top:-8.4rem;padding-top:8.4rem;content:""}.md-content--typeset h4[id]:before{display:block;margin-top:-8.6rem;padding-top:8.6rem;content:""}.md-content--typeset h5[id]:before,.md-content--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}.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 (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;width:auto;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}.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;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;overflow:hidden}.md-nav--primary .md-nav__title:before{display:block;position:absolute;left:.4rem;width:4rem;height:4rem;color:rgba(0,0,0,.54)}.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);font-size:1.6rem}.md-nav--primary .md-nav__link{position:relative;padding:1.6rem}.md-nav--primary .md-nav__link:after{position:absolute;right:1.2rem;-webkit-transform:rotate(-90deg);transform:rotate(-90deg);color:rgba(0,0,0,.54);font-size:2.4rem;line-height:2rem}.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-sidebar--primary{position:fixed;top:0;left:-24.2rem;width:24.2rem;height:100%;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition:-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1),-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{-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}.md-sidebar--primary .md-nav--secondary .md-nav{position:static}.md-sidebar--primary .md-nav--secondary .md-nav .md-nav__item{padding-left:1.2rem}.md-sidebar--primary .md-nav--secondary .md-nav__list .md-nav__list{position:static;pointer-events:auto}}@media only screen and (min-width:60em){.md-content{margin-right:24.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__toggle~.md-nav{max-height:0;overflow:hidden}.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:.5em .475em;transform-origin:.5em .475em;-webkit-transition:-webkit-transform .25s;transition:-webkit-transform .25s;transition:transform .25s;transition:transform .25s,-webkit-transform .25s;vertical-align:-.125em}.md-nav__item--nested .md-nav__toggle:checked~.md-nav__link:after{-webkit-transform:rotate(180deg);transform:rotate(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}.md-nav__link[for=toc]{display:block}.md-nav__link[for=toc]:after{-webkit-transform:none;transform:none;content:"toc"}.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}}@media only screen and (max-width:44.9375em){.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: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 7c512d622..2d867dd67 100644 --- a/material/base.html +++ b/material/base.html @@ -24,7 +24,7 @@ - + {% for path in extra_css %} {% endfor %} diff --git a/material/partials/header.html b/material/partials/header.html index e0d409fbb..c402c0c59 100644 --- a/material/partials/header.html +++ b/material/partials/header.html @@ -13,22 +13,10 @@ {% include "partials/search.html" %} - {% if "github." in repo_url %} - {% set platform = "md-source--github" %} - {% elif "gitlab." in repo_url %} - {% set platform = "md-source--gitlab" %} - {% elif "bitbucket." in repo_url %} - {% set platform = "md-source--bitbucket" %} - {% else %} - {% set platform = "" %} - {% endif %}
    - -
    {{ repo_name }}
    -
      -
    • v0.2.4
    • -
    -
    +
    + {% include "partials/source.html" %} +
    diff --git a/material/partials/nav.html b/material/partials/nav.html index 9ee94a692..2be7dae37 100644 --- a/material/partials/nav.html +++ b/material/partials/nav.html @@ -1,9 +1,12 @@ diff --git a/material/partials/source.html b/material/partials/source.html new file mode 100644 index 000000000..c0cf1b8e7 --- /dev/null +++ b/material/partials/source.html @@ -0,0 +1,17 @@ +{% if "github." in repo_url %} + {% set platform = "md-source--github" %} +{% elif "gitlab." in repo_url %} + {% set platform = "md-source--gitlab" %} +{% elif "bitbucket." in repo_url %} + {% set platform = "md-source--bitbucket" %} +{% else %} + {% set platform = "" %} +{% endif %} + +
    + {{ repo_name }} +
      +
    • v0.2.4
    • +
    +
    +
    diff --git a/src/assets/javascripts/application.js b/src/assets/javascripts/application.js index 2d831452e..c3542327f 100644 --- a/src/assets/javascripts/application.js +++ b/src/assets/javascripts/application.js @@ -126,28 +126,31 @@ document.addEventListener('DOMContentLoaded', function() { var stars = data.stargazers_count; var forks = data.forks_count; // store in session!!! - var list = document.querySelector('.md-source__facts'); - // list.innerHTML += '
  • ' + stars + ' Stars
  • \n'; - // list.innerHTML += '
  • ' + forks + ' Forks
  • \n'; + var lists = document.querySelectorAll('.md-source__facts'); + [].forEach.call(lists, function(list) { + // list.innerHTML += '
  • ' + stars + ' Stars
  • \n'; + // list.innerHTML += '
  • ' + forks + ' Forks
  • \n'; - var li = document.createElement('li'); - li.className = 'md-source__fact md-source__fact--hidden'; - li.innerText = stars + ' Stars'; - list.appendChild(li); + var li = document.createElement('li'); + li.className = 'md-source__fact md-source__fact--hidden'; + li.innerText = stars + ' Stars'; + list.appendChild(li); - setTimeout(function(li) { - li.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(function(li) { - li.classList.remove('md-source__fact--hidden'); - }, 500, li); // setTimeout(function() { // li.classList.remove('md-source__fact--hidden'); diff --git a/src/assets/stylesheets/_shame.scss b/src/assets/stylesheets/_shame.scss index a4e946850..729360390 100644 --- a/src/assets/stylesheets/_shame.scss +++ b/src/assets/stylesheets/_shame.scss @@ -252,50 +252,4 @@ mark { display: block; margin: 0 -16px; padding: 0 16px; -} - -// [tablet -]: Adjust spacing on screens -@include break-to-device(tablet) { - .md-sidebar--primary { - .md-nav--secondary .md-nav { - position: static; // TODO DODODODODO - - .md-nav__item { - padding-left: 1.2rem; - } - } - // second level list! - .md-nav--secondary .md-nav__list .md-nav__list { - position: static; - pointer-events: initial; //!!! - } - .md-nav__item { - // transition: background .25s; - // - // & :hover { - // background: lighten($md-color-primary, 50%); - // } - } - } -} - -// .md-nav--secondary > .md-nav__title { -// // -webkit-overflow-scrolling: touch; -// @include z-depth(1); -// } -// .md-nav__toggle:checked ~ .md-nav > .md-nav__list { -// -// > :first-child { -// border-top: 0; -// } -// -// background: -// linear-gradient(white 10%, rgba(255,255,255,0)), // cover -// linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0) 60%); // shadow -// background-repeat: no-repeat; -// background-color: white; -// background-size: 100% 20px, 100% 4px; -// -// /* Opera doesn't support this in the shorthand */ -// background-attachment: local, scroll; -// } \ No newline at end of file +} \ No newline at end of file diff --git a/src/assets/stylesheets/base/_typeset.scss b/src/assets/stylesheets/base/_typeset.scss index 2c5d595e6..668c77dfc 100644 --- a/src/assets/stylesheets/base/_typeset.scss +++ b/src/assets/stylesheets/base/_typeset.scss @@ -26,6 +26,7 @@ // Default fonts body { + color: $md-color-black; font-family: "Roboto", Helvetica, Arial, sans-serif; font-weight: 400; font-feature-settings: "kern", "onum", "liga"; @@ -44,6 +45,7 @@ body { pre, code, kbd { + color: $md-color-black; font-family: "Roboto Mono", "Courier New", Courier, monospace; font-weight: 400; font-feature-settings: "kern", "onum", "liga"; @@ -60,7 +62,6 @@ kbd { // Content that is typeset .md-content--typeset { - color: $md-color-black; font-size: ms(0); line-height: 1.6; diff --git a/src/assets/stylesheets/extensions/_permalinks.scss b/src/assets/stylesheets/extensions/_permalinks.scss index bd4c8a561..a9f2e577b 100644 --- a/src/assets/stylesheets/extensions/_permalinks.scss +++ b/src/assets/stylesheets/extensions/_permalinks.scss @@ -44,14 +44,16 @@ // Make permalink visible on hover &:hover .headerlink, - &:target .headerlink { + &:target .headerlink, + & .headerlink:focus { transform: translate3d(0, 0, 0); opacity: 1; } // Active or targeted permalink &:hover .headerlink:hover, - &:target .headerlink { + &:target .headerlink, + & .headerlink:focus { color: $md-color-accent; } } diff --git a/src/assets/stylesheets/extensions/pymdownx/_critic.scss b/src/assets/stylesheets/extensions/pymdownx/_critic.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/assets/stylesheets/extensions/pymdownx/_inlinehilite.scss b/src/assets/stylesheets/extensions/pymdownx/_inlinehilite.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/assets/stylesheets/extensions/pymdownx/_tasklist.scss b/src/assets/stylesheets/extensions/pymdownx/_tasklist.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/assets/stylesheets/layout/_base.scss b/src/assets/stylesheets/layout/_base.scss index 9fa3c6acf..6882c31c9 100644 --- a/src/assets/stylesheets/layout/_base.scss +++ b/src/assets/stylesheets/layout/_base.scss @@ -139,7 +139,7 @@ hr { // Shrink to minimum width &--shrink { - width: 1%; + width: 0%; } // Stretch to maximum width diff --git a/src/assets/stylesheets/layout/_header.scss b/src/assets/stylesheets/layout/_header.scss index a6fa776de..b52613c41 100644 --- a/src/assets/stylesheets/layout/_header.scss +++ b/src/assets/stylesheets/layout/_header.scss @@ -71,4 +71,17 @@ font-size: 1.8rem; line-height: 4.8rem; } + + // Repository containing source + &__source { + display: none; + + // [tablet landscape +]: Show the reposistory from tablet + @include break-from-device(tablet landscape) { + display: block; + width: 23.0rem; + max-width: 23.0rem; + padding-right: 1.2rem; + } + } } diff --git a/src/assets/stylesheets/layout/_nav.scss b/src/assets/stylesheets/layout/_nav.scss index d6b3e1d5e..0324a1ebb 100644 --- a/src/assets/stylesheets/layout/_nav.scss +++ b/src/assets/stylesheets/layout/_nav.scss @@ -27,21 +27,20 @@ // Nested navigation .md-nav { font-size: ms(-1); - line-height: 1.2; + line-height: 1.3; // Table of contents &--secondary { border-left: px2rem(4px) solid $md-color-primary; } - // Title + // List title &__title { display: block; - margin: 0; padding: 1.2rem 1.2rem 0; - font-size: inherit; font-weight: 700; - line-height: inherit; + text-overflow: ellipsis; + overflow: hidden; // Icon, hidden by default &::before { @@ -62,11 +61,10 @@ // List item &__item { padding: 0.625em 1.2rem 0; - line-height: 1.3; // Add bottom spacing to last item &:last-child { - padding-bottom: 0.625em; + padding-bottom: 1.2rem; } // 2nd+ level items @@ -98,12 +96,13 @@ } } - // Hide link to table of contents by default - &[for="toc"] { + // Hide link to table of contents by default - this will only match the + // table of contents inside the drawer below and including tablet portrait. + html &[for="toc"] { display: none; // Hide table of contents by default - html & ~ .md-nav { + & ~ .md-nav { display: none; } @@ -126,6 +125,11 @@ } } + // Repository containing source + &__source { + display: none; + } + // [tablet -]: Layered navigation @include break-to-device(tablet) { @@ -138,7 +142,6 @@ right: 0; left: 0; flex-direction: column; - width: auto; height: 100%; z-index: 1; } @@ -155,8 +158,9 @@ background: $md-color-white; } - // Title - .md-nav__title { + // List title - higher specificity is necessary to ensure that the title + // inside the drawer is always styled accordingly. + html & .md-nav__title { position: relative; padding: 0.4rem 1.6rem 0.4rem 5.6rem; background: $md-color-black--lightest; @@ -164,10 +168,8 @@ font-size: 1.8rem; font-weight: 400; line-height: 4.8rem; - text-overflow: ellipsis; white-space: nowrap; cursor: pointer; - overflow: hidden; // Icon &::before { @@ -178,6 +180,11 @@ height: 4.0rem; color: $md-color-black--light; } + + // Remove border for first ist item + ~ .md-nav__list > .md-nav__item:first-child { + border-top: 0; + } } // List of items @@ -190,7 +197,11 @@ .md-nav__item { padding: 0; border-top: 0.1rem solid $md-color-black--lightest; - font-size: 1.6rem; + + // Increase spacing to account for icon + &--nested > .md-nav__link { + padding-right: 4.8rem; + } } // Link inside item @@ -201,11 +212,42 @@ // Rotate icon &::after { position: absolute; + top: 50%; right: 1.2rem; - transform: rotate(-90deg); + transform: translateY(-50%) rotate(-90deg); + transition: inherit; color: $md-color-black--light; font-size: 2.4rem; - line-height: 2.0rem; + } + + // Color of icon should inherit link color on hover + &:hover::after { + color: $md-color-accent; + } + } + + // Set nested navigation for table of contents to static + .md-nav--secondary .md-nav { + position: static; + + // 3rd level link + .md-nav__link { + padding-left: 2.8rem; + } + + // 4th level link + .md-nav .md-nav__link { + padding-left: 4.0rem; + } + + // 5th level link + .md-nav .md-nav .md-nav__link { + padding-left: 5.2rem; + } + + // 6th level link + .md-nav .md-nav .md-nav .md-nav__link { + padding-left: 6.4rem; } } } @@ -236,6 +278,13 @@ opacity: 1; } } + + // List item + .md-nav__title, + .md-nav__item { + font-size: 1.6rem; + line-height: 1.4; + } } // [tablet portrait -]: Show table of contents in drawer @@ -246,13 +295,15 @@ border-left: 0; } - // Show link to table of contents - &__link[for="toc"] { + // Show link to table of contents - higher specificity is necessary to + // display the table of contents inside the drawer. + html &__link[for="toc"] { display: block; // Unrotate icon for table of contents &::after { - transform: none; + transform: translateY(-50%); + color: $md-color-accent; content: "toc"; } @@ -262,10 +313,18 @@ } // Show table of contents - html & ~ .md-nav { + & ~ .md-nav { display: flex; } } + + // Repository containing source + &__source { + display: block; + padding: 0.4rem; + background: $md-color-black; + color: $md-color-white; + } } // [screen +]: Tree-like navigation @@ -282,7 +341,7 @@ max-height: 100%; } - // Title + // List title &__title { // Hide titles for nested navigation diff --git a/src/assets/stylesheets/layout/_sidebar.scss b/src/assets/stylesheets/layout/_sidebar.scss index 8bd2cab17..413ed8904 100644 --- a/src/assets/stylesheets/layout/_sidebar.scss +++ b/src/assets/stylesheets/layout/_sidebar.scss @@ -48,7 +48,8 @@ width: 24.2rem; height: 100%; transform: translate3d(0, 0, 0); - transition: transform 0.25s cubic-bezier(0.4, 0.0, 0.2, 1.0); + transition: transform 0.25s cubic-bezier(0.4, 0.0, 0.2, 1.0), + box-shadow 0.25s; background: $md-color-white; z-index: 2; @@ -59,6 +60,8 @@ // Expanded drawer .md-toggle--drawer:checked ~ .md-container & { + @include z-depth(8); + transform: translate3d(24.2rem, 0, 0); // Just show drawer, if browser doesn't support 3D transforms @@ -100,7 +103,7 @@ &__scrollwrap { margin: 2.4rem 0.4rem; overflow-y: scroll; - // -webkit-overflow-scrolling: touch; // TODO: define on sidebar + // -webkit-overflow-scrolling: touch; // TODO: problems with iOS // [tablet -]: Adjust margins @include break-to-device(tablet) { diff --git a/src/assets/stylesheets/layout/_source.scss b/src/assets/stylesheets/layout/_source.scss index d378bcdc5..3b4bd42f4 100644 --- a/src/assets/stylesheets/layout/_source.scss +++ b/src/assets/stylesheets/layout/_source.scss @@ -26,17 +26,11 @@ // Repository containing source .md-source { - display: table-cell; - position: relative; - min-width: 23.0rem; - max-width: 23.0rem; - height: 4.8rem; - padding: 0 1.2rem; + display: block; transition: opacity 0.25s; font-size: 1.3rem; line-height: 1.2; white-space: nowrap; - vertical-align: middle; // Hovered source information &:hover { @@ -47,20 +41,17 @@ &--bitbucket, &--github, &--gitlab { - padding-left: 4.0rem; // Platform icon &::before { - display: block; - position: absolute; - top: 50%; - left: $md-icon-padding; - width: $md-icon-size; - height: $md-icon-size; - transform: translateY(-50%); + 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; } } @@ -81,18 +72,23 @@ // Repository name &__repository { + display: inline-block; + max-width: 100%; + margin-left: -4.4rem; + padding-left: 4.0rem; font-weight: 700; text-overflow: ellipsis; overflow: hidden; + vertical-align: middle; } // Source facts (statistics etc.) &__facts { margin: 0; padding: 0; - color: $md-color-white--light; font-size: 1.1rem; font-weight: 700; + opacity: 0.75; list-style-type: none; } @@ -104,21 +100,21 @@ transform 0.25s cubic-bezier(0.1, 0.7, 0.1, 1.0); opacity: 1; + // Facts are hidden by default &--hidden { transform: translateY(100%); opacity: 0; } + // Middle dots before fact &::before { margin: 0 0.2rem; content: "\00B7"; } - &:first-child { - - &::before { - display: none; - } + // Remove middle dot on first fact + &:first-child::before { + display: none; } } } diff --git a/src/partials/header.html b/src/partials/header.html index b0693ac8c..fa104062f 100644 --- a/src/partials/header.html +++ b/src/partials/header.html @@ -49,29 +49,11 @@ {% include "partials/search.html" %} - - {% if "github." in repo_url %} - {% set platform = "md-source--github" %} - {% elif "gitlab." in repo_url %} - {% set platform = "md-source--gitlab" %} - {% elif "bitbucket." in repo_url %} - {% set platform = "md-source--bitbucket" %} - {% else %} - {% set platform = "" %} - {% endif %} - - +
    - -
    {{ repo_name }}
    -
      -
    • v0.2.4
    • -
    -
    +
    + {% include "partials/source.html" %} +
    diff --git a/src/partials/nav.html b/src/partials/nav.html index 30f0d15f1..488d77391 100644 --- a/src/partials/nav.html +++ b/src/partials/nav.html @@ -22,11 +22,14 @@ diff --git a/src/partials/source.html b/src/partials/source.html new file mode 100644 index 000000000..df66663a9 --- /dev/null +++ b/src/partials/source.html @@ -0,0 +1,46 @@ + + + +{% if "github." in repo_url %} + {% set platform = "md-source--github" %} +{% elif "gitlab." in repo_url %} + {% set platform = "md-source--gitlab" %} +{% elif "bitbucket." in repo_url %} + {% set platform = "md-source--bitbucket" %} +{% else %} + {% set platform = "" %} +{% endif %} + + + +
    + {{ repo_name }} +
      +
    • v0.2.4
    • +
    +
    +
    From ffe06939a724d265ca29eae93dfbf06a09ea6643 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Fri, 23 Sep 2016 20:26:27 +0200 Subject: [PATCH 022/202] Refactored code container --- .../stylesheets/application-a65065dc36.css | 1 - .../stylesheets/application-c4157830f8.css | 1 + material/base.html | 6 ++-- src/assets/javascripts/application.js | 13 +++++++++ src/assets/stylesheets/base/_typeset.scss | 28 +++++++++++++++++-- .../stylesheets/extensions/_permalinks.scss | 2 +- src/assets/stylesheets/layout/_content.scss | 2 +- src/base.html | 4 +-- 8 files changed, 47 insertions(+), 10 deletions(-) delete mode 100644 material/assets/stylesheets/application-a65065dc36.css create mode 100644 material/assets/stylesheets/application-c4157830f8.css diff --git a/material/assets/stylesheets/application-a65065dc36.css b/material/assets/stylesheets/application-a65065dc36.css deleted file mode 100644 index ec40317b9..000000000 --- a/material/assets/stylesheets/application-a65065dc36.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-content--typeset{font-size:1.6rem;line-height:1.6}.md-content--typeset blockquote,.md-content--typeset ol,.md-content--typeset p,.md-content--typeset ul{margin:1em 0}.md-content--typeset h1{margin:0 0 4rem;color:rgba(0,0,0,.54);font-size:3.125rem;font-weight:300;letter-spacing:-.01em;line-height:1.3}.md-content--typeset h2{margin:4rem 0 1.6rem;font-size:2.5rem;font-weight:300;letter-spacing:-.01em;line-height:1.4}.md-content--typeset h3{margin:3.2rem 0 1.6rem;font-size:2rem;font-weight:400;letter-spacing:-.01em;line-height:1.5}.md-content--typeset h2+h3{margin-top:1.6rem}.md-content--typeset h4{margin:1.6rem 0;font-size:1.6rem;font-weight:700;letter-spacing:-.01em}.md-content--typeset h5,.md-content--typeset h6{margin:1.6rem 0;color:rgba(0,0,0,.54);font-size:1.28rem;font-weight:700;letter-spacing:-.01em}.md-content--typeset h5{text-transform:uppercase}.md-content--typeset hr{margin:2.4rem 0;border-bottom:.1rem dotted rgba(0,0,0,.26)}.md-content--typeset a{color:#3f51b5}.md-content--typeset a,.md-content--typeset a:before{-webkit-transition:color .125s;transition:color .125s}.md-content--typeset a:active,.md-content--typeset a:hover{color:#536dfe}.md-content--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-content--typeset h1 code,.md-content--typeset h2 code,.md-content--typeset h3 code,.md-content--typeset h4 code,.md-content--typeset h5 code,.md-content--typeset h6 code{margin:0;background:transparent;box-shadow:none}.md-content--typeset pre{margin:1em 0;padding:1rem 1.2rem;border-radius:.2rem;background:#f7f7f7;color:#37474f;font-size:85%;line-height:1.4;overflow-x:scroll}.md-content--typeset pre>code{font-size:inherit}.md-content--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-content--typeset small{opacity:.75}.md-content--typeset sub,.md-content--typeset sup{margin-left:.1rem}.md-content--typeset blockquote{padding-left:1.2rem;border-left:.4rem solid rgba(0,0,0,.26);color:rgba(0,0,0,.54)}.md-content--typeset ul{list-style-type:disc}.md-content--typeset ol ol{list-style-type:lower-alpha}.md-content--typeset ol ol ol{list-style-type:lower-roman}.md-content--typeset ol,.md-content--typeset ul{margin-left:1rem;padding:0}.md-content--typeset ol li,.md-content--typeset ul li{margin-bottom:.5em;margin-left:2rem}.md-content--typeset ol li blockquote,.md-content--typeset ol li p,.md-content--typeset ul li blockquote,.md-content--typeset ul li p{margin:.5em 0}.md-content--typeset ol li:last-child,.md-content--typeset ul li:last-child{margin-bottom:0}.md-content--typeset ol li ol,.md-content--typeset ol li ul,.md-content--typeset ul li ol,.md-content--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;overflow:auto}.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-content--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-content--typeset [id] .headerlink:focus,.md-content--typeset [id]:hover .headerlink,.md-content--typeset [id]:target .headerlink{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.md-content--typeset [id] .headerlink:focus,.md-content--typeset [id]:hover .headerlink:hover,.md-content--typeset [id]:target .headerlink{color:#536dfe}.md-content--typeset h1[id]:before{display:block;margin-top:-11rem;padding-top:11rem;content:""}.md-content--typeset h2[id]:before{display:block;margin-top:-8.2rem;padding-top:8.2rem;content:""}.md-content--typeset h3[id]:before{display:block;margin-top:-8.4rem;padding-top:8.4rem;content:""}.md-content--typeset h4[id]:before{display:block;margin-top:-8.6rem;padding-top:8.6rem;content:""}.md-content--typeset h5[id]:before,.md-content--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}.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 (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__toggle~.md-nav{max-height:0;overflow:hidden}.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:.5em .475em;transform-origin:.5em .475em;-webkit-transition:-webkit-transform .25s;transition:-webkit-transform .25s;transition:transform .25s;transition:transform .25s,-webkit-transform .25s;vertical-align:-.125em}.md-nav__item--nested .md-nav__toggle:checked~.md-nav__link:after{-webkit-transform:rotate(180deg);transform:rotate(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 (max-width:44.9375em){.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: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-c4157830f8.css b/material/assets/stylesheets/application-c4157830f8.css new file mode 100644 index 000000000..37dd4b2b3 --- /dev/null +++ b/material/assets/stylesheets/application-c4157830f8.css @@ -0,0 +1 @@ +@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}.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__toggle~.md-nav{max-height:0;overflow:hidden}.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:.5em .475em;transform-origin:.5em .475em;-webkit-transition:-webkit-transform .25s;transition:-webkit-transform .25s;transition:transform .25s;transition:transform .25s,-webkit-transform .25s;vertical-align:-.125em}.md-nav__item--nested .md-nav__toggle:checked~.md-nav__link:after{-webkit-transform:rotate(180deg);transform:rotate(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 2d867dd67..9b52b0e34 100644 --- a/material/base.html +++ b/material/base.html @@ -56,8 +56,8 @@ {% endif %} -
    -
    +
    +
    {% block content %} {% if edit_uri %} @@ -91,7 +91,7 @@ var base_url = '{{ base_url }}'; var repo_url = '{{ repo_url }}'; - + {% for path in extra_javascript %} {% endfor %} diff --git a/src/assets/javascripts/application.js b/src/assets/javascripts/application.js index c3542327f..e5b4ee6ab 100644 --- a/src/assets/javascripts/application.js +++ b/src/assets/javascripts/application.js @@ -118,6 +118,19 @@ document.addEventListener('DOMContentLoaded', function() { } }); + // 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%'; + // var rect = el.getBoundingClientRect(); + // el.style.maxHeight = '0'; + // + // // console.log(rect.height); + // el.style.maxHeight = '120px'; + // }); + + // setTimeout(function() { fetch('https://api.github.com/repos/squidfunk/mkdocs-material') .then(function(response) { diff --git a/src/assets/stylesheets/base/_typeset.scss b/src/assets/stylesheets/base/_typeset.scss index 668c77dfc..824c2e1e2 100644 --- a/src/assets/stylesheets/base/_typeset.scss +++ b/src/assets/stylesheets/base/_typeset.scss @@ -61,7 +61,7 @@ kbd { // ---------------------------------------------------------------------------- // Content that is typeset -.md-content--typeset { +.md-typeset { font-size: ms(0); line-height: 1.6; @@ -187,7 +187,8 @@ kbd { color: $md-code-color; font-size: 85%; line-height: 1.4; - overflow-x: scroll; + overflow: auto; + -webkit-overflow-scrolling: touch; // Reset, if pre is inside code > code { @@ -195,6 +196,29 @@ kbd { } } + // Full-width container + > div > pre, + > pre > code { + + // [mobile -]: Stretch to whole width + @include break-to-device(mobile) { + margin: 1.0em -1.6rem; + padding: 1.0rem 1.6rem; + border-radius: 0; + } + + // Override native scrollbar styles + &::-webkit-scrollbar { + width: 0.4rem; + height: 0.4rem; + + // Style scrollbar thumb + &-thumb { + background: $md-color-black--lighter; + } + } + } + // Keystrokes kbd { display: inline-block; diff --git a/src/assets/stylesheets/extensions/_permalinks.scss b/src/assets/stylesheets/extensions/_permalinks.scss index a9f2e577b..d32d9b1f1 100644 --- a/src/assets/stylesheets/extensions/_permalinks.scss +++ b/src/assets/stylesheets/extensions/_permalinks.scss @@ -25,7 +25,7 @@ // ---------------------------------------------------------------------------- // Scoped in typesetted content for greater specificity -.md-content--typeset { +.md-typeset { // Permalink .headerlink { diff --git a/src/assets/stylesheets/layout/_content.scss b/src/assets/stylesheets/layout/_content.scss index 52d698ca5..aa6b40ed0 100644 --- a/src/assets/stylesheets/layout/_content.scss +++ b/src/assets/stylesheets/layout/_content.scss @@ -42,7 +42,7 @@ margin: 2.4rem 1.6rem; // Hack: this is necessary for floating the edit button - overflow: auto; + // overflow: auto; // [screen +]: Increase spacing @include break-from-device(screen) { diff --git a/src/base.html b/src/base.html index 23cbb7a2e..3ee18c79e 100644 --- a/src/base.html +++ b/src/base.html @@ -126,8 +126,8 @@ {% endif %} -
    -
    +
    +
    {% block content %} From e32562fb1e3557b073995e1050a303ffae213f6d Mon Sep 17 00:00:00 2001 From: squidfunk Date: Fri, 23 Sep 2016 20:58:55 +0200 Subject: [PATCH 023/202] Repair build --- .../{application-c4157830f8.css => application-db0b43b137.css} | 2 +- src/assets/stylesheets/_shame.scss | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) rename material/assets/stylesheets/{application-c4157830f8.css => application-db0b43b137.css} (64%) diff --git a/material/assets/stylesheets/application-c4157830f8.css b/material/assets/stylesheets/application-db0b43b137.css similarity index 64% rename from material/assets/stylesheets/application-c4157830f8.css rename to material/assets/stylesheets/application-db0b43b137.css index 37dd4b2b3..241dbad3c 100644 --- a/material/assets/stylesheets/application-c4157830f8.css +++ b/material/assets/stylesheets/application-db0b43b137.css @@ -1 +1 @@ -@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}.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__toggle~.md-nav{max-height:0;overflow:hidden}.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:.5em .475em;transform-origin:.5em .475em;-webkit-transition:-webkit-transform .25s;transition:-webkit-transform .25s;transition:transform .25s;transition:transform .25s,-webkit-transform .25s;vertical-align:-.125em}.md-nav__item--nested .md-nav__toggle:checked~.md-nav__link:after{-webkit-transform:rotate(180deg);transform:rotate(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 +@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__toggle~.md-nav{max-height:0;overflow:hidden}.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:.5em .475em;transform-origin:.5em .475em;-webkit-transition:-webkit-transform .25s;transition:-webkit-transform .25s;transition:transform .25s;transition:transform .25s,-webkit-transform .25s;vertical-align:-.125em}.md-nav__item--nested .md-nav__toggle:checked~.md-nav__link:after{-webkit-transform:rotate(180deg);transform:rotate(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/src/assets/stylesheets/_shame.scss b/src/assets/stylesheets/_shame.scss index 729360390..416127671 100644 --- a/src/assets/stylesheets/_shame.scss +++ b/src/assets/stylesheets/_shame.scss @@ -171,6 +171,7 @@ mark { background: #FFFF00; box-shadow: 0.4rem 0 0 #FFFF00, -0.4rem 0 0 #FFFF00; // ligher yellow... + overflow: auto; // TODO: remove this, just needed to rebuild } .critic.comment { From fc7fb28edb7e28731d6bf6f03aeeebffb20e702f Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sat, 24 Sep 2016 18:52:37 +0200 Subject: [PATCH 024/202] Prototyped animation for navigation on desktop --- ...aa33c61a6.js => application-db87fe00d3.js} | 4 +- ...b43b137.css => application-d7ccfc4ec2.css} | 2 +- material/base.html | 2 +- material/partials/nav-item.html | 56 ++++++----- src/assets/javascripts/application.js | 73 ++++++++++++++- src/assets/javascripts/components/expander.js | 93 +++++++++++++++++++ .../javascripts/components/scrollspy.js | 10 +- src/assets/javascripts/components/sidebar.js | 6 +- src/assets/stylesheets/layout/_nav.scss | 16 +++- src/partials/nav-item.html | 69 +++++++------- 10 files changed, 248 insertions(+), 83 deletions(-) rename material/assets/javascripts/{application-caa33c61a6.js => application-db87fe00d3.js} (75%) rename material/assets/stylesheets/{application-db0b43b137.css => application-d7ccfc4ec2.css} (89%) create mode 100644 src/assets/javascripts/components/expander.js diff --git a/material/assets/javascripts/application-caa33c61a6.js b/material/assets/javascripts/application-db87fe00d3.js similarity index 75% rename from material/assets/javascripts/application-caa33c61a6.js rename to material/assets/javascripts/application-db87fe00d3.js index 59781726e..5178ad9f2 100644 --- a/material/assets/javascripts/application-caa33c61a6.js +++ b/material/assets/javascripts/application-db87fe00d3.js @@ -1,8 +1,8 @@ -!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);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))}),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";/** +!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}]); \ No newline at end of file +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;ncode{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__toggle~.md-nav{max-height:0;overflow:hidden}.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:.5em .475em;transform-origin:.5em .475em;-webkit-transition:-webkit-transform .25s;transition:-webkit-transform .25s;transition:transform .25s;transition:transform .25s,-webkit-transform .25s;vertical-align:-.125em}.md-nav__item--nested .md-nav__toggle:checked~.md-nav__link:after{-webkit-transform:rotate(180deg);transform:rotate(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 +@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 9b52b0e34..6697f882e 100644 --- a/material/base.html +++ b/material/base.html @@ -91,7 +91,7 @@ var base_url = '{{ base_url }}'; var repo_url = '{{ repo_url }}'; - + {% for path in extra_javascript %} {% endfor %} diff --git a/material/partials/nav-item.html b/material/partials/nav-item.html index ab2b4cb58..02649573c 100644 --- a/material/partials/nav-item.html +++ b/material/partials/nav-item.html @@ -1,39 +1,37 @@ -{% if nav_item.children or nav_item == current_page %} +{% if nav_item.children %}
  • - {% if nav_item == current_page %} - {% set path = "toc" %} - {% endif %} - {% if nav_item.active and not nav_item == current_page %} + {% if nav_item.active %} {% else %} {% endif %} - {% if nav_item == current_page %} - +
  • +{% elif nav_item == current_page %} +
  • + + + + {{ nav_item.title }} + + {% include "partials/toc.html" %}
  • {% else %}
  • diff --git a/src/assets/javascripts/application.js b/src/assets/javascripts/application.js index e5b4ee6ab..305af4437 100644 --- a/src/assets/javascripts/application.js +++ b/src/assets/javascripts/application.js @@ -29,6 +29,7 @@ import FastClick from 'fastclick'; import Sidebar from './components/sidebar'; import ScrollSpy from './components/scrollspy'; +import Expander from './components/expander'; /* ---------------------------------------------------------------------------- * Application @@ -118,16 +119,78 @@ document.addEventListener('DOMContentLoaded', function() { } }); + // 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; + + // 1. + + nav.style.maxHeight = nav.getBoundingClientRect().height + 'px'; + + toggle.addEventListener('click', function () { + let first = nav.getBoundingClientRect().height; + if (first) { + console.log('closing'); + nav.style.maxHeight = first + 'px'; // reset! + requestAnimationFrame(() => { + + nav.classList.add('md-nav--transitioning'); + nav.style.maxHeight = '0px'; + }); + } else { + console.log('opening'); + + /* Toggle and read height */ + nav.style.maxHeight = ''; + + nav.classList.add('md-nav--toggled'); + let last = nav.getBoundingClientRect().height; + nav.classList.remove('md-nav--toggled'); + + // Initial state + nav.style.maxHeight = '0px'; + + /* Enable animations */ + requestAnimationFrame(() => { + 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%'; + } + }); + }); + // 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%'; - // var rect = el.getBoundingClientRect(); - // el.style.maxHeight = '0'; + // el.style.maxHeight = '100%'; // class !? // - // // console.log(rect.height); - // el.style.maxHeight = '120px'; + // 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'); + // }); // }); diff --git a/src/assets/javascripts/components/expander.js b/src/assets/javascripts/components/expander.js new file mode 100644 index 000000000..0375f65cc --- /dev/null +++ b/src/assets/javascripts/components/expander.js @@ -0,0 +1,93 @@ +/* + * 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'; + +/* ---------------------------------------------------------------------------- + * Navigation expander + * ------------------------------------------------------------------------- */ + +class Expander { + + /** + * 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 of expandable element + * + * @param {Event} ev - Event + */ + update(ev) { + console.log("foo"); + }; + + /** + * Reset state of expandable element + */ + reset() { + // this.el_.classList.remove('md-js__sidebar--locked'); + // this.el_.style.height = ''; + // + // /* Reset parameters */ + // this.height_ = 0; + // this.locked_ = false; + }; + + /** + * Register listener for all relevant events + */ + listen() { + ['click'].forEach(name => { + window.addEventListener(name, this.handler_, false); + }); + }; + + /** + * Unregister listener for all relevant events + */ + unlisten() { + ['click'].forEach(name => { + window.removeEventListener(name, this.handler_, false); + }); + + /* Perform reset */ + this.reset(); + }; +} + +/* ---------------------------------------------------------------------------- + * Exports + * ------------------------------------------------------------------------- */ + +export default Expander; \ No newline at end of file diff --git a/src/assets/javascripts/components/scrollspy.js b/src/assets/javascripts/components/scrollspy.js index 46e95e9d0..1a58a4b58 100644 --- a/src/assets/javascripts/components/scrollspy.js +++ b/src/assets/javascripts/components/scrollspy.js @@ -42,7 +42,7 @@ class ScrollSpy { this.offset_ = window.pageYOffset; /* Event listener */ - this.handler_ = (ev) => { + this.handler_ = ev => { this.update(ev); }; } @@ -57,7 +57,7 @@ class ScrollSpy { /* 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); + let 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'); @@ -89,7 +89,7 @@ class ScrollSpy { * Reset state of sidebar */ reset() { - [].forEach.call(this.el_, (el) => { + [].forEach.call(this.el_, el => { el.classList.remove('md-nav__link--marked'); }); } @@ -98,7 +98,7 @@ class ScrollSpy { * Register listener for all relevant events */ listen() { - ['scroll', 'resize', 'orientationchange'].forEach((name) => { + ['scroll', 'resize', 'orientationchange'].forEach(name => { window.addEventListener(name, this.handler_, false); }); @@ -110,7 +110,7 @@ class ScrollSpy { * Unregister listener for all relevant events */ unlisten() { - ['scroll', 'resize', 'orientationchange'].forEach((name) => { + ['scroll', 'resize', 'orientationchange'].forEach(name => { window.removeEventListener(name, this.handler_, false); }); diff --git a/src/assets/javascripts/components/sidebar.js b/src/assets/javascripts/components/sidebar.js index 709eec72c..92a2d74a9 100644 --- a/src/assets/javascripts/components/sidebar.js +++ b/src/assets/javascripts/components/sidebar.js @@ -42,7 +42,7 @@ class Sidebar { this.locked_ = false; /* Event listener */ - this.handler_ = (ev) => { + this.handler_ = ev => { this.update(ev); }; }; @@ -103,7 +103,7 @@ class Sidebar { * Register listener for all relevant events */ listen() { - ['scroll', 'resize', 'orientationchange'].forEach((name) => { + ['scroll', 'resize', 'orientationchange'].forEach(name => { window.addEventListener(name, this.handler_, false); }); @@ -115,7 +115,7 @@ class Sidebar { * Unregister listener for all relevant events */ unlisten() { - ['scroll', 'resize', 'orientationchange'].forEach((name) => { + ['scroll', 'resize', 'orientationchange'].forEach(name => { window.removeEventListener(name, this.handler_, false); }); diff --git a/src/assets/stylesheets/layout/_nav.scss b/src/assets/stylesheets/layout/_nav.scss index 0324a1ebb..b647b40cb 100644 --- a/src/assets/stylesheets/layout/_nav.scss +++ b/src/assets/stylesheets/layout/_nav.scss @@ -330,6 +330,12 @@ // [screen +]: Tree-like navigation @include break-from-device(screen) { + // Animation is only possible if JavaScript is available, as the max-height + // property must be calculated before transitioning. + &.md-nav--transitioning { + transition: max-height 0.4s cubic-bezier(0.86, 0.0, 0.07, 1.0); + } + // Hide nested navigation by default .md-nav__toggle ~ & { max-height: 0; @@ -337,7 +343,8 @@ } // Expand nested navigation, if toggle is checked - .md-nav__toggle:checked ~ & { + .md-nav__toggle:checked ~ &, + &.md-nav--toggled { max-height: 100%; } @@ -356,14 +363,15 @@ // Item contains a nested list .md-nav__item--nested > &::after { display: inline-block; - transform-origin: 0.5em 0.475em; - transition: transform 0.25s; + transform-origin: 0.45em 0.485em; + transform-style: preserve-3d; + transition: transform 0.4s; vertical-align: -0.125em; } // Rotate icon for expanded lists .md-nav__item--nested .md-nav__toggle:checked ~ &::after { - transform: rotate(180deg); + transform: rotateX(180deg); } } } diff --git a/src/partials/nav-item.html b/src/partials/nav-item.html index 45fb0d7e3..e96cafae7 100644 --- a/src/partials/nav-item.html +++ b/src/partials/nav-item.html @@ -21,14 +21,11 @@ --> -{% if nav_item.children or nav_item == current_page %} +{% if nav_item.children %}
  • - {% if nav_item == current_page %} - {% set path = "toc" %} - {% endif %} - {% if nav_item.active and not nav_item == current_page %} + {% if nav_item.active %} {% else %} @@ -37,38 +34,44 @@ {% endif %} - {% if nav_item == current_page %} -
  • + + + + + + + + {{ nav_item.title }} + + + + {% include "partials/toc.html" %}
  • From 02915210f45365f53e5d90e51bf8879487de1e4e Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sat, 24 Sep 2016 19:12:05 +0200 Subject: [PATCH 025/202] Fix jittery scroll bouncing --- ...ation-db87fe00d3.js => application-a233641b81.js} | 2 +- material/base.html | 2 +- src/assets/javascripts/components/sidebar.js | 12 ++++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) rename material/assets/javascripts/{application-db87fe00d3.js => application-a233641b81.js} (75%) diff --git a/material/assets/javascripts/application-db87fe00d3.js b/material/assets/javascripts/application-a233641b81.js similarity index 75% rename from material/assets/javascripts/application-db87fe00d3.js rename to material/assets/javascripts/application-a233641b81.js index 5178ad9f2..e2f8bc10a 100644 --- a/material/assets/javascripts/application-db87fe00d3.js +++ b/material/assets/javascripts/application-a233641b81.js @@ -5,4 +5,4 @@ * @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=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 - + {% for path in extra_css %} {% endfor %} diff --git a/src/assets/javascripts/components/sidebar.js b/src/assets/javascripts/components/sidebar.js index 92a2d74a9..24aa5c512 100644 --- a/src/assets/javascripts/components/sidebar.js +++ b/src/assets/javascripts/components/sidebar.js @@ -37,6 +37,10 @@ class Sidebar { constructor(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; + /* Initialize parameters */ this.height_ = 0; this.locked_ = false; @@ -53,8 +57,8 @@ class Sidebar { * @param {Event} ev - Event */ update(ev) { - let container = this.el_.parentNode; - let bounds = container.getBoundingClientRect(); + let bounds = this.inner_.getBoundingClientRect(); + let parent = this.outer_.offsetTop; /* Determine top and bottom offsets */ let top = bounds.top + window.pageYOffset, @@ -67,14 +71,14 @@ class Sidebar { /* Calculate new bounds */ let offset = top - upper; let height = window.innerHeight - Math.max(lower - bottom, 0) - - Math.max(offset, container.parentNode.offsetTop); + - Math.max(offset, parent); /* If height changed, update element */ if (height != this.height_) this.el_.style.height = (this.height_ = height) + 'px'; /* Sidebar should be locked, as we're below parent offset */ - if (offset < container.parentNode.offsetTop) { + if (offset < parent) { if (!this.locked_) { this.el_.classList.add('md-js__sidebar--locked'); this.locked_ = true; From 46f45bb8a93244854aaded4ddf580f6ec73389f7 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Fri, 30 Sep 2016 13:29:45 +0200 Subject: [PATCH 026/202] 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 + From 914ccc45503be3af440918937f5811bd32e6d7fa Mon Sep 17 00:00:00 2001 From: squidfunk Date: Thu, 6 Oct 2016 12:14:33 +0200 Subject: [PATCH 027/202] Rewrite of Gulp asset pipeline in ES6 and separation of tasks --- .babelrc | 6 + .eslintrc | 41 +- .gitignore | 16 +- .nvmrc | 1 + .sass-lint.yml | 1 + .travis.yml | 4 +- CHANGELOG | 1 + Gulpfile.babel.js | 328 +++++++++++++ Gulpfile.js | 434 ------------------ MANIFEST.in | 4 +- ...9b6c4d53e.js => application-2ff8f6a9f1.js} | 10 +- .../javascripts/modernizr-29976e9007.js | 1 - .../javascripts/modernizr-dede1352ed.js | 1 + .../stylesheets/application-2ebf05d4b7.css | 1 + .../stylesheets/application-bcbe056a5b.css | 1 - material/base.html | 22 +- package.json | 10 +- src/assets/javascripts/application.js | 43 +- src/assets/javascripts/components/Material.js | 73 +++ .../components/Material/Sidebar.js | 33 ++ .../components/Material/Sidebar/Abstract.js | 94 ++++ .../components/Material/Sidebar/Marker.js | 103 +++++ .../components/Material/Sidebar/Position.js | 103 +++++ .../javascripts/components/scrollspy.js | 42 +- src/assets/javascripts/components/search.js | 2 - src/assets/stylesheets/_config.scss | 8 +- src/assets/stylesheets/_shame.scss | 2 +- src/assets/stylesheets/application.scss | 4 +- src/assets/stylesheets/base/_icons.scss | 2 +- src/assets/stylesheets/base/_reset.scss | 2 +- src/assets/stylesheets/base/_typeset.scss | 4 +- .../stylesheets/extensions/_admonition.scss | 4 +- .../stylesheets/extensions/_codehilite.scss | 4 +- .../stylesheets/extensions/_footnotes.scss | 4 +- .../stylesheets/extensions/_permalinks.scss | 4 +- src/assets/stylesheets/helpers/_break.scss | 4 +- src/assets/stylesheets/helpers/_px2em.scss | 2 +- src/assets/stylesheets/layout/_base.scss | 6 +- src/assets/stylesheets/layout/_content.scss | 2 +- src/assets/stylesheets/layout/_footer.scss | 2 +- src/assets/stylesheets/layout/_header.scss | 2 +- src/assets/stylesheets/layout/_nav.scss | 6 +- src/assets/stylesheets/layout/_search.scss | 4 +- src/assets/stylesheets/layout/_sidebar.scss | 8 +- src/assets/stylesheets/layout/_source.scss | 4 +- src/base.html | 26 +- tasks/assets/images/build/ico.js | 35 ++ tasks/assets/images/build/svg.js | 49 ++ tasks/assets/images/clean.js | 35 ++ tasks/assets/javascripts/build/application.js | 90 ++++ tasks/assets/javascripts/build/modernizr.js | 63 +++ tasks/assets/javascripts/clean.js | 35 ++ tasks/assets/javascripts/lint.js | 107 +++++ tasks/assets/stylesheets/build.js | 75 +++ tasks/assets/stylesheets/clean.js | 35 ++ tasks/assets/stylesheets/lint.js | 96 ++++ tasks/mkdocs/build.js | 33 ++ tasks/mkdocs/clean.js | 35 ++ tasks/mkdocs/serve.js | 58 +++ tasks/views/build.js | 55 +++ tasks/views/clean.js | 35 ++ 61 files changed, 1747 insertions(+), 568 deletions(-) create mode 100644 .babelrc create mode 100644 .nvmrc create mode 100755 Gulpfile.babel.js delete mode 100755 Gulpfile.js rename material/assets/javascripts/{application-29b6c4d53e.js => application-2ff8f6a9f1.js} (61%) delete mode 100644 material/assets/javascripts/modernizr-29976e9007.js create mode 100644 material/assets/javascripts/modernizr-dede1352ed.js create mode 100644 material/assets/stylesheets/application-2ebf05d4b7.css delete mode 100644 material/assets/stylesheets/application-bcbe056a5b.css create mode 100644 src/assets/javascripts/components/Material.js create mode 100644 src/assets/javascripts/components/Material/Sidebar.js create mode 100644 src/assets/javascripts/components/Material/Sidebar/Abstract.js create mode 100644 src/assets/javascripts/components/Material/Sidebar/Marker.js create mode 100644 src/assets/javascripts/components/Material/Sidebar/Position.js create mode 100644 tasks/assets/images/build/ico.js create mode 100644 tasks/assets/images/build/svg.js create mode 100644 tasks/assets/images/clean.js create mode 100644 tasks/assets/javascripts/build/application.js create mode 100644 tasks/assets/javascripts/build/modernizr.js create mode 100644 tasks/assets/javascripts/clean.js create mode 100644 tasks/assets/javascripts/lint.js create mode 100644 tasks/assets/stylesheets/build.js create mode 100644 tasks/assets/stylesheets/clean.js create mode 100644 tasks/assets/stylesheets/lint.js create mode 100644 tasks/mkdocs/build.js create mode 100644 tasks/mkdocs/clean.js create mode 100644 tasks/mkdocs/serve.js create mode 100644 tasks/views/build.js create mode 100644 tasks/views/clean.js diff --git a/.babelrc b/.babelrc new file mode 100644 index 000000000..e51860877 --- /dev/null +++ b/.babelrc @@ -0,0 +1,6 @@ +{ + "presets": ["es2015"], + "plugins": [ + "add-module-exports" + ] +} \ No newline at end of file diff --git a/.eslintrc b/.eslintrc index 0c866a34d..5f3f52927 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,8 +1,27 @@ { "extends": "eslint:recommended", "ecmaFeatures": { + "arrowFunctions": true, + "binaryLiterals": true, + "blockBindings": true, + "classes": true, + "defaultParams": true, + "destructuring": true, + "forOf": true, + "generators": true, "globalReturn": true, - "modules": true + "modules": true, + "objectLiteralComputedProperties": true, + "objectLiteralDuplicateProperties": true, + "objectLiteralShorthandMethods": true, + "objectLiteralShorthandProperties": true, + "octalLiterals": true, + "regexUFlag": true, + "regexYFlag": true, + "spread": true, + "superInFunctions": false, + "templateStrings": true, + "unicodeCodePointEscapes": true }, "env": { "browser": true, @@ -10,10 +29,10 @@ "node": true }, "globals": { - "describe": true, "before": true, - "it": true, + "describe": true, "expect": true, + "it": true, "Modernizr": true, "navigator": true }, @@ -34,7 +53,7 @@ "block-spacing": 2, "brace-style": 2, "camelcase": [2, { - "properties": "always", + "properties": "always" }], "comma-dangle": [2, "never"], "comma-style": [2, "last"], @@ -71,13 +90,12 @@ "lines-around-comment": 2, "lines-around-directive": 2, "max-depth": 2, - "max-len": [2, { + "max-len": [1, { "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, @@ -86,6 +104,7 @@ "no-confusing-arrow": [2, { "allowParens": false }], + "no-console": 1, "no-duplicate-imports": 2, "no-eq-null": 2, "no-eval": 2, @@ -97,7 +116,7 @@ "no-labels": 2, "no-lone-blocks": 2, "no-loop-func": 2, - "no-multiple-empty-lines": [2, { + "no-multiple-empty-lines": [1, { "max": 1 }], "no-nested-ternary": 2, @@ -118,6 +137,7 @@ "no-unneeded-ternary": 2, "no-unsafe-negation": 2, "no-unused-expressions": 2, + "no-unused-vars": 1, "no-use-before-define": 2, "no-useless-call": 2, "no-useless-computed-key": 2, @@ -126,8 +146,7 @@ "no-var": 2, "no-whitespace-before-property": 2, "no-with": 2, - "object-curly-newline": 2, - "object-curly-spacing": 2, + "object-curly-spacing": [2, "always"], "object-property-newline": 2, "object-shorthand": 2, "one-var-declaration-per-line": 2, @@ -139,7 +158,7 @@ "prefer-template": 2, "quotes": [2, "double"], "radix": 2, - "require-jsdoc": [2, { + "require-jsdoc": [1, { "require": { "FunctionDeclaration": true, "MethodDefinition": true, @@ -167,7 +186,7 @@ "strict": 2, "template-curly-spacing": 2, "unicode-bom": 2, - "valid-jsdoc": [2, { + "valid-jsdoc": [1, { "prefer": { "arg": "param", "argument": "param", diff --git a/.gitignore b/.gitignore index 0dacbf28e..e8de676b4 100644 --- a/.gitignore +++ b/.gitignore @@ -21,15 +21,15 @@ # Mac OS X internals .DS_Store -# NPM libraries -node_modules +# Dependencies +/node_modules # Build files -build -manifest.json -MANIFEST -site +/build +/manifest.json +/MANIFEST +/site # Distribution files -dist -mkdocs_material.egg-info \ No newline at end of file +/dist +/mkdocs_material.egg-info \ No newline at end of file diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 000000000..07a7b03c9 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +6.7.0 \ No newline at end of file diff --git a/.sass-lint.yml b/.sass-lint.yml index 246e0e080..e324f7de4 100644 --- a/.sass-lint.yml +++ b/.sass-lint.yml @@ -21,6 +21,7 @@ files: ignore: - src/assets/stylesheets/_shame.scss + - src/assets/stylesheets/extensions/_codehilite.scss # Temporary disabled options: merge-default-rules: true diff --git a/.travis.yml b/.travis.yml index 2070547ca..28e813bd0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,8 +22,8 @@ language: node_js # Node.js versions node_js: - - '4.1' - - '0.11' + - 4.5.0 + - 6.7.0 # Install dependencies before_script: diff --git a/CHANGELOG b/CHANGELOG index 9a180dae0..05f56b32d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -15,6 +15,7 @@ mkdocs-material-1.0.0-rc.1 (2016-XX-XX) * Rewrite of JavaScript using ES6 and Babel as a transpiler * Rewrite of Admonition, Permalinks and Codehilite integration * Rewrite of the complete typographical system + * Rewrite of Gulp asset pipeline in ES6 and separate tasks * Removed Bower as a dependency in favor of npm * Removed custom icon build in favor of the Material Design iconset * Removed _blank targets on links due to vulnerability: http://bit.ly/1Mk2Rtw diff --git a/Gulpfile.babel.js b/Gulpfile.babel.js new file mode 100755 index 000000000..993778c7d --- /dev/null +++ b/Gulpfile.babel.js @@ -0,0 +1,328 @@ +/* + * 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. + */ + +import gulp from "gulp" +import notifier from "node-notifier" +import plumber from "gulp-plumber" +import util from "gulp-util" +import yargs from "yargs" + +/* ---------------------------------------------------------------------------- + * Configuration and arguments + * ------------------------------------------------------------------------- */ + +const config = { + assets: { + src: "src/assets", /* Source directory for assets */ + build: "material/assets" /* Target directory for assets */ + }, + views: { + src: "src", /* Source directory for views */ + build: "material" /* Target directory for views */ + } +} + +const args = yargs + .default("clean", false) /* Clean before build */ + .default("lint", true) /* Lint sources */ + .default("mkdocs", false) /* MkDocs watchdog */ + .default("optimize", true) /* Optimize sources */ + .default("revision", true) /* Revision assets */ + .default("sourcemaps", false) /* Create sourcemaps */ + .argv + +/* ---------------------------------------------------------------------------- + * Overrides and helpers + * ------------------------------------------------------------------------- */ + +/* + * Override gulp.src() for nicer error handling. + */ +const src = gulp.src +gulp.src = (...glob) => { + return src.apply(gulp, glob) + .pipe( + plumber(function(error) { + util.log(util.colors.red( + `Error (${error.plugin}): ${error.message}` + )) + + /* Extract file where error happened, if existent */ + const file = error.relativePath + ? error.relativePath.split("/").pop() + : "" + + /* Dispatch system-level notification */ + notifier.notify({ + title: `Error (${error.plugin}): ${file}`, + message: error.messageOriginal + }) + + // eslint-disable-next-line no-invalid-this + this.emit("end") + + /* Throw error and abort, if not in watch mode */ + if (args._[0] !== "watch") + throw error + })) +} + +/* + * Helper function to load a task + */ +const load = task => { + return require(`./tasks/${task}.js`)(gulp, config, args) +} + +/* ---------------------------------------------------------------------------- + * Images + * ------------------------------------------------------------------------- */ + +/* + * Copy favicon + */ +gulp.task("assets:images:build:ico", + load("assets/images/build/ico")) + +/* + * Copy and minify vector graphics + */ +gulp.task("assets:images:build:svg", + load("assets/images/build/svg")) + +/* + * Copy images + */ +gulp.task("assets:images:build", args.clean ? [ + "assets:images:clean" +] : [], () => { + return gulp.start([ + "assets:images:build:ico", + "assets:images:build:svg" + ]) +}) + +/* + * Clean images generated by build + */ +gulp.task("assets:images:clean", + load("assets/images/clean")) + +/* ---------------------------------------------------------------------------- + * Javascripts + * ------------------------------------------------------------------------- */ + +/* + * Build application logic + */ +gulp.task("assets:javascripts:build:application", + load("assets/javascripts/build/application")) + +/* + * Build custom modernizr + */ +gulp.task("assets:javascripts:build:modernizr", [ + "assets:stylesheets:build" +], load("assets/javascripts/build/modernizr")) + +/* + * Build application logic and modernizr + */ +gulp.task("assets:javascripts:build", (args.clean ? [ + "assets:javascripts:clean" +] : []).concat(args.lint ? [ + "assets:javascripts:lint" +] : []), () => { + gulp.start([ + "assets:javascripts:build:application", + "assets:javascripts:build:modernizr" + ]) +}) + +/* + * Clean javascripts generated by build + */ +gulp.task("assets:javascripts:clean", + load("assets/javascripts/clean")) + +/* + * Lint javascripts + */ +gulp.task("assets:javascripts:lint", + load("assets/javascripts/lint")) + +/* ---------------------------------------------------------------------------- + * Stylesheets + * ------------------------------------------------------------------------- */ + +/* + * Build stylesheets from SASS source + */ +gulp.task("assets:stylesheets:build", (args.clean ? [ + "assets:stylesheets:clean" +] : []).concat(args.lint ? [ + "assets:stylesheets:lint" +] : []), + load("assets/stylesheets/build")) + +/* + * Clean stylesheets generated by build + */ +gulp.task("assets:stylesheets:clean", + load("assets/stylesheets/clean")) + +/* + * Lint SASS sources + */ +gulp.task("assets:stylesheets:lint", + load("assets/stylesheets/lint")) + +/* ---------------------------------------------------------------------------- + * Assets + * ------------------------------------------------------------------------- */ + +/* + * Build assets + */ +gulp.task("assets:build", [ + "assets:images:build", + "assets:javascripts:build", + "assets:stylesheets:build" +]) + +/* + * Clean files generated by build + */ +gulp.task("assets:clean", [ + "assets:images:clean", + "assets:javascripts:clean", + "assets:stylesheets:clean" +]) + +/* ---------------------------------------------------------------------------- + * Views + * ------------------------------------------------------------------------- */ + +/* + * Minify views + */ +gulp.task("views:build", (args.revision ? [ + "assets:images:build", + "assets:stylesheets:build", + "assets:javascripts:build" +] : []).concat(args.clean ? [ + "views:clean" +] : []), load("views/build")) + +/* + * Clean views + */ +gulp.task("views:clean", + load("views/clean")) + +/* ---------------------------------------------------------------------------- + * MkDocs + * ------------------------------------------------------------------------- */ + +/* + * Build documentation + */ +gulp.task("mkdocs:build", [ + "assets:build", + "views:build", + "mkdocs:clean" +], load("mkdocs/build")) + +/* + * Clean documentation build + */ +gulp.task("mkdocs:clean", + load("mkdocs/clean")) + +/* + * Restart MkDocs server + */ +gulp.task("mkdocs:serve", + load("mkdocs/serve")) + +/* ---------------------------------------------------------------------------- + * Interface + * ------------------------------------------------------------------------- */ + +/* + * Build assets and documentation + */ +gulp.task("build", [ + "clean" +], () => { + return gulp.start([ + "assets:build", + "views:build" + ].concat(args.mkdocs + ? "mkdocs:build" + : [])) +}) + +/* + * Clean assets and documentation + */ +gulp.task("clean", [ + "assets:clean", + "views:clean", + "mkdocs:clean" +]) + +/* + * Watch for changes and rebuild assets on the fly + */ +gulp.task("watch", [ + "assets:build", + "views:build" +], () => { + if (args.mkdocs) + gulp.start("mkdocs:serve") + + /* Rebuild stylesheets */ + gulp.watch([ + `${config.assets.src}/stylesheets/**/*.scss` + ], ["assets:stylesheets:build"]) + + /* Rebuild javascripts */ + gulp.watch([ + `${config.assets.src}/javascripts/**/*.js` + ], ["assets:javascripts:build:application"]) + + /* Copy images */ + gulp.watch([ + `${config.assets.src}/images/**/*` + ], ["assets:images:build"]) + + /* Minify views */ + gulp.watch([ + `${config.views.src}/**/*.html` + ], ["views:build"]) +}) + +/* + * Build assets by default + */ +gulp.task("default", ["build"]) diff --git a/Gulpfile.js b/Gulpfile.js deleted file mode 100755 index 586646ddb..000000000 --- a/Gulpfile.js +++ /dev/null @@ -1,434 +0,0 @@ -/* - * 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" - -/* ---------------------------------------------------------------------------- - * Imports - * ------------------------------------------------------------------------- */ - -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 - -/* Watching context */ -var watch = false - -/* ---------------------------------------------------------------------------- - * Overrides - * ------------------------------------------------------------------------- */ - -/* - * Override gulp.src() for nicer error handling. - */ -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 - )) - - /* Extract file where error happened, if existent */ - var file = error.relativePath - ? error.relativePath.split("/").pop() - : "" - - /* Dispatch system-level notification */ - notifier.notify({ - title: "Error (" + error.plugin + "): " + file, - message: error.messageOriginal - }) - this.emit("end") - })) -} - -/* ---------------------------------------------------------------------------- - * Asset pipeline - * ------------------------------------------------------------------------- */ - -/* - * Clean stylesheets generated by build. - */ -gulp.task("assets:clean:stylesheets", () => { - return gulp.src("material/assets/stylesheets/*") - .pipe(vinyl(clean)) -}) - -/* - * Clean javascripts generated by build. - */ -gulp.task("assets:clean:javascripts", () => { - return gulp.src("material/assets/javascripts/*") - .pipe(vinyl(clean)) -}) - -/* - * Clean images generated by build. - */ -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" -]) - -/* - * Build stylesheets from SASS source. - */ -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" - ] - })) - .pipe( - postcss([ - autoprefix(), - mqpacker - ])) - .pipe(gulpif(args.sourcemaps, sourcemaps.write())) - .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")) - .pipe(gulpif(args.production, - rev.manifest("manifest.json", { - base: "material/assets", - merge: true - }))) - .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" -] : [], () => { - return gulp.src("src/assets/javascripts/**/*.js") - .pipe( - stream({ - entry: "application.js", - output: { - filename: "application.js" - }, - module: { - loaders: [{ - loader: "babel-loader", - test: path.join(__dirname, "src/assets/javascripts"), - query: { - presets: "es2015" - } - }, { - test: /\.js$/, - loader: "eslint-loader", - exclude: /node_modules/ - }] - }, - plugins: [ - new webpack.NoErrorsPlugin() - ].concat( - args.production ? [ - new webpack.optimize.UglifyJsPlugin({ - compress: { - warnings: false - } - }) - ] : []), - stats: { - colors: true - }, - resolve: { - modulesDirectories: [ - "src/assets/javascripts", - "node_modules" - ], - extensions: [ - "", ".js" - ] - }, - devtool: args.sourcemaps ? "source-map" : "" - })) - .pipe(gulpif(args.production, rev())) - .pipe(gulp.dest("material/assets/javascripts")) - .pipe(gulpif(args.production, - rev.manifest("manifest.json", { - base: "material/assets", - merge: true - }))) - .pipe(gulpif(args.production, gulp.dest("material/assets"))) -}) - -/* - * Create a customized modernizr build. - */ -gulp.task("assets:build:modernizr", [ - "assets:build:stylesheets", - "assets:build:javascripts" -], () => { - return gulp.src([ - "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 */ - ] - })) - .pipe(concat("modernizr.js")) - .pipe(gulpif(args.production, uglify())) - .pipe(gulpif(args.production, rev())) - .pipe(gulp.dest("material/assets/javascripts")) - .pipe(gulpif(args.production, - rev.manifest("manifest.json", { - base: "material/assets", - merge: true - }))) - .pipe(gulpif(args.production, gulp.dest("material/assets"))) -}) - -/* - * Copy and minify vector graphics. - */ -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(gulpif(args.production, - rev.manifest("manifest.json", { - base: "material/assets", - merge: true - }))) - .pipe(gulpif(args.production, gulp.dest("material/assets"))) -}) - -/* - * Copy favicon. - */ -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" -], () => { - return gulp.start([ - "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" -] : [], () => { - var metadata = require("./package.json") - return gulp.src("src/**/*.html") - .pipe(gulpif(watch, changed("material"))) - .pipe( - minhtml({ - collapseBooleanAttributes: true, - removeComments: true, - removeScriptTypeAttributes: true, - removeStyleLinkTypeAttributes: true, - customAttrCollapse: /(content)/ - })) - .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")) -}) - -/* - * Build assets. - */ -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", () => { - watch = true - - /* Rebuild stylesheets */ - gulp.watch([ - "src/assets/stylesheets/**/*.scss" - ], ["assets:build:stylesheets"]) - - /* Rebuild javascripts */ - gulp.watch([ - "src/assets/javascripts/**/*.js" - ], ["assets:build:javascripts"]) - - /* Copy images */ - gulp.watch([ - "src/assets/images/**/*" - ], ["assets:build:images"]) - - /* Minify views */ - gulp.watch([ - "src/**/*.html" - ], ["assets:build:views"]) -}) - -/* ---------------------------------------------------------------------------- - * Application server - * ------------------------------------------------------------------------- */ - -/* - * Build documentation. - */ -gulp.task("mkdocs:build", [ - "assets:build" -], () => { - return child.spawnSync("mkdocs", ["build"]) -}) - -/* - * Restart MkDocs server. - */ -gulp.task("mkdocs:serve", () => { - if (server) - server.kill() - - /* Spawn MkDocs server */ - server = child.spawn("mkdocs", ["serve", "-a", "0.0.0.0:8000"]) - - /* Pretty print server log output */ - server.stdout.on("data", data => { - var lines = data.toString().split("\n") - for (var l in lines) - if (lines[l].length) - util.log(lines[l]) - }) - - /* Print errors to stdout */ - server.stderr.on("data", data => { - process.stdout.write(data.toString()) - }) -}) - -/* ---------------------------------------------------------------------------- - * Interface - * ------------------------------------------------------------------------- */ - -/* - * Build assets and documentation. - */ -gulp.task("build", [ - "assets:clean", - "assets:build" -].concat(args.mkdocs - ? "mkdocs:build" - : [])) - -/* - * Start asset and MkDocs watchdogs. - */ -gulp.task("watch", [ - "assets:clean", - "assets:build" -], () => { - return gulp.start([ - "assets:watch" - ].concat(args.mkdocs - ? "mkdocs:serve" - : [])) -}) - -/* - * Build assets by default. - */ -gulp.task("default", ["build"]) \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in index 515bad148..3bd56b9c9 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,4 @@ recursive-include material *.ico *.js *.css *.html *.svg -recursive-exclude site * \ No newline at end of file +recursive-exclude site * +recursive-exclude * __pycache__ +recursive-exclude * *.py[co] \ No newline at end of file diff --git a/material/assets/javascripts/application-29b6c4d53e.js b/material/assets/javascripts/application-2ff8f6a9f1.js similarity index 61% rename from material/assets/javascripts/application-29b6c4d53e.js rename to material/assets/javascripts/application-2ff8f6a9f1.js index 332855dd1..4171775bd 100644 --- a/material/assets/javascripts/application-29b6c4d53e.js +++ b/material/assets/javascripts/application-2ff8f6a9f1.js @@ -1,11 +1,11 @@ -!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";/** +var Application=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}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n .md-nav__link");[].forEach.call(i,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(t){var n=(0,u["default"])(function(){(void 0).field("title",{boost:10}),(void 0).field("text"),(void 0).ref("location")}),i={};t.docs.forEach(function(e){e.text=e.text.replace(/\s(\.,\:)\s/gi,function(e,t){return t+" "}),e.location=window.baseUrl+e.location,i[e.location]=e,n.add(e)});var o=document.getElementById("query");o.addEventListener("keyup",function(){for(var t=document.querySelector(".md-search-result__list");t.firstChild;)t.removeChild(t.firstChild);var o=n.search(e.value);o.forEach(function(e){var n=i[e.ref],o=document.createElement("a");o.classList.add("md-search-result__link"),o.href=n.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=n.title,o.appendChild(s);var a=document.createElement("p");a.classList.add("md-search-result__description"),a.innerHTML=n.text,o.appendChild(a),t.appendChild(r)});var r=document.querySelector(".md-search-result__meta");r.innerHTML=o.length+" search result"+(1!==o.length?"s":"")})})["catch"](function(){})}),e.exports=t["default"]},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",/*! +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,u=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),u=a&&/OS [6-7]_\d/.test(navigator.userAgent),l=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,l=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,u&&(r=e.changedTouches[0],l=document.elementFromPoint(r.pageX-window.pageXOffset,r.pageY-window.pageYOffset)||l,l.fastClickScrollParent=this.targetElement.fastClickScrollParent),i=l.tagName.toLowerCase(),"label"===i){if(t=this.findControl(l)){if(this.focus(l),s)return!1;l=t}}else if(this.needsFocus(l))return e.timeStamp-n>100||a&&window.top!==window&&"input"===i?(this.targetElement=null,!1):(this.focus(l),this.sendClick(l,e),a&&"select"===i||(this.targetElement=null,e.preventDefault()),!1);return!(!a||c||(o=l.fastClickScrollParent,!o||o.fastClickLastScrollTop===o.scrollTop))||(this.needsClick(l)||(e.preventDefault(),this.sendClick(l,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(l&&(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 */ @@ -33,7 +33,7 @@ r.SortedSet=function(){this.length=0,this.elements=[]},r.SortedSet.load=function * lunr.Index * Copyright (C) 2016 Oliver Nightingale */ -r.Index=function(){this._fields=[],this._ref="id",this.pipeline=new r.Pipeline,this.documentStore=new r.Store,this.tokenStore=new r.TokenStore,this.corpusTokens=new r.SortedSet,this.eventEmitter=new r.EventEmitter,this.tokenizerFn=r.tokenizer,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},r.Index.prototype.on=function(){var e=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,e)},r.Index.prototype.off=function(e,t){return this.eventEmitter.removeListener(e,t)},r.Index.load=function(e){e.version!==r.version&&r.utils.warn("version mismatch: current "+r.version+" importing "+e.version);var t=new this;return t._fields=e.fields,t._ref=e.ref,t.tokenizer=r.tokenizer.load(e.tokenizer),t.documentStore=r.Store.load(e.documentStore),t.tokenStore=r.TokenStore.load(e.tokenStore),t.corpusTokens=r.SortedSet.load(e.corpusTokens),t.pipeline=r.Pipeline.load(e.pipeline),t},r.Index.prototype.field=function(e,t){var t=t||{},n={name:e,boost:t.boost||1};return this._fields.push(n),this},r.Index.prototype.ref=function(e){return this._ref=e,this},r.Index.prototype.tokenizer=function(e){var t=e.label&&e.label in r.tokenizer.registeredFunctions;return t||r.utils.warn("Function is not a registered tokenizer. This may cause problems when serialising the index"),this.tokenizerFn=e,this},r.Index.prototype.add=function(e,t){var n={},i=new r.SortedSet,o=e[this._ref],t=void 0===t||t;this._fields.forEach(function(t){var o=this.pipeline.run(this.tokenizerFn(e[t.name]));n[t.name]=o;for(var r=0;r0&&(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&&(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,u=this.tokenStore.expand(e).reduce(function(t,i){var o=c.corpusTokens.indexOf(i),s=c.idf(i),u=1,l=new r.SortedSet;if(i!==e){var d=Math.max(3,i.length-e.length);u=1/Math.log(d)}o>-1&&n.insert(o,a*s*u);for(var h=c.tokenStore.get(i),f=Object.keys(h),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 +r.TokenStore=function(){this.root={docs:{}},this.length=0},r.TokenStore.load=function(e){var t=new this;return t.root=e.root,t.length=e.length,t},r.TokenStore.prototype.add=function(e,t,n){var n=n||this.root,i=e.charAt(0),o=e.slice(1);return i in n||(n[i]={docs:{}}),0===o.length?(n[i].docs[t.ref]=t,void(this.length+=1)):this.add(o,t,n[i])},r.TokenStore.prototype.has=function(e){if(!e)return!1;for(var t=this.root,n=0;n0&&(this.els_[e-1].dataset.mdMarked=!0),this.index_=e;else for(var t=this.index_;t>=0;t--){if(!(this.anchors_[t].offsetTop>window.pageYOffset)){this.index_=t;break}t>0&&delete this.els_[t-1].dataset.mdMarked}this.offset_=window.pageYOffset}},{key:"reset",value:function(){[].forEach.call(this.els_,function(e){delete e.dataset.mdMarked})}}]),t}(u["default"]);t["default"]=l,e.exports=t["default"]},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=9,s=t<533&&e.match(/android/gi);return n||s||r}();P?S.addTest("fontface",!1):E('@font-face {font-family:"font";src:url("https://")}',function(e,n){var r=t.getElementById("smodernizr"),s=r.sheet||r.styleSheet,o=s?s.cssRules&&s.cssRules[0]?s.cssRules[0].cssText:s.cssText||"":"",i=/src/i.test(o)&&0===o.indexOf(n.split(" ")[0]);S.addTest("fontface",i)});var z="Moz O ms Webkit",N=C._config.usePrefixes?z.split(" "):[];C._cssomPrefixes=N;var j={elem:a("modernizr")};S._q.push(function(){delete j.elem});var k={style:j.elem.style};S._q.unshift(function(){delete k.style});var R=C._config.usePrefixes?z.toLowerCase().split(" "):[];C._domPrefixes=R,C.testAllProps=v,C.testAllProps=y;var A="CSS"in e&&"supports"in e.CSS,q="supportsCSS"in e;S.addTest("supports",A||q),S.addTest("csstransforms3d",function(){var e=!!y("perspective","1px",!0),t=S._config.usePrefixes;if(e&&(!t||"webkitPerspective"in b.style)){var n,r="#modernizr{width:0;height:0}";S.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}}",E(r+n,function(t){e=7===t.offsetWidth&&18===t.offsetHeight})}return e}),s(),o(x),delete C.addTest,delete C.addAsyncTest;for(var L=0;Lcode{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[data-md-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[data-md-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[data-md-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[data-md-locked]{margin-left:120rem}} \ No newline at end of file diff --git a/material/assets/stylesheets/application-bcbe056a5b.css b/material/assets/stylesheets/application-bcbe056a5b.css deleted file mode 100644 index 1f72f18cd..000000000 --- a/material/assets/stylesheets/application-bcbe056a5b.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"}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}.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/base.html b/material/base.html index 109fe6428..230d7e5eb 100644 --- a/material/base.html +++ b/material/base.html @@ -20,11 +20,11 @@ {% endif %} - + - + {% for path in extra_css %} {% endfor %} @@ -39,7 +39,7 @@
    {% set h1 = "\x3ch1 id=" in content %} {% if nav %} -
    +
    {% include "partials/nav.html" %} @@ -48,7 +48,7 @@
    {% endif %} {% if toc %} -
    +
    {% include "partials/toc.html" %} @@ -87,11 +87,19 @@ {% include "partials/footer.html" %}
    + - {% for path in extra_javascript %} {% endfor %} diff --git a/package.json b/package.json index 61ef6921b..7a67b6864 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,9 @@ "license": "MIT", "main": "Gulpfile.js", "scripts": { - "start": "./node_modules/.bin/gulp watch --mkdocs", - "build": "./node_modules/.bin/gulp build --production" + "start": "./node_modules/.bin/gulp watch --mkdocs --no-lint --no-revision", + "build": "./node_modules/.bin/gulp build --clean", + "clean": "./node_modules/.bin/gulp clean" }, "repository": { "type": "git", @@ -29,11 +30,11 @@ "autoprefixer": "^6.3.2", "babel-eslint": "^6.1.2", "babel-loader": "^6.2.4", + "babel-plugin-add-module-exports": "^0.2.1", "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-changed": "^1.3.2", "gulp-concat": "^2.6.0", @@ -49,12 +50,13 @@ "gulp-rev": "^7.0.0", "gulp-rev-replace": "^0.4.3", "gulp-sass": "^2.2.0", - "gulp-sass-lint": "^1.2.0", "gulp-sourcemaps": "^1.6.0", "gulp-svgmin": "^1.2.2", "gulp-uglify": "^1.5.2", "gulp-util": "^3.0.7", "node-notifier": "^4.5.0", + "sass-lint": "^1.9.1", + "through2": "^2.0.1", "vinyl-paths": "^2.1.0", "webpack": "^1.13.1", "webpack-stream": "^3.2.0", diff --git a/src/assets/javascripts/application.js b/src/assets/javascripts/application.js index cd2b8f197..bf9a942fc 100644 --- a/src/assets/javascripts/application.js +++ b/src/assets/javascripts/application.js @@ -28,8 +28,8 @@ import FastClick from "fastclick" import lunr from "lunr" // import Expander from "./components/expander" -import Sidebar from "./components/sidebar" -import ScrollSpy from "./components/scrollspy" + +import Material from "./components/Material" // import Search from './components/search'; @@ -37,6 +37,22 @@ import ScrollSpy from "./components/scrollspy" * Application * ------------------------------------------------------------------------- */ +class Application { + + /** + * @return {void} + */ + initialize() { + const material = new Material() + material.initialize() + } +} + +export default Application + +// TODO: wrap in function call +// application module export + /* Initialize application upon DOM ready */ document.addEventListener("DOMContentLoaded", () => { @@ -53,27 +69,6 @@ document.addEventListener("DOMContentLoaded", () => { /* Attack FastClick to mitigate 300ms delay on touch devices */ FastClick.attach(document.body) - const width = window.matchMedia("(min-width: 1200px)") - - const sidebar = new Sidebar(".md-sidebar--primary") - const handler = function() { - if (width.matches) { - sidebar.listen() - } else { - sidebar.unlisten() - } - } - handler() // check listen! - - const toc = new Sidebar(".md-sidebar--secondary") - toc.listen() - - const spy = - new ScrollSpy(".md-sidebar--secondary .md-nav--secondary .md-nav__link") - spy.listen() - - window.addEventListener("resize", handler) - const query = document.getElementById("query") query.addEventListener("focus", () => { document.querySelector(".md-search").classList.add("md-js__search--locked") @@ -230,7 +225,7 @@ document.addEventListener("DOMContentLoaded", () => { /* Create index */ const index = lunr(() => { /* eslint-disable no-invalid-this, lines-around-comment */ - this.field("title", {boost: 10}) + this.field("title", { boost: 10 }) this.field("text") this.ref("location") /* eslint-enable no-invalid-this, lines-around-comment */ diff --git a/src/assets/javascripts/components/Material.js b/src/assets/javascripts/components/Material.js new file mode 100644 index 000000000..780aaee46 --- /dev/null +++ b/src/assets/javascripts/components/Material.js @@ -0,0 +1,73 @@ +/* + * 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. + */ + +import Sidebar from "./Material/Sidebar" + +/* ---------------------------------------------------------------------------- + * Material application + * ------------------------------------------------------------------------- */ + +export default +class Material { + + /** + * Constructor + * + * @constructor + */ + // constructor() { + // + // } + + /** + * @return {void} + */ + initialize() { + + // class AnchorMarker extends PageYOffsetListener + // class SidebarConstrainer extends PageYOffsetListener + + // MatchMedia!? + + const width = window.matchMedia("(min-width: 1200px)") + + // separate function in application.js --> initSidebar() + const sidebar = new Sidebar.Position("[data-md-sidebar=primary]") + const handler = function() { + if (width.matches) { + sidebar.listen() + } else { + sidebar.unlisten() + } + } + handler() // check listen! + + const toc = new Sidebar.Position("[data-md-sidebar=secondary]") + toc.listen() + + window.addEventListener("resize", handler) // TODO: orientation change etc... + + const marker = + new Sidebar.Marker("[data-md-sidebar=secondary] .md-nav__link") + marker.listen() + } +} diff --git a/src/assets/javascripts/components/Material/Sidebar.js b/src/assets/javascripts/components/Material/Sidebar.js new file mode 100644 index 000000000..28aa892be --- /dev/null +++ b/src/assets/javascripts/components/Material/Sidebar.js @@ -0,0 +1,33 @@ +/* + * 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. + */ + +import Marker from "./Sidebar/Marker" +import Position from "./Sidebar/Position" + +/* ---------------------------------------------------------------------------- + * Definition + * ------------------------------------------------------------------------- */ + +export default { + Marker, + Position +} diff --git a/src/assets/javascripts/components/Material/Sidebar/Abstract.js b/src/assets/javascripts/components/Material/Sidebar/Abstract.js new file mode 100644 index 000000000..d1d172cad --- /dev/null +++ b/src/assets/javascripts/components/Material/Sidebar/Abstract.js @@ -0,0 +1,94 @@ +/* + * 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. + */ + +/* ---------------------------------------------------------------------------- + * Definition + * ------------------------------------------------------------------------- */ + +export default +class Abstract { + + /** + * Dispatch update on next repaint + * + * @constructor + */ + constructor() { + // if (new.target === this.constructor) + // throw new TypeError("Cannot construct abstract instance") + + /* Dispatch update on next repaint */ + this.handler_ = ev => { + window.requestAnimationFrame(() => { + this.update(ev) + }) + } + } + + /** + * Update state + * + * @abstract + * @return {void} + */ + update() { + throw new Error("update(): not implemented") + } + + /** + * Reset state + * + * @abstract + * @return {void} + */ + reset() { + throw new Error("reset(): not implemented") + } + + /** + * 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) + }) + + /* Final reset */ + this.reset() + } +} diff --git a/src/assets/javascripts/components/Material/Sidebar/Marker.js b/src/assets/javascripts/components/Material/Sidebar/Marker.js new file mode 100644 index 000000000..b6962d498 --- /dev/null +++ b/src/assets/javascripts/components/Material/Sidebar/Marker.js @@ -0,0 +1,103 @@ +/* + * 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. + */ + +import Abstract from "./Abstract" + +/* ---------------------------------------------------------------------------- + * Definition + * ------------------------------------------------------------------------- */ + +export default +class Marker extends Abstract { + + /** + * Mark anchors within the table of contents above current page y-offset + * + * @constructor + * @param {(string|HTMLCollection)} els - Selector or HTML elements + */ + constructor(els) { + super() + + /* Resolve elements */ + this.els_ = (typeof els === "string") + ? document.querySelectorAll(els) + : els + + /* Initialize index and page y-offset */ + this.index_ = 0 + this.offset_ = window.pageYOffset + + /* Index anchor nodes for fast lookup */ + this.anchors_ = [].map.call(this.els_, el => { + return document.querySelector(el.hash) + }) + } + + /** + * Update anchor states + * + * @param {Event} ev - Event (omitted) + * @return {void} + */ + update() { + + /* Scroll direction is down */ + if (this.offset_ <= window.pageYOffset) { + for (let i = this.index_ + 1; i < this.els_.length; i++) { + if (this.anchors_[i].offsetTop <= window.pageYOffset) { + if (i > 0) + this.els_[i - 1].dataset.mdMarked = true + this.index_ = i + } else { + break + } + } + + /* Scroll direction is up */ + } else { + for (let i = this.index_; i >= 0; i--) { + if (this.anchors_[i].offsetTop > window.pageYOffset) { + if (i > 0) + delete this.els_[i - 1].dataset.mdMarked + } else { + this.index_ = i + break + } + } + } + + /* Remember current offset for next iteration */ + this.offset_ = window.pageYOffset + } + + /** + * Reset anchor states + * + * @return {void} + */ + reset() { + [].forEach.call(this.els_, el => { + delete el.dataset.mdMarked + }) + } +} diff --git a/src/assets/javascripts/components/Material/Sidebar/Position.js b/src/assets/javascripts/components/Material/Sidebar/Position.js new file mode 100644 index 000000000..fca2fc16e --- /dev/null +++ b/src/assets/javascripts/components/Material/Sidebar/Position.js @@ -0,0 +1,103 @@ +/* + * 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. + */ + +import Abstract from "./Abstract" + +/* ---------------------------------------------------------------------------- + * Definition + * ------------------------------------------------------------------------- */ + +export default +class Position extends Abstract { + + /** + * Set sidebars to locked state and limit height to parent node + * + * @constructor + * @param {(string|HTMLElement)} el - Selector or HTML element + */ + constructor(el) { + super() + + /* Resolve elements */ + this.el_ = (typeof el === "string") + ? document.querySelector(el) + : el + + /* Index inner and outer container */ + this.inner_ = this.el_.parentNode + this.outer_ = this.el_.parentNode.parentNode + + /* Initialize current height */ + this.height_ = 0 + } + + /** + * Update locked state and height + * + * @param {Event} ev - Event (omitted) + * @return {void} + */ + update() { + const bounds = this.inner_.getBoundingClientRect() // TODO: thresholds can be calculated as a function + const parent = this.outer_.offsetTop + + /* Determine top and bottom offsets */ + const top = bounds.top + window.pageYOffset, + bottom = bounds.bottom + window.pageYOffset + + /* Determine current y-offset at top and bottom of window */ + const upper = window.pageYOffset, + lower = window.pageYOffset + window.innerHeight + + /* Calculate new bounds */ + 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` + + /* Sidebar should be locked, as we're below parent offset */ + if (offset < parent) { + if (!this.el_.dataset.mdLocked) + this.el_.dataset.mdLocked = true + + /* Sidebar should be unlocked, if locked */ + } else if (this.el_.dataset.mdLocked) { + delete this.el_.dataset.mdLocked + } + } + + /** + * Reset locked state and height + * + * @return {void} + */ + reset() { + delete this.el_.dataset.mdLocked + this.el_.style.height = "" + this.height_ = 0 + } +} diff --git a/src/assets/javascripts/components/scrollspy.js b/src/assets/javascripts/components/scrollspy.js index bd43d22f5..a88021dc4 100644 --- a/src/assets/javascripts/components/scrollspy.js +++ b/src/assets/javascripts/components/scrollspy.js @@ -24,23 +24,29 @@ * Sidebar scroll-spy * ------------------------------------------------------------------------- */ +export default class ScrollSpy { /** * Constructor * * @constructor - * @param {(string|HTMLCollection)} el - Selector or HTML elements + * @param {(string|HTMLCollection)} els - Selector or HTML elements */ - constructor(el) { - this.el_ = (typeof el === "string") - ? document.querySelectorAll(el) - : el + constructor(els) { + this.els_ = (typeof els === "string") + ? document.querySelectorAll(els) + : els /* Initialize index for currently active element */ - this.index_ = 0 + this.index_ = 0 this.offset_ = window.pageYOffset + /* Index anchor nodes for fast lookup */ + this.anchors_ = [].map.call(this.els_, el => { + return document.querySelector(el.hash) + }) + /* Event listener */ this.handler_ = ev => { this.update(ev) @@ -48,7 +54,7 @@ class ScrollSpy { } /** - * Update state of sidebar and hash + * Update state of sidebar * * @param {Event} ev - Event (omitted) * @return {void} @@ -57,11 +63,10 @@ class ScrollSpy { /* Scroll direction is down */ if (this.offset_ <= window.pageYOffset) { - for (let i = this.index_ + 1; i < this.el_.length; i++) { - const anchor = document.querySelector(this.el_[i].hash) // TODO: improve performance by caching - if (anchor.offsetTop <= window.pageYOffset) { + for (let i = this.index_ + 1; i < this.els_.length; i++) { + if (this.anchors_[i].offsetTop <= window.pageYOffset) { if (i > 0) - this.el_[i - 1].classList.add("md-nav__link--marked") + this.els_[i - 1].dataset.mdMarked = true this.index_ = i } else { break @@ -71,10 +76,9 @@ class ScrollSpy { /* Scroll direction is up */ } else { for (let i = this.index_; i >= 0; i--) { - const anchor = document.querySelector(this.el_[i].hash) - if (anchor.offsetTop > window.pageYOffset) { + if (this.anchors_[i].offsetTop > window.pageYOffset) { if (i > 0) - this.el_[i - 1].classList.remove("md-nav__link--marked") + delete this.els_[i - 1].dataset.mdMarked } else { this.index_ = i break @@ -92,8 +96,8 @@ class ScrollSpy { * @return {void} */ reset() { - [].forEach.call(this.el_, el => { - el.classList.remove("md-nav__link--marked") + [].forEach.call(this.els_, el => { + delete el.dataset.mdMarked }) } @@ -125,9 +129,3 @@ class ScrollSpy { this.reset() } } - -/* ---------------------------------------------------------------------------- - * Exports - * ------------------------------------------------------------------------- */ - -export default ScrollSpy diff --git a/src/assets/javascripts/components/search.js b/src/assets/javascripts/components/search.js index 40fb7c92c..9a24b30cf 100644 --- a/src/assets/javascripts/components/search.js +++ b/src/assets/javascripts/components/search.js @@ -20,8 +20,6 @@ * IN THE SOFTWARE. */ -"use strict" - /* ---------------------------------------------------------------------------- * Search * ------------------------------------------------------------------------- */ diff --git a/src/assets/stylesheets/_config.scss b/src/assets/stylesheets/_config.scss index 21160a4ce..bb777f41e 100644 --- a/src/assets/stylesheets/_config.scss +++ b/src/assets/stylesheets/_config.scss @@ -21,7 +21,7 @@ //// // ---------------------------------------------------------------------------- -// Typography +// Variables: typography // ---------------------------------------------------------------------------- // Modular typographic scale @@ -29,7 +29,7 @@ $ms-base: 1.6rem; $ms-ratio: $major-third; // ---------------------------------------------------------------------------- -// Breakpoints +// Variables: breakpoints // ---------------------------------------------------------------------------- // Device-specific breakpoints @@ -50,7 +50,7 @@ $break-devices: ( ); // ---------------------------------------------------------------------------- -// Colors +// Variables: base colors // ---------------------------------------------------------------------------- // Primary and accent colors @@ -70,7 +70,7 @@ $md-color-white--lighter: hsla(0, 0%, 100%, 0.30); $md-color-white--lightest: hsla(0, 0%, 100%, 0.12); // ---------------------------------------------------------------------------- -// Sizing and spacing +// Variables: sizing and spacing // ---------------------------------------------------------------------------- // Icons diff --git a/src/assets/stylesheets/_shame.scss b/src/assets/stylesheets/_shame.scss index 87575c9f8..149df7d3e 100644 --- a/src/assets/stylesheets/_shame.scss +++ b/src/assets/stylesheets/_shame.scss @@ -21,7 +21,7 @@ //// // ---------------------------------------------------------------------------- -// Nothing to see here, move along +// Rules // ---------------------------------------------------------------------------- @include break-from-device(screen) { diff --git a/src/assets/stylesheets/application.scss b/src/assets/stylesheets/application.scss index a17696487..e7519e3f7 100644 --- a/src/assets/stylesheets/application.scss +++ b/src/assets/stylesheets/application.scss @@ -29,7 +29,7 @@ @import "material-shadows"; // ---------------------------------------------------------------------------- -// Application +// Local imports // ---------------------------------------------------------------------------- @import "helpers/break"; @@ -37,8 +37,8 @@ @import "config"; -@import "base/icons"; @import "base/reset"; +@import "base/icons"; @import "base/typeset"; @import "layout/base"; diff --git a/src/assets/stylesheets/base/_icons.scss b/src/assets/stylesheets/base/_icons.scss index 69236a55a..65c06c4d7 100644 --- a/src/assets/stylesheets/base/_icons.scss +++ b/src/assets/stylesheets/base/_icons.scss @@ -21,7 +21,7 @@ //// // ---------------------------------------------------------------------------- -// Icon set +// Rules // ---------------------------------------------------------------------------- // Icon placeholders diff --git a/src/assets/stylesheets/base/_reset.scss b/src/assets/stylesheets/base/_reset.scss index 8af839b34..f2240d59c 100644 --- a/src/assets/stylesheets/base/_reset.scss +++ b/src/assets/stylesheets/base/_reset.scss @@ -21,7 +21,7 @@ //// // ---------------------------------------------------------------------------- -// Resets +// Rules // ---------------------------------------------------------------------------- // Enfore correct box model - the prefixed versions are necessary for older diff --git a/src/assets/stylesheets/base/_typeset.scss b/src/assets/stylesheets/base/_typeset.scss index 824c2e1e2..d747c9340 100644 --- a/src/assets/stylesheets/base/_typeset.scss +++ b/src/assets/stylesheets/base/_typeset.scss @@ -21,7 +21,7 @@ //// // ---------------------------------------------------------------------------- -// Font definitions +// Rules: font definitions // ---------------------------------------------------------------------------- // Default fonts @@ -57,7 +57,7 @@ kbd { } // ---------------------------------------------------------------------------- -// Typeset +// Rules: typesetted content // ---------------------------------------------------------------------------- // Content that is typeset diff --git a/src/assets/stylesheets/extensions/_admonition.scss b/src/assets/stylesheets/extensions/_admonition.scss index b3dbf8aaf..6440f2cc8 100644 --- a/src/assets/stylesheets/extensions/_admonition.scss +++ b/src/assets/stylesheets/extensions/_admonition.scss @@ -21,10 +21,10 @@ //// // ---------------------------------------------------------------------------- -// Admonition extension +// Rules // ---------------------------------------------------------------------------- -// Admonition +// Admonition extension .admonition { position: relative; margin: 2.0rem 0; diff --git a/src/assets/stylesheets/extensions/_codehilite.scss b/src/assets/stylesheets/extensions/_codehilite.scss index 5e984af54..dfa800f91 100644 --- a/src/assets/stylesheets/extensions/_codehilite.scss +++ b/src/assets/stylesheets/extensions/_codehilite.scss @@ -21,10 +21,10 @@ //// // ---------------------------------------------------------------------------- -// Codehilite extension +// Rules // ---------------------------------------------------------------------------- -// Github-style syntax highlighting +// Codehilite extension .codehilite, .code { diff --git a/src/assets/stylesheets/extensions/_footnotes.scss b/src/assets/stylesheets/extensions/_footnotes.scss index a13e028ba..4c0208573 100644 --- a/src/assets/stylesheets/extensions/_footnotes.scss +++ b/src/assets/stylesheets/extensions/_footnotes.scss @@ -21,10 +21,10 @@ //// // ---------------------------------------------------------------------------- -// Footnotes extension +// Rules // ---------------------------------------------------------------------------- -// Footnote +// Footnotes extension .footnote { color: $md-color-black--light; font-size: 80%; diff --git a/src/assets/stylesheets/extensions/_permalinks.scss b/src/assets/stylesheets/extensions/_permalinks.scss index 4b6b5bafe..d2aec1921 100644 --- a/src/assets/stylesheets/extensions/_permalinks.scss +++ b/src/assets/stylesheets/extensions/_permalinks.scss @@ -21,13 +21,13 @@ //// // ---------------------------------------------------------------------------- -// Permalinks extension +// Rules // ---------------------------------------------------------------------------- // Scoped in typesetted content for greater specificity .md-typeset { - // Permalink + // Permalinks extension .headerlink { display: inline-block; margin-left: 1.0rem; diff --git a/src/assets/stylesheets/helpers/_break.scss b/src/assets/stylesheets/helpers/_break.scss index 6c03daea7..34d024f5b 100644 --- a/src/assets/stylesheets/helpers/_break.scss +++ b/src/assets/stylesheets/helpers/_break.scss @@ -51,7 +51,7 @@ $break-devices: () !default; // ---------------------------------------------------------------------------- -// Breakpoint helpers +// Helpers // ---------------------------------------------------------------------------- /// @@ -115,7 +115,7 @@ $break-devices: () !default; } // ---------------------------------------------------------------------------- -// Breakpoint mixins +// Mixins // ---------------------------------------------------------------------------- /// diff --git a/src/assets/stylesheets/helpers/_px2em.scss b/src/assets/stylesheets/helpers/_px2em.scss index 0756797c4..46a49f963 100644 --- a/src/assets/stylesheets/helpers/_px2em.scss +++ b/src/assets/stylesheets/helpers/_px2em.scss @@ -21,7 +21,7 @@ //// // ---------------------------------------------------------------------------- -// Pixel conversion helpers +// Helpers // ---------------------------------------------------------------------------- /// diff --git a/src/assets/stylesheets/layout/_base.scss b/src/assets/stylesheets/layout/_base.scss index 6882c31c9..e97c6c80b 100644 --- a/src/assets/stylesheets/layout/_base.scss +++ b/src/assets/stylesheets/layout/_base.scss @@ -21,7 +21,7 @@ //// // ---------------------------------------------------------------------------- -// Grid +// Rules: base grid and containers // ---------------------------------------------------------------------------- // Stretch container to viewport and set base font-size to 10px for simple @@ -87,7 +87,7 @@ hr { } // ---------------------------------------------------------------------------- -// Navigational elements +// Rules: navigational elements // ---------------------------------------------------------------------------- // Toggle checkbox @@ -124,7 +124,7 @@ hr { } // ---------------------------------------------------------------------------- -// Flexible elements, implemented with table layout +// Rules: flexible elements, implemented with table layout // ---------------------------------------------------------------------------- // Flexible layout container diff --git a/src/assets/stylesheets/layout/_content.scss b/src/assets/stylesheets/layout/_content.scss index aa6b40ed0..15e6b62d1 100644 --- a/src/assets/stylesheets/layout/_content.scss +++ b/src/assets/stylesheets/layout/_content.scss @@ -21,7 +21,7 @@ //// // ---------------------------------------------------------------------------- -// Main content +// Rules // ---------------------------------------------------------------------------- // Content container diff --git a/src/assets/stylesheets/layout/_footer.scss b/src/assets/stylesheets/layout/_footer.scss index dc852d715..b89ce2a43 100644 --- a/src/assets/stylesheets/layout/_footer.scss +++ b/src/assets/stylesheets/layout/_footer.scss @@ -21,7 +21,7 @@ //// // ---------------------------------------------------------------------------- -// Footer +// Rules // ---------------------------------------------------------------------------- // Application footer diff --git a/src/assets/stylesheets/layout/_header.scss b/src/assets/stylesheets/layout/_header.scss index 1b8a4c836..912119be1 100644 --- a/src/assets/stylesheets/layout/_header.scss +++ b/src/assets/stylesheets/layout/_header.scss @@ -21,7 +21,7 @@ //// // ---------------------------------------------------------------------------- -// Header +// Rules // ---------------------------------------------------------------------------- // Application header (stays always on top) diff --git a/src/assets/stylesheets/layout/_nav.scss b/src/assets/stylesheets/layout/_nav.scss index 82b7b13c2..959b146fb 100644 --- a/src/assets/stylesheets/layout/_nav.scss +++ b/src/assets/stylesheets/layout/_nav.scss @@ -21,10 +21,10 @@ //// // ---------------------------------------------------------------------------- -// Navigation +// Rules // ---------------------------------------------------------------------------- -// Nested navigation +// Navigation container .md-nav { font-size: ms(-1); line-height: 1.3; @@ -113,7 +113,7 @@ } // Marked item - &--marked { + &[data-md-marked] { color: $md-color-black--light; } diff --git a/src/assets/stylesheets/layout/_search.scss b/src/assets/stylesheets/layout/_search.scss index b818ff868..28b32429a 100644 --- a/src/assets/stylesheets/layout/_search.scss +++ b/src/assets/stylesheets/layout/_search.scss @@ -21,10 +21,10 @@ //// // ---------------------------------------------------------------------------- -// Search +// Rules // ---------------------------------------------------------------------------- -// Application search +// Search container .md-search { padding: 0.8rem 0.8rem 0; diff --git a/src/assets/stylesheets/layout/_sidebar.scss b/src/assets/stylesheets/layout/_sidebar.scss index ceff9d385..dfece0192 100644 --- a/src/assets/stylesheets/layout/_sidebar.scss +++ b/src/assets/stylesheets/layout/_sidebar.scss @@ -21,10 +21,10 @@ //// // ---------------------------------------------------------------------------- -// Sidebar +// Rules // ---------------------------------------------------------------------------- -// Sidebar content +// Sidebar container .md-sidebar { position: relative; width: 24.2rem; @@ -32,7 +32,7 @@ overflow: visible; // Lock sidebar to container height (account for fixed header) - &.md-js__sidebar--locked { + &[data-md-locked] { position: fixed; top: 5.6rem; } @@ -87,7 +87,7 @@ float: right; // Hack: align right in case of locked sidebar - &.md-js__sidebar--locked { + &[data-md-locked] { margin-left: 100%; transform: translate(-100%, 0); diff --git a/src/assets/stylesheets/layout/_source.scss b/src/assets/stylesheets/layout/_source.scss index d0d485e64..80c0e5799 100644 --- a/src/assets/stylesheets/layout/_source.scss +++ b/src/assets/stylesheets/layout/_source.scss @@ -21,10 +21,10 @@ //// // ---------------------------------------------------------------------------- -// Source +// Rules // ---------------------------------------------------------------------------- -// Repository containing source +// Source container .md-source { display: block; transition: opacity 0.25s; diff --git a/src/base.html b/src/base.html index 9d8d23672..617cc9c84 100644 --- a/src/base.html +++ b/src/base.html @@ -65,7 +65,7 @@ + href="https://fonts.googleapis.com/icon?family=Material+Icons" /> {% if nav %} -
    +
    {% include "partials/nav.html" %} @@ -116,7 +117,8 @@ {% if toc %} -
    +
    {% include "partials/toc.html" %} @@ -169,11 +171,21 @@
    - + {% for path in extra_javascript %} {% endfor %} diff --git a/tasks/assets/images/build/ico.js b/tasks/assets/images/build/ico.js new file mode 100644 index 000000000..250d427b6 --- /dev/null +++ b/tasks/assets/images/build/ico.js @@ -0,0 +1,35 @@ +/* + * 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. + */ + +import changed from "gulp-changed" + +/* ---------------------------------------------------------------------------- + * Task: clean images generated by build + * ------------------------------------------------------------------------- */ + +export default (gulp, config) => { + return () => { + return gulp.src(`${config.assets.src}/images/**/*.ico`) + .pipe(changed(`${config.assets.build}/images`)) + .pipe(gulp.dest(`${config.assets.build}/images`)) + } +} diff --git a/tasks/assets/images/build/svg.js b/tasks/assets/images/build/svg.js new file mode 100644 index 000000000..5b3688a75 --- /dev/null +++ b/tasks/assets/images/build/svg.js @@ -0,0 +1,49 @@ +/* + * 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. + */ + +import changed from "gulp-changed" +import gulpif from "gulp-if" +import minsvg from "gulp-svgmin" +import rev from "gulp-rev" +import version from "gulp-rev-replace" + +/* ---------------------------------------------------------------------------- + * Task: clean images generated by build + * ------------------------------------------------------------------------- */ + +export default (gulp, config, args) => { + return () => { + return gulp.src(`${config.assets.src}/images/**/*.svg`) + .pipe(changed(`${config.assets.build}/images`)) + .pipe(gulpif(args.optimize, minsvg())) + .pipe(gulpif(args.revision, rev())) + .pipe(gulpif(args.revision, + version({ manifest: gulp.src("manifest.json") }))) + .pipe(gulp.dest(`${config.assets.build}/images`)) + .pipe(gulpif(args.revision, + rev.manifest("manifest.json", { + base: config.assets.build, + merge: true + }))) + .pipe(gulpif(args.revision, gulp.dest(config.assets.build))) + } +} diff --git a/tasks/assets/images/clean.js b/tasks/assets/images/clean.js new file mode 100644 index 000000000..969f6302c --- /dev/null +++ b/tasks/assets/images/clean.js @@ -0,0 +1,35 @@ +/* + * 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. + */ + +import clean from "del" +import vinyl from "vinyl-paths" + +/* ---------------------------------------------------------------------------- + * Task: clean images generated by build + * ------------------------------------------------------------------------- */ + +export default (gulp, config) => { + return () => { + return gulp.src(`${config.assets.build}/images/*`) + .pipe(vinyl(clean)) + } +} diff --git a/tasks/assets/javascripts/build/application.js b/tasks/assets/javascripts/build/application.js new file mode 100644 index 000000000..0307b1366 --- /dev/null +++ b/tasks/assets/javascripts/build/application.js @@ -0,0 +1,90 @@ +/* + * 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. + */ + +import gulpif from "gulp-if" +import path from "path" +import rev from "gulp-rev" +import stream from "webpack-stream" +import version from "gulp-rev-replace" +import webpack from "webpack" + +/* ---------------------------------------------------------------------------- + * Task: build application logic + * ------------------------------------------------------------------------- */ + +export default (gulp, config, args) => { + return () => { + return gulp.src(`${config.assets.src}/javascripts/**/*.js`) + + /* Transpile with webpack */ + .pipe( + stream({ + entry: "application.js", + output: { + filename: "application.js", + library: "Application" + }, + module: { + loaders: [ + { + loader: "babel-loader", + test: path.join(process.cwd(), + `${config.assets.src}/javascripts`) + } + ] + }, + plugins: [ + new webpack.NoErrorsPlugin() + ].concat( + args.optimize ? [ + new webpack.optimize.UglifyJsPlugin({ + compress: { + warnings: false + } + }) + ] : []), + stats: { + colors: true + }, + resolve: { + modulesDirectories: [ + "src/assets/javascripts", + "node_modules" + ], + extensions: [ + "", ".js" + ] + }, + devtool: args.sourcemaps ? "source-map" : "" + })) + .pipe(gulpif(args.revision, rev())) + .pipe(gulpif(args.revision, + version({ manifest: gulp.src("manifest.json") }))) + .pipe(gulp.dest(`${config.assets.build}/javascripts`)) + .pipe(gulpif(args.revision, + rev.manifest("manifest.json", { + base: config.assets.build, + merge: true + }))) + .pipe(gulpif(args.revision, gulp.dest(config.assets.build))) + } +} diff --git a/tasks/assets/javascripts/build/modernizr.js b/tasks/assets/javascripts/build/modernizr.js new file mode 100644 index 000000000..26a69a4f5 --- /dev/null +++ b/tasks/assets/javascripts/build/modernizr.js @@ -0,0 +1,63 @@ +/* + * 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. + */ + +import concat from "gulp-concat" +import gulpif from "gulp-if" +import modernizr from "gulp-modernizr" +import uglify from "gulp-uglify" +import rev from "gulp-rev" +import version from "gulp-rev-replace" + +/* ---------------------------------------------------------------------------- + * Task: build custom modernizr + * ------------------------------------------------------------------------- */ + +export default (gulp, config, args) => { + return () => { + return gulp.src(`${config.assets.build}/stylesheets/*.css`) + + /* Build custom modernizr */ + .pipe( + modernizr({ + options: [ + "addTest", /* Add custom tests */ + "setClasses" /* Add CSS classes to root tag */ + ] + })) + .pipe(concat("modernizr.js")) + + /* Minify sources */ + .pipe(gulpif(args.optimize, uglify())) + + /* Revisioning */ + .pipe(gulpif(args.revision, rev())) + .pipe(gulpif(args.revision, + version({ manifest: gulp.src("manifest.json") }))) + .pipe(gulp.dest(`${config.assets.build}/javascripts`)) + .pipe(gulpif(args.revision, + rev.manifest("manifest.json", { + base: config.assets.build, + merge: true + }))) + .pipe(gulpif(args.revision, gulp.dest(config.assets.build))) + } +} diff --git a/tasks/assets/javascripts/clean.js b/tasks/assets/javascripts/clean.js new file mode 100644 index 000000000..664c06f2a --- /dev/null +++ b/tasks/assets/javascripts/clean.js @@ -0,0 +1,35 @@ +/* + * 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. + */ + +import clean from "del" +import vinyl from "vinyl-paths" + +/* ---------------------------------------------------------------------------- + * Task: clean javascripts generated by build + * ------------------------------------------------------------------------- */ + +export default (gulp, config) => { + return () => { + return gulp.src(`${config.assets.build}/javascripts/*`) + .pipe(vinyl(clean)) + } +} diff --git a/tasks/assets/javascripts/lint.js b/tasks/assets/javascripts/lint.js new file mode 100644 index 000000000..c8264b5a1 --- /dev/null +++ b/tasks/assets/javascripts/lint.js @@ -0,0 +1,107 @@ +/* + * 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. + */ + +import path from "path" +import through from "through2" +import util from "gulp-util" +import { CLIEngine } from "eslint" + +/* ---------------------------------------------------------------------------- + * Locals + * ------------------------------------------------------------------------- */ + +const eslint = new CLIEngine +const format = eslint.getFormatter() + +/* ---------------------------------------------------------------------------- + * Task: lint SASS sources + * ------------------------------------------------------------------------- */ + +export default (gulp, config) => { + return () => { + return gulp.src(`${config.assets.src}/javascripts/**/*.js`) + + /* Linting */ + .pipe( + through.obj(function(file, enc, cb) { + if (file.isNull() || file.isStream()) + return cb() + + /* Lint file using .eslintrc */ + file.eslint = eslint.executeOnText( + file.contents.toString()) + + /* Correct file path */ + file.eslint.results[0].filePath = + path.relative(process.cwd(), file.path) + + // eslint-disable-next-line no-invalid-this + this.push(file) + cb() + })) + + /* Print errors */ + .pipe( + through.obj(function(file, enc, cb) { + if (file.eslint.errorCount || file.eslint.warningCount) { + // eslint-disable-next-line no-console + console.log(format(file.eslint.results)) + } + + // eslint-disable-next-line no-invalid-this + this.push(file) + cb() + })) + + /* Terminate on error */ + .pipe( + (() => { + const errors = [] + + /* Gather errors */ + return through.obj(function(file, enc, cb) { + const results = file.eslint + + /* Consider warnings as errors */ + if (results.errorCount || results.warningCount) + errors.push(file) + + // eslint-disable-next-line no-invalid-this + this.push(file) + cb() + + /* Format errors and terminate */ + }, function(cb) { + if (errors.length > 0) { + const message = errors.map(file => { + return file.relative + }).join(", ") + + // eslint-disable-next-line no-invalid-this + this.emit("error", new util.PluginError("eslint", + `Terminated with errors in files: ${message}`)) + } + cb() + }) + })()) + } +} diff --git a/tasks/assets/stylesheets/build.js b/tasks/assets/stylesheets/build.js new file mode 100644 index 000000000..92dedfa97 --- /dev/null +++ b/tasks/assets/stylesheets/build.js @@ -0,0 +1,75 @@ +/* + * 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. + */ + +import autoprefixer from "autoprefixer" +import gulpif from "gulp-if" +import mincss from "gulp-cssnano" +import mqpacker from "css-mqpacker" +import postcss from "gulp-postcss" +import rev from "gulp-rev" +import sass from "gulp-sass" +import sourcemaps from "gulp-sourcemaps" +import version from "gulp-rev-replace" + +/* ---------------------------------------------------------------------------- + * Task: build stylesheets from SASS source + * ------------------------------------------------------------------------- */ + +export default (gulp, config, args) => { + return () => { + return gulp.src(`${config.assets.src}/stylesheets/*.scss`) + .pipe(gulpif(args.sourcemaps, sourcemaps.init())) + + /* Compile SASS sources */ + .pipe( + sass({ + includePaths: [ + "node_modules/modularscale-sass/stylesheets", + "node_modules/material-design-color", + "node_modules/material-shadows" + ] + })) + + /* Apply PostCSS plugins */ + .pipe( + postcss([ + autoprefixer(), + mqpacker + ])) + + /* Minify sources */ + .pipe(gulpif(args.optimize, mincss())) + + /* Revisioning */ + .pipe(gulpif(args.revision, rev())) + .pipe(gulpif(args.revision, + version({ manifest: gulp.src("manifest.json") }))) + .pipe(gulpif(args.sourcemaps, sourcemaps.write("."))) + .pipe(gulp.dest(`${config.assets.build}/stylesheets`)) + .pipe(gulpif(args.revision, + rev.manifest("manifest.json", { + base: config.assets.build, + merge: true + }))) + .pipe(gulpif(args.revision, gulp.dest(config.assets.build))) + } +} diff --git a/tasks/assets/stylesheets/clean.js b/tasks/assets/stylesheets/clean.js new file mode 100644 index 000000000..51506be0d --- /dev/null +++ b/tasks/assets/stylesheets/clean.js @@ -0,0 +1,35 @@ +/* + * 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. + */ + +import clean from "del" +import vinyl from "vinyl-paths" + +/* ---------------------------------------------------------------------------- + * Task: clean stylesheets generated by build + * ------------------------------------------------------------------------- */ + +export default (gulp, config) => { + return () => { + return gulp.src(`${config.assets.build}/stylesheets/*`) + .pipe(vinyl(clean)) + } +} diff --git a/tasks/assets/stylesheets/lint.js b/tasks/assets/stylesheets/lint.js new file mode 100644 index 000000000..1ce179e7f --- /dev/null +++ b/tasks/assets/stylesheets/lint.js @@ -0,0 +1,96 @@ +/* + * 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. + */ + +import path from "path" +import sasslint from "sass-lint" +import through from "through2" +import util from "gulp-util" + +/* ---------------------------------------------------------------------------- + * Task: lint SASS sources + * ------------------------------------------------------------------------- */ + +export default (gulp, config, args) => { + return () => { + return gulp.src(`${config.assets.src}/stylesheets/**/*.scss`) + + /* Linting */ + .pipe( + through.obj(function(file, enc, cb) { + if (file.isNull() || file.isStream()) + return cb() + + /* Lint file using .sass-lint.yml */ + file.sasslint = sasslint.lintFileText({ + text: file.contents, + format: path.extname(file.path).replace(".", ""), + filename: path.relative(process.cwd(), file.path) + }) + + // eslint-disable-next-line no-invalid-this + this.push(file) + cb() + })) + + /* Print errors */ + .pipe( + through.obj(function(file, enc, cb) { + sasslint.outputResults([file.sasslint]) + + // eslint-disable-next-line no-invalid-this + this.push(file) + cb() + })) + + /* Terminate on error */ + .pipe( + (() => { + const errors = [] + + /* Gather errors */ + return through.obj(function(file, enc, cb) { + const results = file.sasslint + + /* Consider warnings as errors during clean compilation */ + if (results.errorCount || results.warningCount) + errors.push(file) + + // eslint-disable-next-line no-invalid-this + this.push(file) + cb() + + /* Format errors and terminate */ + }, function(cb) { + if (errors.length > 0) { + const message = errors.map(file => { + return file.relative + }).join(", ") + + // eslint-disable-next-line no-invalid-this + this.emit("error", new util.PluginError("eslint", + `Terminated with errors in files: ${message}`)) + } + cb() + }) + })()) + } +} diff --git a/tasks/mkdocs/build.js b/tasks/mkdocs/build.js new file mode 100644 index 000000000..2e26f9d1c --- /dev/null +++ b/tasks/mkdocs/build.js @@ -0,0 +1,33 @@ +/* + * 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. + */ + +import child from "child_process" + +/* ---------------------------------------------------------------------------- + * Task: build documentation + * ------------------------------------------------------------------------- */ + +export default () => { + return () => { + return child.spawnSync("mkdocs", ["build"]) + } +} diff --git a/tasks/mkdocs/clean.js b/tasks/mkdocs/clean.js new file mode 100644 index 000000000..c364b4881 --- /dev/null +++ b/tasks/mkdocs/clean.js @@ -0,0 +1,35 @@ +/* + * 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. + */ + +import clean from "del" +import vinyl from "vinyl-paths" + +/* ---------------------------------------------------------------------------- + * Task: clean documentation build + * ------------------------------------------------------------------------- */ + +export default gulp => { + return () => { + return gulp.src("site") + .pipe(vinyl(clean)) + } +} diff --git a/tasks/mkdocs/serve.js b/tasks/mkdocs/serve.js new file mode 100644 index 000000000..66efc39c4 --- /dev/null +++ b/tasks/mkdocs/serve.js @@ -0,0 +1,58 @@ +/* + * 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. + */ + +import child from "child_process" +import util from "gulp-util" + +/* ---------------------------------------------------------------------------- + * Locals + * ------------------------------------------------------------------------- */ + +/* MkDocs server */ +let server = null + +/* ---------------------------------------------------------------------------- + * Task: serve documentation + * ------------------------------------------------------------------------- */ + +export default () => { + return () => { + if (server) + server.kill() + + /* Spawn MkDocs server */ + server = child.spawn("mkdocs", ["serve", "-a", "0.0.0.0:8000"]) + + /* Pretty print server log output */ + server.stdout.on("data", data => { + const lines = data.toString().split("\n") + for (const l in lines) + if (lines[l].length) + util.log(lines[l]) + }) + + /* Print errors to stdout */ + server.stderr.on("data", data => { + process.stdout.write(data.toString()) + }) + } +} diff --git a/tasks/views/build.js b/tasks/views/build.js new file mode 100644 index 000000000..797242fd7 --- /dev/null +++ b/tasks/views/build.js @@ -0,0 +1,55 @@ +/* + * 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. + */ + +import changed from "gulp-changed" +import compact from "gulp-remove-empty-lines" +import gulpif from "gulp-if" +import minhtml from "gulp-htmlmin" +import path from "path" +import replace from "gulp-replace" +import version from "gulp-rev-replace" + +/* ---------------------------------------------------------------------------- + * Task: minify views + * ------------------------------------------------------------------------- */ + +export default (gulp, config, args) => { + return () => { + const metadata = require(path.join(process.cwd(), "./package.json")) + return gulp.src(`${config.views.src}/**/*.html`) + .pipe(changed(config.views.build)) + .pipe( + minhtml({ + collapseBooleanAttributes: true, + removeComments: true, + removeScriptTypeAttributes: true, + removeStyleLinkTypeAttributes: true, + customAttrCollapse: /(content)/ + })) + .pipe(replace("$theme-name$", metadata.name)) + .pipe(replace("$theme-version$", metadata.version)) + .pipe(compact()) + .pipe(gulpif(args.revision, + version({ manifest: gulp.src("manifest.json") }))) + .pipe(gulp.dest(config.views.build)) + } +} diff --git a/tasks/views/clean.js b/tasks/views/clean.js new file mode 100644 index 000000000..592fa52d2 --- /dev/null +++ b/tasks/views/clean.js @@ -0,0 +1,35 @@ +/* + * 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. + */ + +import clean from "del" +import vinyl from "vinyl-paths" + +/* ---------------------------------------------------------------------------- + * Task: clean views + * ------------------------------------------------------------------------- */ + +export default (gulp, config) => { + return () => { + return gulp.src(`${config.views.build}/**/*.html`) + .pipe(vinyl(clean)) + } +} From 48dc0527c8d9766466ee7cc34ffac46e8729e142 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Thu, 6 Oct 2016 12:20:48 +0200 Subject: [PATCH 028/202] Added babel-register as a dependency --- CHANGELOG | 2 +- package.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 05f56b32d..ac85a5cf1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -15,7 +15,7 @@ mkdocs-material-1.0.0-rc.1 (2016-XX-XX) * Rewrite of JavaScript using ES6 and Babel as a transpiler * Rewrite of Admonition, Permalinks and Codehilite integration * Rewrite of the complete typographical system - * Rewrite of Gulp asset pipeline in ES6 and separate tasks + * Rewrite of Gulp asset pipeline in ES6 and separation of tasks * Removed Bower as a dependency in favor of npm * Removed custom icon build in favor of the Material Design iconset * Removed _blank targets on links due to vulnerability: http://bit.ly/1Mk2Rtw diff --git a/package.json b/package.json index 7a67b6864..2bb801e86 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "babel-loader": "^6.2.4", "babel-plugin-add-module-exports": "^0.2.1", "babel-preset-es2015": "^6.13.2", + "babel-register": "^6.16.3", "css-mqpacker": "^4.0.0", "del": "^2.2.0", "eslint": "^3.6.1", From ccfdbf040fb0d251127fb6d71029e882708be391 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Thu, 6 Oct 2016 15:14:03 +0200 Subject: [PATCH 029/202] Introduced pre-commit hook for linting --- .githooks/pre-commit/lint.sh | 70 ++++++++++++++++++++++++++++++++++++ CHANGELOG | 1 + Gulpfile.babel.js | 10 +++++- package.json | 6 ++-- 4 files changed, 84 insertions(+), 3 deletions(-) create mode 100755 .githooks/pre-commit/lint.sh diff --git a/.githooks/pre-commit/lint.sh b/.githooks/pre-commit/lint.sh new file mode 100755 index 000000000..cd9c7825d --- /dev/null +++ b/.githooks/pre-commit/lint.sh @@ -0,0 +1,70 @@ +#!/bin/bash + +# 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. + +# Checking if all changes are added to the index +CWD_CLEAN="$(git diff-index HEAD --)" + +# This variables stores the state of the stash. +# 0 = not restored yet. +# 1 = stash was already reset +STASH_POPPED=0 + +# Pop the stash in case of trap +function cleanup { + if test -n "$CWD_CLEAN"; then + if test "$STASH_POPPED" != 1 ; then + # Pop the changes (= stash) back to the work space + git stash pop -q + fi + fi + exit +} + +# Register signal handler +trap cleanup SIGHUP SIGINT SIGTERM + +# Stash all changes that were not added to the commit +if test -n "$CWD_CLEAN"; then + git stash -q --keep-index --include-untracked +fi + +# Run the check and print indicator +echo "Hook[pre-commit]: Running linter..." +STD_OUT=$(npm run pre-commit --silent) + +# Grab exit code of check +HAD_ERROR=$? + +# Pop the changes (= stash) back to the work space +if test -n "$CWD_CLEAN"; then + git stash pop -q + STASH_POPPED=1 +fi + +# In case of error, print output of check +if test "$HAD_ERROR" != 0 ; then + echo ${STD_OUT} + exit 1 +fi + +# Reset indicator and exit +exit 0 diff --git a/CHANGELOG b/CHANGELOG index ac85a5cf1..d60445740 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -11,6 +11,7 @@ mkdocs-material-1.0.0-rc.1 (2016-XX-XX) * Introduced ESLint and SassLint for code style checks * Introduced more accurate Material Design colors and shadows * Introduced modular scales for harmonic font sizing + * Introduced pre-commit hook for linting * Rewrite of CSS using the BEM methodology and SassDoc guidelines * Rewrite of JavaScript using ES6 and Babel as a transpiler * Rewrite of Admonition, Permalinks and Codehilite integration diff --git a/Gulpfile.babel.js b/Gulpfile.babel.js index 993778c7d..b6ca93f98 100755 --- a/Gulpfile.babel.js +++ b/Gulpfile.babel.js @@ -90,7 +90,7 @@ gulp.src = (...glob) => { * Helper function to load a task */ const load = task => { - return require(`./tasks/${task}.js`)(gulp, config, args) + return require(`./tasks/${task}`)(gulp, config, args) } /* ---------------------------------------------------------------------------- @@ -218,6 +218,14 @@ gulp.task("assets:clean", [ "assets:stylesheets:clean" ]) +/* + * Lint sources + */ +gulp.task("assets:lint", [ + "assets:javascripts:lint", + "assets:stylesheets:lint" +]) + /* ---------------------------------------------------------------------------- * Views * ------------------------------------------------------------------------- */ diff --git a/package.json b/package.json index 2bb801e86..d85eff354 100644 --- a/package.json +++ b/package.json @@ -9,9 +9,10 @@ "license": "MIT", "main": "Gulpfile.js", "scripts": { - "start": "./node_modules/.bin/gulp watch --mkdocs --no-lint --no-revision", "build": "./node_modules/.bin/gulp build --clean", - "clean": "./node_modules/.bin/gulp clean" + "clean": "./node_modules/.bin/gulp clean", + "start": "./node_modules/.bin/gulp watch --mkdocs --no-lint --no-revision", + "pre-commit": "./node_modules/.bin/gulp assets:lint" }, "repository": { "type": "git", @@ -36,6 +37,7 @@ "css-mqpacker": "^4.0.0", "del": "^2.2.0", "eslint": "^3.6.1", + "git-hooks": "^1.1.6", "gulp": "^3.9.1", "gulp-changed": "^1.3.2", "gulp-concat": "^2.6.0", From d5ddc1ab8f9294992122aac2f06447041a3c07ab Mon Sep 17 00:00:00 2001 From: squidfunk Date: Thu, 6 Oct 2016 15:16:57 +0200 Subject: [PATCH 030/202] Added npm-debug.log to .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e8de676b4..2866009ac 100644 --- a/.gitignore +++ b/.gitignore @@ -21,8 +21,9 @@ # Mac OS X internals .DS_Store -# Dependencies +# NPM-related /node_modules +/npm-debug.log # Build files /build From 2159c730c57cd9e8f8525dd61a2189c777f57b09 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Thu, 6 Oct 2016 15:45:41 +0200 Subject: [PATCH 031/202] Introduced post-merge hook to update dependencies --- .githooks/post-merge/npm-update.sh | 30 ++++++++++++++++++++++++++++++ .githooks/pre-commit/lint.sh | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100755 .githooks/post-merge/npm-update.sh diff --git a/.githooks/post-merge/npm-update.sh b/.githooks/post-merge/npm-update.sh new file mode 100755 index 000000000..e567174d7 --- /dev/null +++ b/.githooks/post-merge/npm-update.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# 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. + +# Check, if all changes are added to the index +CHANGED="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" + +# Perform install and prune of NPM dependencies if package.json changed +if $(echo "$CHANGED" | grep --quiet package.json); then + echo "Hook[post-merge]: Updating dependencies..." + npm install && npm prune +fi \ No newline at end of file diff --git a/.githooks/pre-commit/lint.sh b/.githooks/pre-commit/lint.sh index cd9c7825d..aa3400ff3 100755 --- a/.githooks/pre-commit/lint.sh +++ b/.githooks/pre-commit/lint.sh @@ -20,7 +20,7 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. -# Checking if all changes are added to the index +# Check, if all changes are added to the index CWD_CLEAN="$(git diff-index HEAD --)" # This variables stores the state of the stash. From 57822b129073fe7836ffb85ce89d34fe8e3f12ee Mon Sep 17 00:00:00 2001 From: squidfunk Date: Thu, 6 Oct 2016 19:26:49 +0200 Subject: [PATCH 032/202] Updated changelog --- .githooks/post-merge/npm-update.sh | 2 +- CHANGELOG | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.githooks/post-merge/npm-update.sh b/.githooks/post-merge/npm-update.sh index e567174d7..4b4b1d1bd 100755 --- a/.githooks/post-merge/npm-update.sh +++ b/.githooks/post-merge/npm-update.sh @@ -27,4 +27,4 @@ CHANGED="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" if $(echo "$CHANGED" | grep --quiet package.json); then echo "Hook[post-merge]: Updating dependencies..." npm install && npm prune -fi \ No newline at end of file +fi diff --git a/CHANGELOG b/CHANGELOG index d60445740..59933a652 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -11,13 +11,13 @@ mkdocs-material-1.0.0-rc.1 (2016-XX-XX) * Introduced ESLint and SassLint for code style checks * Introduced more accurate Material Design colors and shadows * Introduced modular scales for harmonic font sizing - * Introduced pre-commit hook for linting + * Introduced git-hooks for better development workflow * Rewrite of CSS using the BEM methodology and SassDoc guidelines * Rewrite of JavaScript using ES6 and Babel as a transpiler * Rewrite of Admonition, Permalinks and Codehilite integration * Rewrite of the complete typographical system * Rewrite of Gulp asset pipeline in ES6 and separation of tasks - * Removed Bower as a dependency in favor of npm + * Removed Bower as a dependency in favor of NPM * Removed custom icon build in favor of the Material Design iconset * Removed _blank targets on links due to vulnerability: http://bit.ly/1Mk2Rtw * Removed unversioned assets from build directory @@ -88,7 +88,7 @@ mkdocs-material-0.1.2 (2016-02-16) mkdocs-material-0.1.1 (2016-02-11) * Fixed #1: GitHub stars don't work if the repo_url ends with a '/' - * Updated npm and bower dependencies to most recent versions + * Updated NPM and Bower dependencies to most recent versions * Changed footer/copyright link to Material theme to GitHub pages * Made MkDocs building/serving in build process optional * Set up continuous integration with travis-ci.org From cc302a70fcff0353d2e1f33cfbe636a4f1697191 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Fri, 7 Oct 2016 11:17:00 +0200 Subject: [PATCH 033/202] Added editor configuration --- .editorconfig | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..6697c129e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,31 @@ +# 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. + +# Top-level config +root = true + +# All files +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true From 82eef9340f08e3491ef4d93277c5f6361b4e1a8b Mon Sep 17 00:00:00 2001 From: squidfunk Date: Fri, 7 Oct 2016 16:38:13 +0200 Subject: [PATCH 034/202] Integrated karma for unit tests --- .eslintrc | 7 +- .gitignore | 2 +- Gulpfile.babel.js | 17 ++++ package.json | 16 +++- src/assets/stylesheets/helpers/_break.scss | 12 +-- tasks/tests/unit/watch.js | 37 ++++++++ tests/.babelrc | 9 ++ tests/.eslintrc | 23 +++++ tests/karma.conf.js | 103 +++++++++++++++++++++ tests/unit/Marker.spec.jsx | 24 +++++ tests/unit/_lib/create-element.js | 73 +++++++++++++++ 11 files changed, 310 insertions(+), 13 deletions(-) create mode 100644 tasks/tests/unit/watch.js create mode 100644 tests/.babelrc create mode 100644 tests/.eslintrc create mode 100644 tests/karma.conf.js create mode 100644 tests/unit/Marker.spec.jsx create mode 100644 tests/unit/_lib/create-element.js diff --git a/.eslintrc b/.eslintrc index 5f3f52927..efff6969e 100644 --- a/.eslintrc +++ b/.eslintrc @@ -29,10 +29,6 @@ "node": true }, "globals": { - "before": true, - "describe": true, - "expect": true, - "it": true, "Modernizr": true, "navigator": true }, @@ -198,5 +194,6 @@ "requireReturnDescription": true }], "yield-star-spacing": 2 - } + }, + "root": true } \ No newline at end of file diff --git a/.gitignore b/.gitignore index 2866009ac..a4589e6b4 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,4 @@ # Distribution files /dist -/mkdocs_material.egg-info \ No newline at end of file +/mkdocs_material.egg-info diff --git a/Gulpfile.babel.js b/Gulpfile.babel.js index b6ca93f98..6c0e837f6 100755 --- a/Gulpfile.babel.js +++ b/Gulpfile.babel.js @@ -43,6 +43,7 @@ const config = { const args = yargs .default("clean", false) /* Clean before build */ + .default("karma", false) /* Karma watchdog */ .default("lint", true) /* Lint sources */ .default("mkdocs", false) /* MkDocs watchdog */ .default("optimize", true) /* Optimize sources */ @@ -272,6 +273,16 @@ gulp.task("mkdocs:clean", gulp.task("mkdocs:serve", load("mkdocs/serve")) +/* ---------------------------------------------------------------------------- + * Tests + * ------------------------------------------------------------------------- */ + +/* + * Start karma test runner + */ +gulp.task("tests:unit:watch", + load("tests/unit/watch")) + /* ---------------------------------------------------------------------------- * Interface * ------------------------------------------------------------------------- */ @@ -306,9 +317,15 @@ gulp.task("watch", [ "assets:build", "views:build" ], () => { + + /* Start MkDocs server */ if (args.mkdocs) gulp.start("mkdocs:serve") + /* Start karma test runner */ + if (args.karma) + gulp.start("tests:unit:watch") + /* Rebuild stylesheets */ gulp.watch([ `${config.assets.src}/stylesheets/**/*.scss` diff --git a/package.json b/package.json index d85eff354..b1644c34d 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,9 @@ "scripts": { "build": "./node_modules/.bin/gulp build --clean", "clean": "./node_modules/.bin/gulp clean", + "pre-commit": "./node_modules/.bin/gulp assets:lint", "start": "./node_modules/.bin/gulp watch --mkdocs --no-lint --no-revision", - "pre-commit": "./node_modules/.bin/gulp assets:lint" + "test": "./node_modules/.bin/karma start ./tests/karma.conf.js" }, "repository": { "type": "git", @@ -32,11 +33,15 @@ "babel-eslint": "^6.1.2", "babel-loader": "^6.2.4", "babel-plugin-add-module-exports": "^0.2.1", + "babel-plugin-transform-react-jsx": "^6.8.0", + "babel-polyfill": "^6.16.0", "babel-preset-es2015": "^6.13.2", "babel-register": "^6.16.3", + "chai": "^3.5.0", "css-mqpacker": "^4.0.0", "del": "^2.2.0", "eslint": "^3.6.1", + "eslint-plugin-mocha": "^4.6.0", "git-hooks": "^1.1.6", "gulp": "^3.9.1", "gulp-changed": "^1.3.2", @@ -57,6 +62,15 @@ "gulp-svgmin": "^1.2.2", "gulp-uglify": "^1.5.2", "gulp-util": "^3.0.7", + "karma": "^1.3.0", + "karma-chrome-launcher": "^2.0.0", + "karma-coverage": "^1.1.1", + "karma-mocha": "^1.2.0", + "karma-notify-reporter": "^1.0.1", + "karma-sourcemap-loader": "^0.3.7", + "karma-spec-reporter": "0.0.26", + "karma-webpack": "^1.8.0", + "mocha": "^3.1.0", "node-notifier": "^4.5.0", "sass-lint": "^1.9.1", "through2": "^2.0.1", diff --git a/src/assets/stylesheets/helpers/_break.scss b/src/assets/stylesheets/helpers/_break.scss index 34d024f5b..42dc8efd5 100644 --- a/src/assets/stylesheets/helpers/_break.scss +++ b/src/assets/stylesheets/helpers/_break.scss @@ -123,7 +123,7 @@ $break-devices: () !default; /// /// @group helpers /// @access public -/// @param {Number|List} $breakpoint Number or number pair +/// @param {Number|List} $breakpoint Number or number pair /// @mixin break-at($breakpoint) { @if type-of($breakpoint) == number { @@ -150,7 +150,7 @@ $break-devices: () !default; /// /// @group helpers /// @access public -/// @param {String} $breakpoint Orientation +/// @param {String} $breakpoint Orientation /// @mixin break-at-orientation($breakpoint) { @if type-of($breakpoint) == string { @@ -167,7 +167,7 @@ $break-devices: () !default; /// /// @group helpers /// @access public -/// @param {Number} $breakpoint Ratio +/// @param {Number} $breakpoint Ratio /// @mixin break-at-ratio($breakpoint) { @if type-of($breakpoint) == number { @@ -184,7 +184,7 @@ $break-devices: () !default; /// /// @group helpers /// @access public -/// @param {String|List} $breakpoint Device +/// @param {String|List} $breakpoint Device /// @mixin break-at-device($device) { @if type-of($device) == string { @@ -211,7 +211,7 @@ $break-devices: () !default; /// /// @group helpers /// @access public -/// @param {String|List} $breakpoint Device +/// @param {String|List} $breakpoint Device /// @mixin break-from-device($device) { @if type-of($device) == string { @@ -233,7 +233,7 @@ $break-devices: () !default; /// /// @group helpers /// @access public -/// @param {String|List} $breakpoint Device +/// @param {String|List} $breakpoint Device /// @mixin break-to-device($device) { @if type-of($device) == string { diff --git a/tasks/tests/unit/watch.js b/tasks/tests/unit/watch.js new file mode 100644 index 000000000..c92197523 --- /dev/null +++ b/tasks/tests/unit/watch.js @@ -0,0 +1,37 @@ +/* + * 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. + */ + +import path from "path" +import { Server } from "karma" + +/* ---------------------------------------------------------------------------- + * Task: start karma test runner + * ------------------------------------------------------------------------- */ + +export default () => { + return cb => { + process.env.GULP = true + new Server({ + configFile: path.join(process.cwd(), "tests/karma.conf.js") + }, cb).start() + } +} diff --git a/tests/.babelrc b/tests/.babelrc new file mode 100644 index 000000000..61a632adb --- /dev/null +++ b/tests/.babelrc @@ -0,0 +1,9 @@ +{ + "presets": ["es2015"], + "plugins": [ + "add-module-exports", + ["transform-react-jsx", { + "pragma": "createElement" + }] + ] +} \ No newline at end of file diff --git a/tests/.eslintrc b/tests/.eslintrc new file mode 100644 index 000000000..bda0f6c45 --- /dev/null +++ b/tests/.eslintrc @@ -0,0 +1,23 @@ +{ + "env": { + "mocha": true + }, + "parserOptions": { + "ecmaFeatures": { + "jsx": true + } + }, + "plugins": [ + "mocha" + ], + "rules": { + "mocha/no-exclusive-tests": 2, + "mocha/no-global-tests": 2, + "mocha/no-identical-title": 2, + "mocha/no-mocha-arrows": 2, + "mocha/no-pending-tests": 1, + "mocha/no-skipped-tests": 1, + "no-use-before-define": 0, + "prefer-arrow-callback": 0 + } +} \ No newline at end of file diff --git a/tests/karma.conf.js b/tests/karma.conf.js new file mode 100644 index 000000000..017a5132b --- /dev/null +++ b/tests/karma.conf.js @@ -0,0 +1,103 @@ +/* + * 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. + */ + +const webpack = require("webpack") + +/* ---------------------------------------------------------------------------- + * Definition + * ------------------------------------------------------------------------- */ + +module.exports = karma => { + const config = { + basePath: "../", + frameworks: ["mocha"], + + /* Include babel polyfill to support older browsers */ + files: [ + "node_modules/babel-polyfill/dist/polyfill.js", + "tests/unit/*.spec.jsx" + ], + + /* Test reporters */ + reporters: ["spec", "coverage"], + + /* Silence calls to console.log */ + client: { + captureConsole: false + }, + + /* Preprocess test files */ + preprocessors: { + "tests/unit/*.spec.jsx": ["webpack", "sourcemap"] + }, + + /* Configuration for webpack */ + webpack: { + devtool: "inline-source-map", + plugins: [ + + /* Inject DOM node creation helper for JSX support */ + new webpack.ProvidePlugin({ + createElement: "./_lib/create-element.js" + }) + ], + module: { + loaders: [ + { + test: /\.jsx?$/, + loader: "babel-loader" + } + ] + } + }, + + /* Suppress messages by webpack */ + webpackServer: { + noInfo: true + }, + + /* Code coverage */ + coverageReporter: { + dir: "./coverage", + reporters: [ + { type: "json" } + ] + } + } + + /* Setup for continuous integration */ + if (process.env.CONTINUOUS_INTEGRATION) { + // TODO TBD + + /* Setup for local development environment */ + } else if (process.env.GULP) { + delete config.reporters + + /* Setup for local testing */ + } else { + config.browsers = ["Chrome"] + config.singleRun = true + } + + /* Persist configuration */ + karma.set(config) +} diff --git a/tests/unit/Marker.spec.jsx b/tests/unit/Marker.spec.jsx new file mode 100644 index 000000000..df335d9b3 --- /dev/null +++ b/tests/unit/Marker.spec.jsx @@ -0,0 +1,24 @@ + +import chai from "chai" + +describe("Karma test runner", function() { + chai.should() + + let sandbox = null + + beforeEach(function() { + sandbox = ( +
      + {[...Array(10)].map((x, i) => { + return
    • Element {i + 1}
    • + })} +
    + ) + }) + + it("should compile JSX correctly", function() { + document.body.appendChild(sandbox) + return true + }) +}) + diff --git a/tests/unit/_lib/create-element.js b/tests/unit/_lib/create-element.js new file mode 100644 index 000000000..a8d8e157e --- /dev/null +++ b/tests/unit/_lib/create-element.js @@ -0,0 +1,73 @@ +/* + * 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. + */ + +/* ---------------------------------------------------------------------------- + * Definition + * ------------------------------------------------------------------------- */ + +/** + * Create a native DOM node + * + * @param {string} tag - Tag name + * @param {object} properties - Properties + * @param {string|number|Array} children - Child nodes + * @return {HTMLElement} Native DOM node + */ +const createElement = (tag, properties, ...children) => { + const el = document.createElement(tag) + + /* Set all properties */ + for (const attr of Object.keys(properties)) + el.setAttribute(attr, properties[attr]) + + /* Iterate child nodes */ + const iterateChildNodes = nodes => { + for (const node of nodes) { + + /* Directly append content */ + if (typeof node === "string" || + typeof node === "number") { + el.textContent += node + + /* Recurse, if we got an array */ + } else if (Array.isArray(node)) { + iterateChildNodes(node) + + /* Append regular nodes */ + } else { + el.appendChild(node) + } + } + } + + /* Iterate child nodes */ + iterateChildNodes(children) + + /* Return element */ + return el +} + +/* ---------------------------------------------------------------------------- + * Exports + * ------------------------------------------------------------------------- */ + +export default createElement From 3e47149fe4a44f1dd954332c9ec55309d26aed59 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Fri, 7 Oct 2016 21:27:29 +0200 Subject: [PATCH 035/202] Restructure package.json according to npm guidelines --- package.json | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index b1644c34d..b92df663d 100644 --- a/package.json +++ b/package.json @@ -2,24 +2,33 @@ "name": "mkdocs-material", "version": "0.2.1", "description": "A material design theme for MkDocs", - "homepage": "http://squidfunk.github.io/mkdocs-material/", - "authors": [ - "squidfunk " + "keywords": [ + "mkdocs", + "documentation", + "theme" ], - "license": "MIT", - "main": "Gulpfile.js", - "scripts": { - "build": "./node_modules/.bin/gulp build --clean", - "clean": "./node_modules/.bin/gulp clean", - "pre-commit": "./node_modules/.bin/gulp assets:lint", - "start": "./node_modules/.bin/gulp watch --mkdocs --no-lint --no-revision", - "test": "./node_modules/.bin/karma start ./tests/karma.conf.js" + "homepage": "http://squidfunk.github.io/mkdocs-material/", + "bugs": { + "url" : "https://github.com/squidfunk/mkdocs-material/issues", + "email" : "martin.donath@squidfunk.com" }, + "license": "MIT", + "author": { + "name": "Martin Donath", + "email": "martin.donath@squidfunk.com" + }, + "contributors": [], "repository": { "type": "git", "url": "https://github.com/squidfunk/mkdocs-material.git" }, - "private": true, + "scripts": { + "build": "./node_modules/.bin/gulp build --clean --optimize --revision", + "clean": "./node_modules/.bin/gulp clean", + "pre-commit": "./node_modules/.bin/gulp assets:lint", + "start": "./node_modules/.bin/gulp watch --no-lint", + "test": "./node_modules/.bin/gulp test" + }, "dependencies": { "fastclick": "^1.0.6", "lunr": "^0.7.1", @@ -42,6 +51,7 @@ "del": "^2.2.0", "eslint": "^3.6.1", "eslint-plugin-mocha": "^4.6.0", + "gemini": "^4.11.3", "git-hooks": "^1.1.6", "gulp": "^3.9.1", "gulp-changed": "^1.3.2", @@ -73,10 +83,15 @@ "mocha": "^3.1.0", "node-notifier": "^4.5.0", "sass-lint": "^1.9.1", + "selenium-standalone": "^5.7.2", "through2": "^2.0.1", "vinyl-paths": "^2.1.0", "webpack": "^1.13.1", "webpack-stream": "^3.2.0", "yargs": "^3.32.0" - } + }, + "engines": { + "node": ">=4.5.0" + }, + "private": true } From 7b585f191ac8a168eb4bcabe7c8cd74fa805e33d Mon Sep 17 00:00:00 2001 From: squidfunk Date: Mon, 10 Oct 2016 12:35:25 +0200 Subject: [PATCH 036/202] Added full JSX support to build pipeline --- .babelrc | 5 +- .eslintignore | 3 + .sass-lint.yml | 1 + Gulpfile.babel.js | 20 ++---- .../create-element.js => lib/providers/jsx.js | 72 +++++++++---------- lib/tasks/.eslintrc | 5 ++ .../tasks}/assets/images/build/ico.js | 0 .../tasks}/assets/images/build/svg.js | 0 {tasks => lib/tasks}/assets/images/clean.js | 0 .../assets/javascripts/build/application.js | 36 +++++++--- .../assets/javascripts/build/modernizr.js | 0 .../tasks}/assets/javascripts/clean.js | 0 .../tasks}/assets/javascripts/lint.js | 8 +-- .../tasks}/assets/stylesheets/build.js | 0 .../tasks}/assets/stylesheets/clean.js | 0 .../tasks}/assets/stylesheets/lint.js | 10 +-- {tasks => lib/tasks}/mkdocs/build.js | 0 {tasks => lib/tasks}/mkdocs/clean.js | 0 {tasks => lib/tasks}/mkdocs/serve.js | 0 lib/tasks/tests/unit.js | 36 ++++++++++ {tasks => lib/tasks}/tests/unit/watch.js | 1 - {tasks => lib/tasks}/views/build.js | 0 {tasks => lib/tasks}/views/clean.js | 0 package.json | 6 +- tests/.babelrc | 9 --- tests/karma.conf.js | 52 ++++++++++---- tests/unit/Marker.spec.jsx | 72 ++++++++++++++++--- 27 files changed, 229 insertions(+), 107 deletions(-) create mode 100644 .eslintignore rename tests/unit/_lib/create-element.js => lib/providers/jsx.js (53%) create mode 100644 lib/tasks/.eslintrc rename {tasks => lib/tasks}/assets/images/build/ico.js (100%) rename {tasks => lib/tasks}/assets/images/build/svg.js (100%) rename {tasks => lib/tasks}/assets/images/clean.js (100%) rename {tasks => lib/tasks}/assets/javascripts/build/application.js (82%) rename {tasks => lib/tasks}/assets/javascripts/build/modernizr.js (100%) rename {tasks => lib/tasks}/assets/javascripts/clean.js (100%) rename {tasks => lib/tasks}/assets/javascripts/lint.js (93%) rename {tasks => lib/tasks}/assets/stylesheets/build.js (100%) rename {tasks => lib/tasks}/assets/stylesheets/clean.js (100%) rename {tasks => lib/tasks}/assets/stylesheets/lint.js (92%) rename {tasks => lib/tasks}/mkdocs/build.js (100%) rename {tasks => lib/tasks}/mkdocs/clean.js (100%) rename {tasks => lib/tasks}/mkdocs/serve.js (100%) create mode 100644 lib/tasks/tests/unit.js rename {tasks => lib/tasks}/tests/unit/watch.js (98%) rename {tasks => lib/tasks}/views/build.js (100%) rename {tasks => lib/tasks}/views/clean.js (100%) delete mode 100644 tests/.babelrc diff --git a/.babelrc b/.babelrc index e51860877..9691c8965 100644 --- a/.babelrc +++ b/.babelrc @@ -1,6 +1,9 @@ { "presets": ["es2015"], "plugins": [ - "add-module-exports" + "add-module-exports", + ["transform-react-jsx", { + "pragma": "JSX.createElement" + }] ] } \ No newline at end of file diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..115d06489 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,3 @@ +/build +/material +/site \ No newline at end of file diff --git a/.sass-lint.yml b/.sass-lint.yml index e324f7de4..eabb7cb3f 100644 --- a/.sass-lint.yml +++ b/.sass-lint.yml @@ -20,6 +20,7 @@ files: ignore: + - node_modules/** - src/assets/stylesheets/_shame.scss - src/assets/stylesheets/extensions/_codehilite.scss # Temporary disabled diff --git a/Gulpfile.babel.js b/Gulpfile.babel.js index 6c0e837f6..3df904861 100755 --- a/Gulpfile.babel.js +++ b/Gulpfile.babel.js @@ -35,6 +35,7 @@ const config = { src: "src/assets", /* Source directory for assets */ build: "material/assets" /* Target directory for assets */ }, + lib: "lib", /* Libraries */ views: { src: "src", /* Source directory for views */ build: "material" /* Target directory for views */ @@ -43,11 +44,11 @@ const config = { const args = yargs .default("clean", false) /* Clean before build */ - .default("karma", false) /* Karma watchdog */ + .default("karma", true) /* Karma watchdog */ .default("lint", true) /* Lint sources */ - .default("mkdocs", false) /* MkDocs watchdog */ - .default("optimize", true) /* Optimize sources */ - .default("revision", true) /* Revision assets */ + .default("mkdocs", true) /* MkDocs watchdog */ + .default("optimize", false) /* Optimize sources */ + .default("revision", false) /* Revision assets */ .default("sourcemaps", false) /* Create sourcemaps */ .argv @@ -91,7 +92,7 @@ gulp.src = (...glob) => { * Helper function to load a task */ const load = task => { - return require(`./tasks/${task}`)(gulp, config, args) + return require(`./${config.lib}/tasks/${task}`)(gulp, config, args) } /* ---------------------------------------------------------------------------- @@ -219,14 +220,6 @@ gulp.task("assets:clean", [ "assets:stylesheets:clean" ]) -/* - * Lint sources - */ -gulp.task("assets:lint", [ - "assets:javascripts:lint", - "assets:stylesheets:lint" -]) - /* ---------------------------------------------------------------------------- * Views * ------------------------------------------------------------------------- */ @@ -317,6 +310,7 @@ gulp.task("watch", [ "assets:build", "views:build" ], () => { + process.env.WATCH = true /* Start MkDocs server */ if (args.mkdocs) diff --git a/tests/unit/_lib/create-element.js b/lib/providers/jsx.js similarity index 53% rename from tests/unit/_lib/create-element.js rename to lib/providers/jsx.js index a8d8e157e..efcda77b0 100644 --- a/tests/unit/_lib/create-element.js +++ b/lib/providers/jsx.js @@ -24,50 +24,46 @@ * Definition * ------------------------------------------------------------------------- */ -/** - * Create a native DOM node - * - * @param {string} tag - Tag name - * @param {object} properties - Properties - * @param {string|number|Array} children - Child nodes - * @return {HTMLElement} Native DOM node - */ -const createElement = (tag, properties, ...children) => { - const el = document.createElement(tag) +export default /* JSX */ { - /* Set all properties */ - for (const attr of Object.keys(properties)) - el.setAttribute(attr, properties[attr]) + /** + * Create a native DOM node + * + * @param {string} tag - Tag name + * @param {object} properties - Properties + * @param {string|number|Array} children - Child nodes + * @return {HTMLElement} Native DOM node + */ + createElement(tag, properties, ...children) { + const el = document.createElement(tag) - /* Iterate child nodes */ - const iterateChildNodes = nodes => { - for (const node of nodes) { + /* Set all properties */ + if (properties) + for (const attr of Object.keys(properties)) + el.setAttribute(attr, properties[attr]) - /* Directly append content */ - if (typeof node === "string" || - typeof node === "number") { - el.textContent += node + /* Iterate child nodes */ + const iterateChildNodes = nodes => { + for (const node of nodes) { - /* Recurse, if we got an array */ - } else if (Array.isArray(node)) { - iterateChildNodes(node) + /* Directly append text content */ + if (typeof node === "string" || + typeof node === "number") { + el.textContent += node - /* Append regular nodes */ - } else { - el.appendChild(node) + /* Recurse, if we got an array */ + } else if (Array.isArray(node)) { + iterateChildNodes(node) + + /* Append regular nodes */ + } else { + el.appendChild(node) + } } } + + /* Iterate child nodes and return element */ + iterateChildNodes(children) + return el } - - /* Iterate child nodes */ - iterateChildNodes(children) - - /* Return element */ - return el } - -/* ---------------------------------------------------------------------------- - * Exports - * ------------------------------------------------------------------------- */ - -export default createElement diff --git a/lib/tasks/.eslintrc b/lib/tasks/.eslintrc new file mode 100644 index 000000000..d4cadde28 --- /dev/null +++ b/lib/tasks/.eslintrc @@ -0,0 +1,5 @@ +{ + "rules": { + "no-invalid-this": 0 + } +} \ No newline at end of file diff --git a/tasks/assets/images/build/ico.js b/lib/tasks/assets/images/build/ico.js similarity index 100% rename from tasks/assets/images/build/ico.js rename to lib/tasks/assets/images/build/ico.js diff --git a/tasks/assets/images/build/svg.js b/lib/tasks/assets/images/build/svg.js similarity index 100% rename from tasks/assets/images/build/svg.js rename to lib/tasks/assets/images/build/svg.js diff --git a/tasks/assets/images/clean.js b/lib/tasks/assets/images/clean.js similarity index 100% rename from tasks/assets/images/clean.js rename to lib/tasks/assets/images/clean.js diff --git a/tasks/assets/javascripts/build/application.js b/lib/tasks/assets/javascripts/build/application.js similarity index 82% rename from tasks/assets/javascripts/build/application.js rename to lib/tasks/assets/javascripts/build/application.js index 0307b1366..b0da1e32d 100644 --- a/tasks/assets/javascripts/build/application.js +++ b/lib/tasks/assets/javascripts/build/application.js @@ -35,7 +35,7 @@ export default (gulp, config, args) => { return () => { return gulp.src(`${config.assets.src}/javascripts/**/*.js`) - /* Transpile with webpack */ + /* Build with webpack */ .pipe( stream({ entry: "application.js", @@ -44,17 +44,27 @@ export default (gulp, config, args) => { library: "Application" }, module: { + + /* Transpile ES6 to ES5 with Babel */ loaders: [ { loader: "babel-loader", - test: path.join(process.cwd(), - `${config.assets.src}/javascripts`) + test: /\.jsx?$/ } ] }, plugins: [ - new webpack.NoErrorsPlugin() + + /* Don't emit assets that include errors */ + new webpack.NoErrorsPlugin(), + + /* Provide JSX helper */ + new webpack.ProvidePlugin({ + JSX: path.join(process.cwd(), `${config.lib}/providers/jsx.js`) + }) ].concat( + + /* Minify sources */ args.optimize ? [ new webpack.optimize.UglifyJsPlugin({ compress: { @@ -62,20 +72,30 @@ export default (gulp, config, args) => { } }) ] : []), - stats: { - colors: true - }, + + /* Module resolver */ resolve: { modulesDirectories: [ "src/assets/javascripts", "node_modules" ], extensions: [ - "", ".js" + "", + ".js", + ".jsx" ] }, + + /* Webpack commandline output */ + stats: { + colors: true + }, + + /* Sourcemap support */ devtool: args.sourcemaps ? "source-map" : "" })) + + /* Revisioning */ .pipe(gulpif(args.revision, rev())) .pipe(gulpif(args.revision, version({ manifest: gulp.src("manifest.json") }))) diff --git a/tasks/assets/javascripts/build/modernizr.js b/lib/tasks/assets/javascripts/build/modernizr.js similarity index 100% rename from tasks/assets/javascripts/build/modernizr.js rename to lib/tasks/assets/javascripts/build/modernizr.js diff --git a/tasks/assets/javascripts/clean.js b/lib/tasks/assets/javascripts/clean.js similarity index 100% rename from tasks/assets/javascripts/clean.js rename to lib/tasks/assets/javascripts/clean.js diff --git a/tasks/assets/javascripts/lint.js b/lib/tasks/assets/javascripts/lint.js similarity index 93% rename from tasks/assets/javascripts/lint.js rename to lib/tasks/assets/javascripts/lint.js index c8264b5a1..b5e17e5b4 100644 --- a/tasks/assets/javascripts/lint.js +++ b/lib/tasks/assets/javascripts/lint.js @@ -54,7 +54,7 @@ export default (gulp, config) => { file.eslint.results[0].filePath = path.relative(process.cwd(), file.path) - // eslint-disable-next-line no-invalid-this + /* Push file to next stage */ this.push(file) cb() })) @@ -67,7 +67,7 @@ export default (gulp, config) => { console.log(format(file.eslint.results)) } - // eslint-disable-next-line no-invalid-this + /* Push file to next stage */ this.push(file) cb() })) @@ -85,7 +85,7 @@ export default (gulp, config) => { if (results.errorCount || results.warningCount) errors.push(file) - // eslint-disable-next-line no-invalid-this + /* Push file to next stage */ this.push(file) cb() @@ -96,7 +96,7 @@ export default (gulp, config) => { return file.relative }).join(", ") - // eslint-disable-next-line no-invalid-this + /* Emit error */ this.emit("error", new util.PluginError("eslint", `Terminated with errors in files: ${message}`)) } diff --git a/tasks/assets/stylesheets/build.js b/lib/tasks/assets/stylesheets/build.js similarity index 100% rename from tasks/assets/stylesheets/build.js rename to lib/tasks/assets/stylesheets/build.js diff --git a/tasks/assets/stylesheets/clean.js b/lib/tasks/assets/stylesheets/clean.js similarity index 100% rename from tasks/assets/stylesheets/clean.js rename to lib/tasks/assets/stylesheets/clean.js diff --git a/tasks/assets/stylesheets/lint.js b/lib/tasks/assets/stylesheets/lint.js similarity index 92% rename from tasks/assets/stylesheets/lint.js rename to lib/tasks/assets/stylesheets/lint.js index 1ce179e7f..d61b40fe6 100644 --- a/tasks/assets/stylesheets/lint.js +++ b/lib/tasks/assets/stylesheets/lint.js @@ -29,7 +29,7 @@ import util from "gulp-util" * Task: lint SASS sources * ------------------------------------------------------------------------- */ -export default (gulp, config, args) => { +export default (gulp, config) => { return () => { return gulp.src(`${config.assets.src}/stylesheets/**/*.scss`) @@ -46,7 +46,7 @@ export default (gulp, config, args) => { filename: path.relative(process.cwd(), file.path) }) - // eslint-disable-next-line no-invalid-this + /* Push file to next stage */ this.push(file) cb() })) @@ -56,7 +56,7 @@ export default (gulp, config, args) => { through.obj(function(file, enc, cb) { sasslint.outputResults([file.sasslint]) - // eslint-disable-next-line no-invalid-this + /* Push file to next stage */ this.push(file) cb() })) @@ -74,7 +74,7 @@ export default (gulp, config, args) => { if (results.errorCount || results.warningCount) errors.push(file) - // eslint-disable-next-line no-invalid-this + /* Push file to next stage */ this.push(file) cb() @@ -85,7 +85,7 @@ export default (gulp, config, args) => { return file.relative }).join(", ") - // eslint-disable-next-line no-invalid-this + /* Emit error */ this.emit("error", new util.PluginError("eslint", `Terminated with errors in files: ${message}`)) } diff --git a/tasks/mkdocs/build.js b/lib/tasks/mkdocs/build.js similarity index 100% rename from tasks/mkdocs/build.js rename to lib/tasks/mkdocs/build.js diff --git a/tasks/mkdocs/clean.js b/lib/tasks/mkdocs/clean.js similarity index 100% rename from tasks/mkdocs/clean.js rename to lib/tasks/mkdocs/clean.js diff --git a/tasks/mkdocs/serve.js b/lib/tasks/mkdocs/serve.js similarity index 100% rename from tasks/mkdocs/serve.js rename to lib/tasks/mkdocs/serve.js diff --git a/lib/tasks/tests/unit.js b/lib/tasks/tests/unit.js new file mode 100644 index 000000000..d237ae9c3 --- /dev/null +++ b/lib/tasks/tests/unit.js @@ -0,0 +1,36 @@ +/* + * 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. + */ + +import path from "path" +import { Server } from "karma" + +/* ---------------------------------------------------------------------------- + * Task: start karma test runner + * ------------------------------------------------------------------------- */ + +export default (gulp, config) => { + return cb => { + new Server({ + configFile: path.join(process.cwd(), config.tests.unit) + }, cb).start() + } +} diff --git a/tasks/tests/unit/watch.js b/lib/tasks/tests/unit/watch.js similarity index 98% rename from tasks/tests/unit/watch.js rename to lib/tasks/tests/unit/watch.js index c92197523..f0d728c21 100644 --- a/tasks/tests/unit/watch.js +++ b/lib/tasks/tests/unit/watch.js @@ -29,7 +29,6 @@ import { Server } from "karma" export default () => { return cb => { - process.env.GULP = true new Server({ configFile: path.join(process.cwd(), "tests/karma.conf.js") }, cb).start() diff --git a/tasks/views/build.js b/lib/tasks/views/build.js similarity index 100% rename from tasks/views/build.js rename to lib/tasks/views/build.js diff --git a/tasks/views/clean.js b/lib/tasks/views/clean.js similarity index 100% rename from tasks/views/clean.js rename to lib/tasks/views/clean.js diff --git a/package.json b/package.json index b92df663d..2b2318356 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ ], "homepage": "http://squidfunk.github.io/mkdocs-material/", "bugs": { - "url" : "https://github.com/squidfunk/mkdocs-material/issues", - "email" : "martin.donath@squidfunk.com" + "url": "https://github.com/squidfunk/mkdocs-material/issues", + "email": "martin.donath@squidfunk.com" }, "license": "MIT", "author": { @@ -25,7 +25,7 @@ "scripts": { "build": "./node_modules/.bin/gulp build --clean --optimize --revision", "clean": "./node_modules/.bin/gulp clean", - "pre-commit": "./node_modules/.bin/gulp assets:lint", + "pre-commit": "./node_modules/.bin/eslint . && ./node_modules/.bin/sass-lint -c .sass-lint.yml -vq", "start": "./node_modules/.bin/gulp watch --no-lint", "test": "./node_modules/.bin/gulp test" }, diff --git a/tests/.babelrc b/tests/.babelrc deleted file mode 100644 index 61a632adb..000000000 --- a/tests/.babelrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "presets": ["es2015"], - "plugins": [ - "add-module-exports", - ["transform-react-jsx", { - "pragma": "createElement" - }] - ] -} \ No newline at end of file diff --git a/tests/karma.conf.js b/tests/karma.conf.js index 017a5132b..7cfde9669 100644 --- a/tests/karma.conf.js +++ b/tests/karma.conf.js @@ -20,6 +20,7 @@ * IN THE SOFTWARE. */ +const path = require("path") const webpack = require("webpack") /* ---------------------------------------------------------------------------- @@ -34,7 +35,7 @@ module.exports = karma => { /* Include babel polyfill to support older browsers */ files: [ "node_modules/babel-polyfill/dist/polyfill.js", - "tests/unit/*.spec.jsx" + "tests/unit/*.spec.+(js|jsx)" ], /* Test reporters */ @@ -47,27 +48,47 @@ module.exports = karma => { /* Preprocess test files */ preprocessors: { - "tests/unit/*.spec.jsx": ["webpack", "sourcemap"] + "tests/unit/*.spec.+(js|jsx)": ["webpack", "sourcemap"] }, /* Configuration for webpack */ webpack: { - devtool: "inline-source-map", - plugins: [ - - /* Inject DOM node creation helper for JSX support */ - new webpack.ProvidePlugin({ - createElement: "./_lib/create-element.js" - }) - ], module: { + + /* Transpile ES6 to ES5 with Babel */ loaders: [ { - test: /\.jsx?$/, - loader: "babel-loader" + loader: "babel-loader", + test: /\.jsx?$/ } ] - } + }, + plugins: [ + + /* Don't emit assets that include errors */ + new webpack.NoErrorsPlugin(), + + /* Provide JSX helper */ + new webpack.ProvidePlugin({ + JSX: path.join(process.cwd(), "lib/providers/jsx.js") + }) + ], + + /* Module resolver */ + resolve: { + modulesDirectories: [ + "src/assets/javascripts", + "node_modules" + ], + extensions: [ + "", + ".js", + ".jsx" + ] + }, + + /* Sourcemap support */ + devtool: "inline-source-map" }, /* Suppress messages by webpack */ @@ -85,12 +106,13 @@ module.exports = karma => { } /* Setup for continuous integration */ - if (process.env.CONTINUOUS_INTEGRATION) { + if (process.env.CI) { // TODO TBD /* Setup for local development environment */ - } else if (process.env.GULP) { + } else if (process.env.WATCH) { delete config.reporters + delete config.client.captureConsole /* Setup for local testing */ } else { diff --git a/tests/unit/Marker.spec.jsx b/tests/unit/Marker.spec.jsx index df335d9b3..b137d5ab1 100644 --- a/tests/unit/Marker.spec.jsx +++ b/tests/unit/Marker.spec.jsx @@ -1,24 +1,76 @@ +/* + * 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. + */ import chai from "chai" +import Marker from + "../../src/assets/javascripts/components/Material/Sidebar/Marker" + describe("Karma test runner", function() { chai.should() - let sandbox = null - + // TODO: sandbox shit! should be okay once? beforeEach(function() { - sandbox = ( -
      - {[...Array(10)].map((x, i) => { - return
    • Element {i + 1}
    • + + for (let i = 0; i < 25; i++) + document.body.appendChild( +

      {i + 1}

      + ) + + document.body.appendChild( +
        + {[...Array(25)].map((_, i) => { + return ( +
      • + {i + 1} +
      • + ) })}
      ) }) - it("should compile JSX correctly", function() { - document.body.appendChild(sandbox) - return true - }) + it("should compile JSX correctly", + shouldCompileJSXCorrectly) }) +// iframe? +function shouldCompileJSXCorrectly(cb) { + const marker = new Marker("a") + marker.listen() + + // window.location.hash = "#_5" + // window.addEventListener("hashchange", function(e) { + // console.log(document.querySelectorAll("[data-md-marked]")) + // cb() + // }) + window.scrollTo(200, 200) + setTimeout(() => { + console.log(document.querySelectorAll("[data-md-marked]")) + cb() + }, 100) + + // console.log(marker) + // return true + +} + From e7160cb85c91024f195a58e3b7fb50466b353905 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Wed, 12 Oct 2016 09:28:30 +0200 Subject: [PATCH 037/202] Remove gemini for now as it breaks the build --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 2b2318356..5b2ae6dd0 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,6 @@ "del": "^2.2.0", "eslint": "^3.6.1", "eslint-plugin-mocha": "^4.6.0", - "gemini": "^4.11.3", "git-hooks": "^1.1.6", "gulp": "^3.9.1", "gulp-changed": "^1.3.2", From 4dbb6095bccd128d1826074ca2d0aa0ca152c9a0 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Wed, 12 Oct 2016 09:40:23 +0200 Subject: [PATCH 038/202] Update GCC to 4.8 in Travis build environment --- .travis.yml | 12 +++++++++++- package.json | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 28e813bd0..08afa130f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,15 +19,25 @@ # IN THE SOFTWARE. language: node_js +sudo: false # Node.js versions node_js: - 4.5.0 - 6.7.0 +# Update GCC to 4.8 to build Gemini +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-4.8 + - g++-4.8 + # Install dependencies before_script: - npm install # Perform build and tests -script: npm run build \ No newline at end of file +script: npm run build diff --git a/package.json b/package.json index 5b2ae6dd0..2b2318356 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "del": "^2.2.0", "eslint": "^3.6.1", "eslint-plugin-mocha": "^4.6.0", + "gemini": "^4.11.3", "git-hooks": "^1.1.6", "gulp": "^3.9.1", "gulp-changed": "^1.3.2", From 1b58bba1159f874a37d31402ab3eb71840d04e3c Mon Sep 17 00:00:00 2001 From: Brendan Abbott Date: Wed, 12 Oct 2016 17:13:57 +1000 Subject: [PATCH 039/202] Update documentation for installation --- README.md | 2 +- docs/customization.md | 10 +++------- docs/getting-started.md | 2 +- docs/index.md | 2 +- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 967fa8a67..b5b7e91d7 100644 --- a/README.md +++ b/README.md @@ -54,4 +54,4 @@ IN THE SOFTWARE. [pypi-dl-image]: https://img.shields.io/pypi/dm/mkdocs-material.png [pypi-dl-link]: https://pypi.python.org/pypi/mkdocs-material [pypi-v-image]: https://img.shields.io/pypi/v/mkdocs-material.png -[pypi-v-link]: https://pypi.python.org/pypi/mkdocs-material \ No newline at end of file +[pypi-v-link]: https://pypi.python.org/pypi/mkdocs-material diff --git a/docs/customization.md b/docs/customization.md index 7814b6a8c..ab927c1a3 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -33,11 +33,7 @@ so most things can be tweaked by changing a few variables. ### Setup In order to compile the project, you need `node` with a version greater than -`0.11` up and running. Then, make sure `bower` is installed or install it: - -``` sh -npm install -g bower -``` +`0.11` up and running. The project itself is hosted on GitHub, so the next thing you should do is clone the project from GitHub: @@ -51,7 +47,7 @@ Then you change the directory and install all dependencies specified in the ``` sh cd mkdocs-material -npm install && bower install +npm install ``` ### Development @@ -101,4 +97,4 @@ changes to the original Material theme. [MkDocs]: http://www.mkdocs.org [MkDocs documentation]: http://www.mkdocs.org/user-guide/styling-your-docs/#customising-a-theme [quantum-colors]: https://github.com/nkpfstr/quantum-colors -[material-colors]: http://www.materialui.co/colors \ No newline at end of file +[material-colors]: http://www.materialui.co/colors diff --git a/docs/getting-started.md b/docs/getting-started.md index bb83b0c2d..ca5bc007f 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -339,4 +339,4 @@ markdown_extensions: [highlight.js]: https://highlightjs.org [extra]: http://www.mkdocs.org/user-guide/styling-your-docs/#customising-a-theme [permalinks]: https://en.wikipedia.org/wiki/Permalink -[Admonition]: https://pythonhosted.org/Markdown/extensions/admonition.html \ No newline at end of file +[Admonition]: https://pythonhosted.org/Markdown/extensions/admonition.html diff --git a/docs/index.md b/docs/index.md index 5fbc03212..1ac5b1ae2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -61,4 +61,4 @@ it up and running. [Google Analytics integration]: getting-started.md#google-analytics-integration [extendable and customizable]: customization.md [Gulp]: http://gulpjs.com -[SASS]: http://sass-lang.com \ No newline at end of file +[SASS]: http://sass-lang.com From c814cc158401b1f4a41df43f739355c1b96a2770 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Wed, 12 Oct 2016 09:46:47 +0200 Subject: [PATCH 040/202] Remove Gemini again from package.json --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 2b2318356..5b2ae6dd0 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,6 @@ "del": "^2.2.0", "eslint": "^3.6.1", "eslint-plugin-mocha": "^4.6.0", - "gemini": "^4.11.3", "git-hooks": "^1.1.6", "gulp": "^3.9.1", "gulp-changed": "^1.3.2", From 4dbd2978a85d70c2fc8df19d557321ae61570e86 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sun, 16 Oct 2016 17:06:29 +0200 Subject: [PATCH 041/202] Added signal handler for karma --- lib/tasks/.eslintrc | 2 +- lib/tasks/assets/javascripts/lint.js | 18 +++++++++--------- lib/tasks/assets/stylesheets/lint.js | 18 +++++++++--------- lib/tasks/tests/unit.js | 4 ++-- lib/tasks/tests/unit/watch.js | 19 ++++++++++++++++--- 5 files changed, 37 insertions(+), 24 deletions(-) diff --git a/lib/tasks/.eslintrc b/lib/tasks/.eslintrc index d4cadde28..709b01107 100644 --- a/lib/tasks/.eslintrc +++ b/lib/tasks/.eslintrc @@ -2,4 +2,4 @@ "rules": { "no-invalid-this": 0 } -} \ No newline at end of file +} diff --git a/lib/tasks/assets/javascripts/lint.js b/lib/tasks/assets/javascripts/lint.js index b5e17e5b4..ab6f77817 100644 --- a/lib/tasks/assets/javascripts/lint.js +++ b/lib/tasks/assets/javascripts/lint.js @@ -42,9 +42,9 @@ export default (gulp, config) => { /* Linting */ .pipe( - through.obj(function(file, enc, cb) { + through.obj(function(file, enc, done) { if (file.isNull() || file.isStream()) - return cb() + return done() /* Lint file using .eslintrc */ file.eslint = eslint.executeOnText( @@ -56,12 +56,12 @@ export default (gulp, config) => { /* Push file to next stage */ this.push(file) - cb() + done() })) /* Print errors */ .pipe( - through.obj(function(file, enc, cb) { + through.obj(function(file, enc, done) { if (file.eslint.errorCount || file.eslint.warningCount) { // eslint-disable-next-line no-console console.log(format(file.eslint.results)) @@ -69,7 +69,7 @@ export default (gulp, config) => { /* Push file to next stage */ this.push(file) - cb() + done() })) /* Terminate on error */ @@ -78,7 +78,7 @@ export default (gulp, config) => { const errors = [] /* Gather errors */ - return through.obj(function(file, enc, cb) { + return through.obj(function(file, enc, done) { const results = file.eslint /* Consider warnings as errors */ @@ -87,10 +87,10 @@ export default (gulp, config) => { /* Push file to next stage */ this.push(file) - cb() + done() /* Format errors and terminate */ - }, function(cb) { + }, function(done) { if (errors.length > 0) { const message = errors.map(file => { return file.relative @@ -100,7 +100,7 @@ export default (gulp, config) => { this.emit("error", new util.PluginError("eslint", `Terminated with errors in files: ${message}`)) } - cb() + done() }) })()) } diff --git a/lib/tasks/assets/stylesheets/lint.js b/lib/tasks/assets/stylesheets/lint.js index d61b40fe6..04ac5ae3b 100644 --- a/lib/tasks/assets/stylesheets/lint.js +++ b/lib/tasks/assets/stylesheets/lint.js @@ -35,9 +35,9 @@ export default (gulp, config) => { /* Linting */ .pipe( - through.obj(function(file, enc, cb) { + through.obj(function(file, enc, done) { if (file.isNull() || file.isStream()) - return cb() + return done() /* Lint file using .sass-lint.yml */ file.sasslint = sasslint.lintFileText({ @@ -48,17 +48,17 @@ export default (gulp, config) => { /* Push file to next stage */ this.push(file) - cb() + done() })) /* Print errors */ .pipe( - through.obj(function(file, enc, cb) { + through.obj(function(file, enc, done) { sasslint.outputResults([file.sasslint]) /* Push file to next stage */ this.push(file) - cb() + done() })) /* Terminate on error */ @@ -67,7 +67,7 @@ export default (gulp, config) => { const errors = [] /* Gather errors */ - return through.obj(function(file, enc, cb) { + return through.obj(function(file, enc, done) { const results = file.sasslint /* Consider warnings as errors during clean compilation */ @@ -76,10 +76,10 @@ export default (gulp, config) => { /* Push file to next stage */ this.push(file) - cb() + done() /* Format errors and terminate */ - }, function(cb) { + }, function(done) { if (errors.length > 0) { const message = errors.map(file => { return file.relative @@ -89,7 +89,7 @@ export default (gulp, config) => { this.emit("error", new util.PluginError("eslint", `Terminated with errors in files: ${message}`)) } - cb() + done() }) })()) } diff --git a/lib/tasks/tests/unit.js b/lib/tasks/tests/unit.js index d237ae9c3..59e8f7908 100644 --- a/lib/tasks/tests/unit.js +++ b/lib/tasks/tests/unit.js @@ -28,9 +28,9 @@ import { Server } from "karma" * ------------------------------------------------------------------------- */ export default (gulp, config) => { - return cb => { + return done => { new Server({ configFile: path.join(process.cwd(), config.tests.unit) - }, cb).start() + }, done).start() } } diff --git a/lib/tasks/tests/unit/watch.js b/lib/tasks/tests/unit/watch.js index f0d728c21..9c7ca18e8 100644 --- a/lib/tasks/tests/unit/watch.js +++ b/lib/tasks/tests/unit/watch.js @@ -21,16 +21,29 @@ */ import path from "path" -import { Server } from "karma" +import { Server, stopper } from "karma" /* ---------------------------------------------------------------------------- * Task: start karma test runner * ------------------------------------------------------------------------- */ export default () => { - return cb => { + return done => { new Server({ configFile: path.join(process.cwd(), "tests/karma.conf.js") - }, cb).start() + }, done).start() } } + +/* ---------------------------------------------------------------------------- + * Signal handler + * ------------------------------------------------------------------------- */ + +/* Register signal handler for all relevant events */ +for (const signal of ["SIGTERM", "SIGINT", "exit"]) + process.on(signal, () => { + return stopper.stop({ + port: 9876, + logLevel: "OFF" + }) + }) From eaeba59dd8262f0603f6263e626772426f90e22e Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sun, 16 Oct 2016 17:08:34 +0200 Subject: [PATCH 042/202] Added guards for repository banner --- material/partials/header.html | 4 +++- material/partials/nav.html | 8 +++++--- src/partials/header.html | 4 +++- src/partials/nav.html | 8 +++++--- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/material/partials/header.html b/material/partials/header.html index 460cafe75..ed3f9a5c4 100644 --- a/material/partials/header.html +++ b/material/partials/header.html @@ -24,7 +24,9 @@
    - {% include "partials/source.html" %} + {% if repo_url %} + {% include "partials/source.html" %} + {% endif %}
    diff --git a/material/partials/nav.html b/material/partials/nav.html index 2be7dae37..2bdbf7bed 100644 --- a/material/partials/nav.html +++ b/material/partials/nav.html @@ -6,7 +6,9 @@ {% include "partials/nav-item.html" %} {% endfor %} -
    - {% include "partials/source.html" %} -
    + {% if repo_url %} +
    + {% include "partials/source.html" %} +
    + {% endif %} diff --git a/src/partials/header.html b/src/partials/header.html index 478a773b8..05618f40f 100644 --- a/src/partials/header.html +++ b/src/partials/header.html @@ -64,7 +64,9 @@
    - {% include "partials/source.html" %} + {% if repo_url %} + {% include "partials/source.html" %} + {% endif %}
    diff --git a/src/partials/nav.html b/src/partials/nav.html index 488d77391..37024a718 100644 --- a/src/partials/nav.html +++ b/src/partials/nav.html @@ -29,7 +29,9 @@ {% include "partials/nav-item.html" %} {% endfor %} -
    - {% include "partials/source.html" %} -
    + {% if repo_url %} +
    + {% include "partials/source.html" %} +
    + {% endif %} From a18eb4f98257a6acac9fb2d22d2b6c3218fbd3f1 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sun, 16 Oct 2016 18:22:07 +0200 Subject: [PATCH 043/202] Add extra.repo_type config option to override link parser --- material/partials/source.html | 17 +++++++++-------- src/partials/source.html | 17 +++++++++-------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/material/partials/source.html b/material/partials/source.html index c0cf1b8e7..ff4a54888 100644 --- a/material/partials/source.html +++ b/material/partials/source.html @@ -1,13 +1,14 @@ -{% if "github." in repo_url %} - {% set platform = "md-source--github" %} -{% elif "gitlab." in repo_url %} - {% set platform = "md-source--gitlab" %} -{% elif "bitbucket." in repo_url %} - {% set platform = "md-source--bitbucket" %} +{% set platform = config.extra.repo_icon or repo_url %} +{% if "github" in platform %} + {% set repo_icon = "md-source--github" %} +{% elif "gitlab" in platform %} + {% set repo_icon = "md-source--gitlab" %} +{% elif "bitbucket" in platform %} + {% set repo_icon = "md-source--bitbucket" %} {% else %} - {% set platform = "" %} + {% set repo_icon = "" %} {% endif %} - +
    {{ repo_name }}