jekyll-theme-chalk 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/404.html +39 -0
- data/LICENSE +21 -0
- data/LICENSE.txt +21 -0
- data/README.md +91 -0
- data/_assets/fonts/cormorant-garamond/Cormorant-Garamond-700.eot +0 -0
- data/_assets/fonts/cormorant-garamond/Cormorant-Garamond-700.ttf +0 -0
- data/_assets/fonts/cormorant-garamond/Cormorant-Garamond-700.woff +0 -0
- data/_assets/fonts/cormorant-garamond/Cormorant-Garamond-700.woff2 +0 -0
- data/_assets/fonts/ionicons/ionicons.eot +0 -0
- data/_assets/fonts/ionicons/ionicons.ttf +0 -0
- data/_assets/fonts/ionicons/ionicons.woff +0 -0
- data/_assets/fonts/lato/Lato-300.eot +0 -0
- data/_assets/fonts/lato/Lato-300.ttf +0 -0
- data/_assets/fonts/lato/Lato-300.woff +0 -0
- data/_assets/fonts/lato/Lato-300.woff2 +0 -0
- data/_assets/fonts/lato/Lato-700.eot +0 -0
- data/_assets/fonts/lato/Lato-700.ttf +0 -0
- data/_assets/fonts/lato/Lato-700.woff +0 -0
- data/_assets/fonts/lato/Lato-700.woff2 +0 -0
- data/_assets/fonts/lato/Lato-regular.eot +0 -0
- data/_assets/fonts/lato/Lato-regular.ttf +0 -0
- data/_assets/fonts/lato/Lato-regular.woff +0 -0
- data/_assets/fonts/lato/Lato-regular.woff2 +0 -0
- data/_assets/images/about.jpg +0 -0
- data/_assets/images/about@2x.jpg +0 -0
- data/_assets/images/apple-touch-icon.png +0 -0
- data/_assets/images/documentation/chalk-intro.png +0 -0
- data/_assets/images/documentation/chalk-intro@2x.png +0 -0
- data/_assets/images/documentation/enlarge.gif +0 -0
- data/_assets/images/documentation/enlarge@2x.gif +0 -0
- data/_assets/images/documentation/sample-image.jpg +0 -0
- data/_assets/images/documentation/sample-image@2x.jpg +0 -0
- data/_assets/images/og-image.jpg +0 -0
- data/_assets/javascripts/application.js +17 -0
- data/_assets/javascripts/scrollappear.js +25 -0
- data/_assets/javascripts/vendor.js +4 -0
- data/_assets/javascripts/webfonts.js +7 -0
- data/_assets/stylesheets/.csscomb.json +196 -0
- data/_assets/stylesheets/.scss-lint.yml +33 -0
- data/_assets/stylesheets/_base.scss +151 -0
- data/_assets/stylesheets/_mixins.scss +28 -0
- data/_assets/stylesheets/_variables.scss +47 -0
- data/_assets/stylesheets/dark.scss +71 -0
- data/_assets/stylesheets/fonts.scss +63 -0
- data/_assets/stylesheets/layouts/_footer.scss +17 -0
- data/_assets/stylesheets/layouts/_grid.scss +102 -0
- data/_assets/stylesheets/light.scss +71 -0
- data/_assets/stylesheets/modules/_about.scss +10 -0
- data/_assets/stylesheets/modules/_articles.scss +213 -0
- data/_assets/stylesheets/modules/_embed.scss +31 -0
- data/_assets/stylesheets/modules/_header.scss +57 -0
- data/_assets/stylesheets/modules/_highlights-dark.scss +415 -0
- data/_assets/stylesheets/modules/_highlights-light.scss +409 -0
- data/_assets/stylesheets/modules/_icons.scss +83 -0
- data/_assets/stylesheets/modules/_scrollappear.scss +14 -0
- data/_assets/stylesheets/notfound-dark.scss +91 -0
- data/_assets/stylesheets/notfound-light.scss +91 -0
- data/_assets/stylesheets/vendor/_normalize.scss +461 -0
- data/_assets/yarn/.yarn-integrity +22 -0
- data/_assets/yarn/fluidbox/.gitattributes +22 -0
- data/_assets/yarn/fluidbox/.npmignore +220 -0
- data/_assets/yarn/fluidbox/.travis.yml +6 -0
- data/_assets/yarn/fluidbox/Gruntfile.js +8 -0
- data/_assets/yarn/fluidbox/LICENSE.md +23 -0
- data/_assets/yarn/fluidbox/README.html +750 -0
- data/_assets/yarn/fluidbox/README.md +396 -0
- data/_assets/yarn/fluidbox/bower.json +35 -0
- data/_assets/yarn/fluidbox/demo/css/styles.min.css +2 -0
- data/_assets/yarn/fluidbox/demo/css/styles.min.css.map +1 -0
- data/_assets/yarn/fluidbox/demo/fonts/BLOKKRegular.eot +0 -0
- data/_assets/yarn/fluidbox/demo/fonts/BLOKKRegular.svg +233 -0
- data/_assets/yarn/fluidbox/demo/fonts/BLOKKRegular.ttf +0 -0
- data/_assets/yarn/fluidbox/demo/fonts/BLOKKRegular.woff +0 -0
- data/_assets/yarn/fluidbox/demo/fonts/fontello.eot +0 -0
- data/_assets/yarn/fluidbox/demo/fonts/fontello.svg +13 -0
- data/_assets/yarn/fluidbox/demo/fonts/fontello.ttf +0 -0
- data/_assets/yarn/fluidbox/demo/fonts/fontello.woff +0 -0
- data/_assets/yarn/fluidbox/demo/index.html +758 -0
- data/_assets/yarn/fluidbox/demo/src/css/styles.scss +1131 -0
- data/_assets/yarn/fluidbox/dist/css/fluidbox.min.css +2 -0
- data/_assets/yarn/fluidbox/dist/css/fluidbox.min.css.map +1 -0
- data/_assets/yarn/fluidbox/dist/js/jquery.fluidbox.min.js +1 -0
- data/_assets/yarn/fluidbox/grunt/aliases.yaml +20 -0
- data/_assets/yarn/fluidbox/grunt/clean.js +5 -0
- data/_assets/yarn/fluidbox/grunt/concurrent.js +33 -0
- data/_assets/yarn/fluidbox/grunt/jshint.js +10 -0
- data/_assets/yarn/fluidbox/grunt/postcss.js +47 -0
- data/_assets/yarn/fluidbox/grunt/sass.js +42 -0
- data/_assets/yarn/fluidbox/grunt/uglify.js +7 -0
- data/_assets/yarn/fluidbox/grunt/watch.js +28 -0
- data/_assets/yarn/fluidbox/index.html +8 -0
- data/_assets/yarn/fluidbox/license.txt +21 -0
- data/_assets/yarn/fluidbox/package.json +61 -0
- data/_assets/yarn/fluidbox/src/css/_fluidbox.scss +95 -0
- data/_assets/yarn/fluidbox/src/css/fluidbox.scss +2 -0
- data/_assets/yarn/fluidbox/src/js/jquery.fluidbox.js +722 -0
- data/_assets/yarn/jquery/AUTHORS.txt +301 -0
- data/_assets/yarn/jquery/LICENSE.txt +36 -0
- data/_assets/yarn/jquery/README.md +67 -0
- data/_assets/yarn/jquery/bower.json +14 -0
- data/_assets/yarn/jquery/dist/core.js +476 -0
- data/_assets/yarn/jquery/dist/jquery.js +10253 -0
- data/_assets/yarn/jquery/dist/jquery.min.js +4 -0
- data/_assets/yarn/jquery/dist/jquery.min.map +1 -0
- data/_assets/yarn/jquery/dist/jquery.slim.js +8160 -0
- data/_assets/yarn/jquery/dist/jquery.slim.min.js +4 -0
- data/_assets/yarn/jquery/dist/jquery.slim.min.map +1 -0
- data/_assets/yarn/jquery/external/sizzle/LICENSE.txt +36 -0
- data/_assets/yarn/jquery/external/sizzle/dist/sizzle.js +2272 -0
- data/_assets/yarn/jquery/external/sizzle/dist/sizzle.min.js +3 -0
- data/_assets/yarn/jquery/external/sizzle/dist/sizzle.min.map +1 -0
- data/_assets/yarn/jquery/package.json +97 -0
- data/_assets/yarn/jquery/src/.eslintrc.json +5 -0
- data/_assets/yarn/jquery/src/ajax.js +855 -0
- data/_assets/yarn/jquery/src/ajax/jsonp.js +102 -0
- data/_assets/yarn/jquery/src/ajax/load.js +76 -0
- data/_assets/yarn/jquery/src/ajax/parseXML.js +30 -0
- data/_assets/yarn/jquery/src/ajax/script.js +77 -0
- data/_assets/yarn/jquery/src/ajax/var/location.js +5 -0
- data/_assets/yarn/jquery/src/ajax/var/nonce.js +7 -0
- data/_assets/yarn/jquery/src/ajax/var/rquery.js +5 -0
- data/_assets/yarn/jquery/src/ajax/xhr.js +169 -0
- data/_assets/yarn/jquery/src/attributes.js +13 -0
- data/_assets/yarn/jquery/src/attributes/attr.js +141 -0
- data/_assets/yarn/jquery/src/attributes/classes.js +174 -0
- data/_assets/yarn/jquery/src/attributes/prop.js +143 -0
- data/_assets/yarn/jquery/src/attributes/support.js +33 -0
- data/_assets/yarn/jquery/src/attributes/val.js +190 -0
- data/_assets/yarn/jquery/src/callbacks.js +234 -0
- data/_assets/yarn/jquery/src/core.js +476 -0
- data/_assets/yarn/jquery/src/core/DOMEval.js +16 -0
- data/_assets/yarn/jquery/src/core/access.js +70 -0
- data/_assets/yarn/jquery/src/core/init.js +128 -0
- data/_assets/yarn/jquery/src/core/nodeName.js +13 -0
- data/_assets/yarn/jquery/src/core/parseHTML.js +65 -0
- data/_assets/yarn/jquery/src/core/ready-no-deferred.js +96 -0
- data/_assets/yarn/jquery/src/core/ready.js +86 -0
- data/_assets/yarn/jquery/src/core/readyException.js +13 -0
- data/_assets/yarn/jquery/src/core/stripAndCollapse.js +14 -0
- data/_assets/yarn/jquery/src/core/support.js +20 -0
- data/_assets/yarn/jquery/src/core/var/rsingleTag.js +6 -0
- data/_assets/yarn/jquery/src/css.js +438 -0
- data/_assets/yarn/jquery/src/css/addGetHookIf.js +26 -0
- data/_assets/yarn/jquery/src/css/adjustCSS.js +71 -0
- data/_assets/yarn/jquery/src/css/curCSS.js +65 -0
- data/_assets/yarn/jquery/src/css/hiddenVisibleSelectors.js +15 -0
- data/_assets/yarn/jquery/src/css/showHide.js +105 -0
- data/_assets/yarn/jquery/src/css/support.js +89 -0
- data/_assets/yarn/jquery/src/css/var/cssExpand.js +5 -0
- data/_assets/yarn/jquery/src/css/var/getStyles.js +17 -0
- data/_assets/yarn/jquery/src/css/var/isHiddenWithinTree.js +34 -0
- data/_assets/yarn/jquery/src/css/var/rmargin.js +5 -0
- data/_assets/yarn/jquery/src/css/var/rnumnonpx.js +7 -0
- data/_assets/yarn/jquery/src/css/var/swap.js +26 -0
- data/_assets/yarn/jquery/src/data.js +179 -0
- data/_assets/yarn/jquery/src/data/Data.js +161 -0
- data/_assets/yarn/jquery/src/data/var/acceptData.js +19 -0
- data/_assets/yarn/jquery/src/data/var/dataPriv.js +7 -0
- data/_assets/yarn/jquery/src/data/var/dataUser.js +7 -0
- data/_assets/yarn/jquery/src/deferred.js +391 -0
- data/_assets/yarn/jquery/src/deferred/exceptionHook.js +21 -0
- data/_assets/yarn/jquery/src/deprecated.js +40 -0
- data/_assets/yarn/jquery/src/dimensions.js +56 -0
- data/_assets/yarn/jquery/src/effects.js +699 -0
- data/_assets/yarn/jquery/src/effects/Tween.js +123 -0
- data/_assets/yarn/jquery/src/effects/animatedSelector.js +15 -0
- data/_assets/yarn/jquery/src/event.js +746 -0
- data/_assets/yarn/jquery/src/event/ajax.js +22 -0
- data/_assets/yarn/jquery/src/event/alias.js +29 -0
- data/_assets/yarn/jquery/src/event/focusin.js +55 -0
- data/_assets/yarn/jquery/src/event/support.js +11 -0
- data/_assets/yarn/jquery/src/event/trigger.js +185 -0
- data/_assets/yarn/jquery/src/exports/amd.js +26 -0
- data/_assets/yarn/jquery/src/exports/global.js +34 -0
- data/_assets/yarn/jquery/src/jquery.js +41 -0
- data/_assets/yarn/jquery/src/manipulation.js +488 -0
- data/_assets/yarn/jquery/src/manipulation/_evalUrl.js +23 -0
- data/_assets/yarn/jquery/src/manipulation/buildFragment.js +104 -0
- data/_assets/yarn/jquery/src/manipulation/getAll.js +32 -0
- data/_assets/yarn/jquery/src/manipulation/setGlobalEval.js +22 -0
- data/_assets/yarn/jquery/src/manipulation/support.js +35 -0
- data/_assets/yarn/jquery/src/manipulation/var/rcheckableType.js +5 -0
- data/_assets/yarn/jquery/src/manipulation/var/rscriptType.js +5 -0
- data/_assets/yarn/jquery/src/manipulation/var/rtagName.js +5 -0
- data/_assets/yarn/jquery/src/manipulation/wrapMap.js +29 -0
- data/_assets/yarn/jquery/src/offset.js +229 -0
- data/_assets/yarn/jquery/src/queue.js +145 -0
- data/_assets/yarn/jquery/src/queue/delay.js +24 -0
- data/_assets/yarn/jquery/src/selector-native.js +237 -0
- data/_assets/yarn/jquery/src/selector-sizzle.js +19 -0
- data/_assets/yarn/jquery/src/selector.js +3 -0
- data/_assets/yarn/jquery/src/serialize.js +130 -0
- data/_assets/yarn/jquery/src/traversing.js +191 -0
- data/_assets/yarn/jquery/src/traversing/findFilter.js +106 -0
- data/_assets/yarn/jquery/src/traversing/var/dir.js +22 -0
- data/_assets/yarn/jquery/src/traversing/var/rneedsContext.js +8 -0
- data/_assets/yarn/jquery/src/traversing/var/siblings.js +17 -0
- data/_assets/yarn/jquery/src/var/ObjectFunctionString.js +7 -0
- data/_assets/yarn/jquery/src/var/arr.js +5 -0
- data/_assets/yarn/jquery/src/var/class2type.js +6 -0
- data/_assets/yarn/jquery/src/var/concat.js +7 -0
- data/_assets/yarn/jquery/src/var/document.js +5 -0
- data/_assets/yarn/jquery/src/var/documentElement.js +7 -0
- data/_assets/yarn/jquery/src/var/fnToString.js +7 -0
- data/_assets/yarn/jquery/src/var/getProto.js +5 -0
- data/_assets/yarn/jquery/src/var/hasOwn.js +7 -0
- data/_assets/yarn/jquery/src/var/indexOf.js +7 -0
- data/_assets/yarn/jquery/src/var/pnum.js +5 -0
- data/_assets/yarn/jquery/src/var/push.js +7 -0
- data/_assets/yarn/jquery/src/var/rcssNum.js +9 -0
- data/_assets/yarn/jquery/src/var/rnothtmlwhite.js +8 -0
- data/_assets/yarn/jquery/src/var/slice.js +7 -0
- data/_assets/yarn/jquery/src/var/support.js +6 -0
- data/_assets/yarn/jquery/src/var/toString.js +7 -0
- data/_assets/yarn/jquery/src/wrap.js +77 -0
- data/_assets/yarn/retinajs/.babelrc +4 -0
- data/_assets/yarn/retinajs/.editorconfig +15 -0
- data/_assets/yarn/retinajs/.eslintignore +2 -0
- data/_assets/yarn/retinajs/.eslintrc +9 -0
- data/_assets/yarn/retinajs/.npmignore +7 -0
- data/_assets/yarn/retinajs/.travis.yml +20 -0
- data/_assets/yarn/retinajs/LICENSE +20 -0
- data/_assets/yarn/retinajs/README.md +267 -0
- data/_assets/yarn/retinajs/bower.json +25 -0
- data/_assets/yarn/retinajs/dist/_retina.sass +68 -0
- data/_assets/yarn/retinajs/dist/_retina.scss +102 -0
- data/_assets/yarn/retinajs/dist/retina.js +100 -0
- data/_assets/yarn/retinajs/dist/retina.js.map +1 -0
- data/_assets/yarn/retinajs/dist/retina.less +56 -0
- data/_assets/yarn/retinajs/dist/retina.min.js +2 -0
- data/_assets/yarn/retinajs/dist/retina.min.js.map +1 -0
- data/_assets/yarn/retinajs/dist/retina.styl +56 -0
- data/_assets/yarn/retinajs/es/_retina.sass +68 -0
- data/_assets/yarn/retinajs/es/_retina.scss +102 -0
- data/_assets/yarn/retinajs/es/retina.js +91 -0
- data/_assets/yarn/retinajs/es/retina.js.map +1 -0
- data/_assets/yarn/retinajs/es/retina.less +56 -0
- data/_assets/yarn/retinajs/es/retina.styl +56 -0
- data/_assets/yarn/retinajs/gulpfile.babel.js +154 -0
- data/_assets/yarn/retinajs/package.json +57 -0
- data/_assets/yarn/retinajs/src/_retina.sass +68 -0
- data/_assets/yarn/retinajs/src/_retina.scss +102 -0
- data/_assets/yarn/retinajs/src/retina.js +246 -0
- data/_assets/yarn/retinajs/src/retina.less +56 -0
- data/_assets/yarn/retinajs/src/retina.styl +56 -0
- data/_assets/yarn/retinajs/test/DOM.js +44 -0
- data/_assets/yarn/retinajs/test/fixtures/image.js +19 -0
- data/_assets/yarn/retinajs/test/fixtures/less_expected_output.css +18 -0
- data/_assets/yarn/retinajs/test/fixtures/scss_expected_output.css +13 -0
- data/_assets/yarn/retinajs/test/fixtures/test.less +10 -0
- data/_assets/yarn/retinajs/test/fixtures/test.scss +11 -0
- data/_assets/yarn/retinajs/test/fixtures/xml_http_request.js +24 -0
- data/_assets/yarn/retinajs/test/functional/public/google-logo.png +0 -0
- data/_assets/yarn/retinajs/test/functional/public/google-logo@2x.png +0 -0
- data/_assets/yarn/retinajs/test/functional/public/google-logo@3x.png +0 -0
- data/_assets/yarn/retinajs/test/functional/public/index.html +190 -0
- data/_assets/yarn/retinajs/test/functional/public/ipad.png +0 -0
- data/_assets/yarn/retinajs/test/functional/public/ipad@2x.png +0 -0
- data/_assets/yarn/retinajs/test/functional/public/ipad@3x.png +0 -0
- data/_assets/yarn/retinajs/test/functional/public/styles/_retina.sass +68 -0
- data/_assets/yarn/retinajs/test/functional/public/styles/_retina.scss +102 -0
- data/_assets/yarn/retinajs/test/functional/public/styles/less-base.less +13 -0
- data/_assets/yarn/retinajs/test/functional/public/styles/retina.less +56 -0
- data/_assets/yarn/retinajs/test/functional/public/styles/retina.less.css +73 -0
- data/_assets/yarn/retinajs/test/functional/public/styles/retina.sass.css +42 -0
- data/_assets/yarn/retinajs/test/functional/public/styles/retina.scss.css +96 -0
- data/_assets/yarn/retinajs/test/functional/public/styles/retina.styl +56 -0
- data/_assets/yarn/retinajs/test/functional/public/styles/retina.styl.css +61 -0
- data/_assets/yarn/retinajs/test/functional/public/styles/sass-base.sass +10 -0
- data/_assets/yarn/retinajs/test/functional/public/styles/scss-base.scss +13 -0
- data/_assets/yarn/retinajs/test/functional/public/styles/styl-base.styl +10 -0
- data/_assets/yarn/retinajs/test/mocha-runner.js +7 -0
- data/_assets/yarn/retinajs/test/retina.spec.js +14 -0
- data/_assets/yarn/scrollreveal/.gitattributes +10 -0
- data/_assets/yarn/scrollreveal/.github/CONTRIBUTING.md +9 -0
- data/_assets/yarn/scrollreveal/.github/ISSUE_TEMPLATE.md +11 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/base.css +213 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/index.html +158 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/index.html +93 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/package.json.html +143 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/constructor.js.html +311 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/defaults.js.html +158 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/functions/animate.js.html +395 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/functions/delegate.js.html +179 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/functions/index.html +145 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/functions/initialize.js.html +197 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/functions/rinse.js.html +311 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/functions/style.js.html +617 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/index.html +119 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/methods/clean.js.html +137 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/methods/destroy.js.html +182 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/methods/index.html +132 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/methods/reveal.js.html +524 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/methods/sync.js.html +125 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/noop.js.html +89 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/polyfills/index.html +93 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/polyfills/requestAnimationFrame.js.html +125 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/utils/browser.js.html +272 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/utils/core.js.html +434 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/utils/generic.js.html +218 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/utils/index.html +119 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/prettify.css +1 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/prettify.js +1 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/sort-arrow-sprite.png +0 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/sorter.js +158 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov.info +1016 -0
- data/_assets/yarn/scrollreveal/.ignore/coverage/server.coverage.js +11 -0
- data/_assets/yarn/scrollreveal/.ignore/sandbox/css/styles.css +32 -0
- data/_assets/yarn/scrollreveal/.ignore/sandbox/index.html +68 -0
- data/_assets/yarn/scrollreveal/.ignore/sandbox/js/scrollreveal.js +1271 -0
- data/_assets/yarn/scrollreveal/.ignore/sandbox/rollup.conf.sandbox.js +15 -0
- data/_assets/yarn/scrollreveal/.ignore/sandbox/server.sandbox.js +11 -0
- data/_assets/yarn/scrollreveal/.npmignore +8 -0
- data/_assets/yarn/scrollreveal/CHANGELOG.md +268 -0
- data/_assets/yarn/scrollreveal/LICENSE.md +12 -0
- data/_assets/yarn/scrollreveal/README.md +413 -0
- data/_assets/yarn/scrollreveal/bower.json +24 -0
- data/_assets/yarn/scrollreveal/dist/scrollreveal.js +860 -0
- data/_assets/yarn/scrollreveal/dist/scrollreveal.min.js +1 -0
- data/_assets/yarn/scrollreveal/gulpfile.js +33 -0
- data/_assets/yarn/scrollreveal/lib/gulp/gulp-clean.js +7 -0
- data/_assets/yarn/scrollreveal/lib/gulp/gulp-dev.js +6 -0
- data/_assets/yarn/scrollreveal/lib/gulp/gulp-dist-min.js +19 -0
- data/_assets/yarn/scrollreveal/lib/gulp/gulp-dist.js +6 -0
- data/_assets/yarn/scrollreveal/lib/gulp/gulp-server.js +9 -0
- data/_assets/yarn/scrollreveal/lib/gulp/gulp-validate-bower.js +13 -0
- data/_assets/yarn/scrollreveal/lib/gulp/gulp-watch.js +6 -0
- data/_assets/yarn/scrollreveal/src/scrollreveal.js +860 -0
- data/_assets/yarn/throttle-debounce-fn/.jscsrc +5 -0
- data/_assets/yarn/throttle-debounce-fn/.jshintrc +13 -0
- data/_assets/yarn/throttle-debounce-fn/.npmignore +1 -0
- data/_assets/yarn/throttle-debounce-fn/Gruntfile.js +76 -0
- data/_assets/yarn/throttle-debounce-fn/LICENSE.md +22 -0
- data/_assets/yarn/throttle-debounce-fn/README.md +55 -0
- data/_assets/yarn/throttle-debounce-fn/dist/throttle-debounce-fn.js +164 -0
- data/_assets/yarn/throttle-debounce-fn/dist/throttle-debounce-fn.min.js +10 -0
- data/_assets/yarn/throttle-debounce-fn/package.json +36 -0
- data/_assets/yarn/throttle-debounce-fn/src/throttle-debounce-fn.js +156 -0
- data/_assets/yarn/turbolinks/LICENSE +20 -0
- data/_assets/yarn/turbolinks/README.md +473 -0
- data/_assets/yarn/turbolinks/dist/turbolinks.js +6 -0
- data/_assets/yarn/turbolinks/src/turbolinks/BANNER.js.erb +4 -0
- data/_assets/yarn/turbolinks/src/turbolinks/VERSION +1 -0
- data/_assets/yarn/turbolinks/src/turbolinks/browser_adapter.coffee +61 -0
- data/_assets/yarn/turbolinks/src/turbolinks/compatibility.coffee +30 -0
- data/_assets/yarn/turbolinks/src/turbolinks/controller.coffee +239 -0
- data/_assets/yarn/turbolinks/src/turbolinks/error_renderer.coffee +21 -0
- data/_assets/yarn/turbolinks/src/turbolinks/head_details.coffee +51 -0
- data/_assets/yarn/turbolinks/src/turbolinks/helpers.coffee +57 -0
- data/_assets/yarn/turbolinks/src/turbolinks/history.coffee +48 -0
- data/_assets/yarn/turbolinks/src/turbolinks/http_request.coffee +88 -0
- data/_assets/yarn/turbolinks/src/turbolinks/index.coffee +18 -0
- data/_assets/yarn/turbolinks/src/turbolinks/location.coffee +70 -0
- data/_assets/yarn/turbolinks/src/turbolinks/progress_bar.coffee +83 -0
- data/_assets/yarn/turbolinks/src/turbolinks/renderer.coffee +27 -0
- data/_assets/yarn/turbolinks/src/turbolinks/scroll_manager.coffee +28 -0
- data/_assets/yarn/turbolinks/src/turbolinks/snapshot.coffee +47 -0
- data/_assets/yarn/turbolinks/src/turbolinks/snapshot_cache.coffee +43 -0
- data/_assets/yarn/turbolinks/src/turbolinks/snapshot_renderer.coffee +88 -0
- data/_assets/yarn/turbolinks/src/turbolinks/start.coffee +18 -0
- data/_assets/yarn/turbolinks/src/turbolinks/view.coffee +34 -0
- data/_assets/yarn/turbolinks/src/turbolinks/visit.coffee +162 -0
- data/_assets/yarn/webfontloader/CHANGELOG +419 -0
- data/_assets/yarn/webfontloader/LICENSE +176 -0
- data/_assets/yarn/webfontloader/README.md +394 -0
- data/_assets/yarn/webfontloader/package.json +37 -0
- data/_assets/yarn/webfontloader/src/closure.js +2 -0
- data/_assets/yarn/webfontloader/src/core/cssclassname.js +46 -0
- data/_assets/yarn/webfontloader/src/core/domhelper.js +405 -0
- data/_assets/yarn/webfontloader/src/core/eventdispatcher.js +195 -0
- data/_assets/yarn/webfontloader/src/core/font.js +140 -0
- data/_assets/yarn/webfontloader/src/core/fontmodule.js +16 -0
- data/_assets/yarn/webfontloader/src/core/fontmoduleloader.js +47 -0
- data/_assets/yarn/webfontloader/src/core/fontruler.js +60 -0
- data/_assets/yarn/webfontloader/src/core/fontwatcher.js +171 -0
- data/_assets/yarn/webfontloader/src/core/fontwatchrunner.js +249 -0
- data/_assets/yarn/webfontloader/src/core/initialize.js +97 -0
- data/_assets/yarn/webfontloader/src/core/nativefontwatchrunner.js +69 -0
- data/_assets/yarn/webfontloader/src/core/stylesheetwaiter.js +48 -0
- data/_assets/yarn/webfontloader/src/core/webfont.js +97 -0
- data/_assets/yarn/webfontloader/src/modules/custom.js +63 -0
- data/_assets/yarn/webfontloader/src/modules/fontdeck.js +66 -0
- data/_assets/yarn/webfontloader/src/modules/google/fontapiparser.js +181 -0
- data/_assets/yarn/webfontloader/src/modules/google/fontapiurlbuilder.js +77 -0
- data/_assets/yarn/webfontloader/src/modules/google/googlefontapi.js +54 -0
- data/_assets/yarn/webfontloader/src/modules/monotype.js +110 -0
- data/_assets/yarn/webfontloader/src/modules/typekit.js +73 -0
- data/_assets/yarn/webfontloader/webfontloader.js +17 -0
- data/_includes/footer.html +7 -0
- data/_includes/head.html +41 -0
- data/_includes/image.html +5 -0
- data/_includes/javascript.html +1 -0
- data/_includes/javascripts.html +19 -0
- data/_includes/navigation.html +75 -0
- data/_includes/stylesheet.html +1 -0
- data/_layouts/articles_by_tag.html +38 -0
- data/_layouts/default.html +16 -0
- data/_layouts/post.html +65 -0
- data/about.html +18 -0
- data/favicon.ico +0 -0
- data/feed.xml +20 -0
- data/index.html +49 -0
- data/robots.txt +5 -0
- metadata +596 -0
@@ -0,0 +1,6 @@
|
|
1
|
+
/*
|
2
|
+
Turbolinks 5.0.3
|
3
|
+
Copyright © 2017 Basecamp, LLC
|
4
|
+
*/
|
5
|
+
(function(){(function(){(function(){this.Turbolinks={supported:function(){return null!=window.history.pushState&&null!=window.requestAnimationFrame&&null!=window.addEventListener}(),visit:function(e,r){return t.controller.visit(e,r)},clearCache:function(){return t.controller.clearCache()}}}).call(this)}).call(this);var t=this.Turbolinks;(function(){(function(){var e,r,n=[].slice;t.copyObject=function(t){var e,r,n;r={};for(e in t)n=t[e],r[e]=n;return r},t.closest=function(t,r){return e.call(t,r)},e=function(){var t,e;return t=document.documentElement,null!=(e=t.closest)?e:function(t){var e;for(e=this;e;){if(e.nodeType===Node.ELEMENT_NODE&&r.call(e,t))return e;e=e.parentNode}}}(),t.defer=function(t){return setTimeout(t,1)},t.throttle=function(t){var e;return e=null,function(){var r;return r=1<=arguments.length?n.call(arguments,0):[],null!=e?e:e=requestAnimationFrame(function(n){return function(){return e=null,t.apply(n,r)}}(this))}},t.dispatch=function(t,e){var r,n,o,i,s;return i=null!=e?e:{},s=i.target,r=i.cancelable,n=i.data,o=document.createEvent("Events"),o.initEvent(t,!0,r===!0),o.data=null!=n?n:{},(null!=s?s:document).dispatchEvent(o),o},t.match=function(t,e){return r.call(t,e)},r=function(){var t,e,r,n;return t=document.documentElement,null!=(e=null!=(r=null!=(n=t.matchesSelector)?n:t.webkitMatchesSelector)?r:t.msMatchesSelector)?e:t.mozMatchesSelector}(),t.uuid=function(){var t,e,r;for(r="",t=e=1;36>=e;t=++e)r+=9===t||14===t||19===t||24===t?"-":15===t?"4":20===t?(Math.floor(4*Math.random())+8).toString(16):Math.floor(15*Math.random()).toString(16);return r}}).call(this),function(){t.Location=function(){function t(t){var e,r;null==t&&(t=""),r=document.createElement("a"),r.href=t.toString(),this.absoluteURL=r.href,e=r.hash.length,2>e?this.requestURL=this.absoluteURL:(this.requestURL=this.absoluteURL.slice(0,-e),this.anchor=r.hash.slice(1))}var e,r,n,o;return t.wrap=function(t){return t instanceof this?t:new this(t)},t.prototype.getOrigin=function(){return this.absoluteURL.split("/",3).join("/")},t.prototype.getPath=function(){var t,e;return null!=(t=null!=(e=this.absoluteURL.match(/\/\/[^\/]*(\/[^?;]*)/))?e[1]:void 0)?t:"/"},t.prototype.getPathComponents=function(){return this.getPath().split("/").slice(1)},t.prototype.getLastPathComponent=function(){return this.getPathComponents().slice(-1)[0]},t.prototype.getExtension=function(){var t,e;return null!=(t=null!=(e=this.getLastPathComponent().match(/\.[^.]*$/))?e[0]:void 0)?t:""},t.prototype.isHTML=function(){return this.getExtension().match(/^(?:|\.(?:htm|html|xhtml))$/)},t.prototype.isPrefixedBy=function(t){var e;return e=r(t),this.isEqualTo(t)||o(this.absoluteURL,e)},t.prototype.isEqualTo=function(t){return this.absoluteURL===(null!=t?t.absoluteURL:void 0)},t.prototype.toCacheKey=function(){return this.requestURL},t.prototype.toJSON=function(){return this.absoluteURL},t.prototype.toString=function(){return this.absoluteURL},t.prototype.valueOf=function(){return this.absoluteURL},r=function(t){return e(t.getOrigin()+t.getPath())},e=function(t){return n(t,"/")?t:t+"/"},o=function(t,e){return t.slice(0,e.length)===e},n=function(t,e){return t.slice(-e.length)===e},t}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.HttpRequest=function(){function r(r,n,o){this.delegate=r,this.requestCanceled=e(this.requestCanceled,this),this.requestTimedOut=e(this.requestTimedOut,this),this.requestFailed=e(this.requestFailed,this),this.requestLoaded=e(this.requestLoaded,this),this.requestProgressed=e(this.requestProgressed,this),this.url=t.Location.wrap(n).requestURL,this.referrer=t.Location.wrap(o).absoluteURL,this.createXHR()}return r.NETWORK_FAILURE=0,r.TIMEOUT_FAILURE=-1,r.timeout=60,r.prototype.send=function(){var t;return this.xhr&&!this.sent?(this.notifyApplicationBeforeRequestStart(),this.setProgress(0),this.xhr.send(),this.sent=!0,"function"==typeof(t=this.delegate).requestStarted?t.requestStarted():void 0):void 0},r.prototype.cancel=function(){return this.xhr&&this.sent?this.xhr.abort():void 0},r.prototype.requestProgressed=function(t){return t.lengthComputable?this.setProgress(t.loaded/t.total):void 0},r.prototype.requestLoaded=function(){return this.endRequest(function(t){return function(){var e;return 200<=(e=t.xhr.status)&&300>e?t.delegate.requestCompletedWithResponse(t.xhr.responseText,t.xhr.getResponseHeader("Turbolinks-Location")):(t.failed=!0,t.delegate.requestFailedWithStatusCode(t.xhr.status,t.xhr.responseText))}}(this))},r.prototype.requestFailed=function(){return this.endRequest(function(t){return function(){return t.failed=!0,t.delegate.requestFailedWithStatusCode(t.constructor.NETWORK_FAILURE)}}(this))},r.prototype.requestTimedOut=function(){return this.endRequest(function(t){return function(){return t.failed=!0,t.delegate.requestFailedWithStatusCode(t.constructor.TIMEOUT_FAILURE)}}(this))},r.prototype.requestCanceled=function(){return this.endRequest()},r.prototype.notifyApplicationBeforeRequestStart=function(){return t.dispatch("turbolinks:request-start",{data:{url:this.url,xhr:this.xhr}})},r.prototype.notifyApplicationAfterRequestEnd=function(){return t.dispatch("turbolinks:request-end",{data:{url:this.url,xhr:this.xhr}})},r.prototype.createXHR=function(){return this.xhr=new XMLHttpRequest,this.xhr.open("GET",this.url,!0),this.xhr.timeout=1e3*this.constructor.timeout,this.xhr.setRequestHeader("Accept","text/html, application/xhtml+xml"),this.xhr.setRequestHeader("Turbolinks-Referrer",this.referrer),this.xhr.onprogress=this.requestProgressed,this.xhr.onload=this.requestLoaded,this.xhr.onerror=this.requestFailed,this.xhr.ontimeout=this.requestTimedOut,this.xhr.onabort=this.requestCanceled},r.prototype.endRequest=function(t){return this.xhr?(this.notifyApplicationAfterRequestEnd(),null!=t&&t.call(this),this.destroy()):void 0},r.prototype.setProgress=function(t){var e;return this.progress=t,"function"==typeof(e=this.delegate).requestProgressed?e.requestProgressed(this.progress):void 0},r.prototype.destroy=function(){var t;return this.setProgress(1),"function"==typeof(t=this.delegate).requestFinished&&t.requestFinished(),this.delegate=null,this.xhr=null},r}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.ProgressBar=function(){function t(){this.trickle=e(this.trickle,this),this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement()}var r;return r=300,t.defaultCSS=".turbolinks-progress-bar {\n position: fixed;\n display: block;\n top: 0;\n left: 0;\n height: 3px;\n background: #0076ff;\n z-index: 9999;\n transition: width "+r+"ms ease-out, opacity "+r/2+"ms "+r/2+"ms ease-in;\n transform: translate3d(0, 0, 0);\n}",t.prototype.show=function(){return this.visible?void 0:(this.visible=!0,this.installStylesheetElement(),this.installProgressElement(),this.startTrickling())},t.prototype.hide=function(){return this.visible&&!this.hiding?(this.hiding=!0,this.fadeProgressElement(function(t){return function(){return t.uninstallProgressElement(),t.stopTrickling(),t.visible=!1,t.hiding=!1}}(this))):void 0},t.prototype.setValue=function(t){return this.value=t,this.refresh()},t.prototype.installStylesheetElement=function(){return document.head.insertBefore(this.stylesheetElement,document.head.firstChild)},t.prototype.installProgressElement=function(){return this.progressElement.style.width=0,this.progressElement.style.opacity=1,document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()},t.prototype.fadeProgressElement=function(t){return this.progressElement.style.opacity=0,setTimeout(t,1.5*r)},t.prototype.uninstallProgressElement=function(){return this.progressElement.parentNode?document.documentElement.removeChild(this.progressElement):void 0},t.prototype.startTrickling=function(){return null!=this.trickleInterval?this.trickleInterval:this.trickleInterval=setInterval(this.trickle,r)},t.prototype.stopTrickling=function(){return clearInterval(this.trickleInterval),this.trickleInterval=null},t.prototype.trickle=function(){return this.setValue(this.value+Math.random()/100)},t.prototype.refresh=function(){return requestAnimationFrame(function(t){return function(){return t.progressElement.style.width=10+90*t.value+"%"}}(this))},t.prototype.createStylesheetElement=function(){var t;return t=document.createElement("style"),t.type="text/css",t.textContent=this.constructor.defaultCSS,t},t.prototype.createProgressElement=function(){var t;return t=document.createElement("div"),t.className="turbolinks-progress-bar",t},t}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.BrowserAdapter=function(){function r(r){this.controller=r,this.showProgressBar=e(this.showProgressBar,this),this.progressBar=new t.ProgressBar}var n,o,i,s;return s=t.HttpRequest,n=s.NETWORK_FAILURE,i=s.TIMEOUT_FAILURE,o=500,r.prototype.visitProposedToLocationWithAction=function(t,e){return this.controller.startVisitToLocationWithAction(t,e)},r.prototype.visitStarted=function(t){return t.issueRequest(),t.changeHistory(),t.loadCachedSnapshot()},r.prototype.visitRequestStarted=function(t){return this.progressBar.setValue(0),t.hasCachedSnapshot()||"restore"!==t.action?this.showProgressBarAfterDelay():this.showProgressBar()},r.prototype.visitRequestProgressed=function(t){return this.progressBar.setValue(t.progress)},r.prototype.visitRequestCompleted=function(t){return t.loadResponse()},r.prototype.visitRequestFailedWithStatusCode=function(t,e){switch(e){case n:case i:return this.reload();default:return t.loadResponse()}},r.prototype.visitRequestFinished=function(t){return this.hideProgressBar()},r.prototype.visitCompleted=function(t){return t.followRedirect()},r.prototype.pageInvalidated=function(){return this.reload()},r.prototype.showProgressBarAfterDelay=function(){return this.progressBarTimeout=setTimeout(this.showProgressBar,o)},r.prototype.showProgressBar=function(){return this.progressBar.show()},r.prototype.hideProgressBar=function(){return this.progressBar.hide(),clearTimeout(this.progressBarTimeout)},r.prototype.reload=function(){return window.location.reload()},r}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.History=function(){function r(t){this.delegate=t,this.onPageLoad=e(this.onPageLoad,this),this.onPopState=e(this.onPopState,this)}return r.prototype.start=function(){return this.started?void 0:(addEventListener("popstate",this.onPopState,!1),addEventListener("load",this.onPageLoad,!1),this.started=!0)},r.prototype.stop=function(){return this.started?(removeEventListener("popstate",this.onPopState,!1),removeEventListener("load",this.onPageLoad,!1),this.started=!1):void 0},r.prototype.push=function(e,r){return e=t.Location.wrap(e),this.update("push",e,r)},r.prototype.replace=function(e,r){return e=t.Location.wrap(e),this.update("replace",e,r)},r.prototype.onPopState=function(e){var r,n,o,i;return this.shouldHandlePopState()&&(i=null!=(n=e.state)?n.turbolinks:void 0)?(r=t.Location.wrap(window.location),o=i.restorationIdentifier,this.delegate.historyPoppedToLocationWithRestorationIdentifier(r,o)):void 0},r.prototype.onPageLoad=function(e){return t.defer(function(t){return function(){return t.pageLoaded=!0}}(this))},r.prototype.shouldHandlePopState=function(){return this.pageIsLoaded()},r.prototype.pageIsLoaded=function(){return this.pageLoaded||"complete"===document.readyState},r.prototype.update=function(t,e,r){var n;return n={turbolinks:{restorationIdentifier:r}},history[t+"State"](n,null,e)},r}()}.call(this),function(){t.Snapshot=function(){function e(t){var e,r;r=t.head,e=t.body,this.head=null!=r?r:document.createElement("head"),this.body=null!=e?e:document.createElement("body")}return e.wrap=function(t){return t instanceof this?t:this.fromHTML(t)},e.fromHTML=function(t){var e;return e=document.createElement("html"),e.innerHTML=t,this.fromElement(e)},e.fromElement=function(t){return new this({head:t.querySelector("head"),body:t.querySelector("body")})},e.prototype.clone=function(){return new e({head:this.head.cloneNode(!0),body:this.body.cloneNode(!0)})},e.prototype.getRootLocation=function(){var e,r;return r=null!=(e=this.getSetting("root"))?e:"/",new t.Location(r)},e.prototype.getCacheControlValue=function(){return this.getSetting("cache-control")},e.prototype.hasAnchor=function(t){try{return null!=this.body.querySelector("[id='"+t+"']")}catch(e){}},e.prototype.isPreviewable=function(){return"no-preview"!==this.getCacheControlValue()},e.prototype.isCacheable=function(){return"no-cache"!==this.getCacheControlValue()},e.prototype.getSetting=function(t){var e,r;return r=this.head.querySelectorAll("meta[name='turbolinks-"+t+"']"),e=r[r.length-1],null!=e?e.getAttribute("content"):void 0},e}()}.call(this),function(){var e=[].slice;t.Renderer=function(){function t(){}var r;return t.render=function(){var t,r,n,o;return n=arguments[0],r=arguments[1],t=3<=arguments.length?e.call(arguments,2):[],o=function(t,e,r){r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return Object(o)===o?o:n}(this,t,function(){}),o.delegate=n,o.render(r),o},t.prototype.renderView=function(t){return this.delegate.viewWillRender(this.newBody),t(),this.delegate.viewRendered(this.newBody)},t.prototype.invalidateView=function(){return this.delegate.viewInvalidated()},t.prototype.createScriptElement=function(t){var e;return"false"===t.getAttribute("data-turbolinks-eval")?t:(e=document.createElement("script"),e.textContent=t.textContent,r(e,t),e)},r=function(t,e){var r,n,o,i,s,a,u;for(i=e.attributes,a=[],r=0,n=i.length;n>r;r++)s=i[r],o=s.name,u=s.value,a.push(t.setAttribute(o,u));return a},t}()}.call(this),function(){t.HeadDetails=function(){function t(t){var e,r,i,s,a,u,l;for(this.element=t,this.elements={},l=this.element.childNodes,s=0,u=l.length;u>s;s++)i=l[s],i.nodeType===Node.ELEMENT_NODE&&(a=i.outerHTML,r=null!=(e=this.elements)[a]?e[a]:e[a]={type:o(i),tracked:n(i),elements:[]},r.elements.push(i))}var e,r,n,o;return t.prototype.hasElementWithKey=function(t){return t in this.elements},t.prototype.getTrackedElementSignature=function(){var t,e;return function(){var r,n;r=this.elements,n=[];for(t in r)e=r[t].tracked,e&&n.push(t);return n}.call(this).join("")},t.prototype.getScriptElementsNotInDetails=function(t){return this.getElementsMatchingTypeNotInDetails("script",t)},t.prototype.getStylesheetElementsNotInDetails=function(t){return this.getElementsMatchingTypeNotInDetails("stylesheet",t)},t.prototype.getElementsMatchingTypeNotInDetails=function(t,e){var r,n,o,i,s,a;o=this.elements,s=[];for(n in o)i=o[n],a=i.type,r=i.elements,a!==t||e.hasElementWithKey(n)||s.push(r[0]);return s},t.prototype.getProvisionalElements=function(){var t,e,r,n,o,i,s;r=[],n=this.elements;for(e in n)o=n[e],s=o.type,i=o.tracked,t=o.elements,null!=s||i?t.length>1&&r.push.apply(r,t.slice(1)):r.push.apply(r,t);return r},o=function(t){return e(t)?"script":r(t)?"stylesheet":void 0},n=function(t){return"reload"===t.getAttribute("data-turbolinks-track")},e=function(t){var e;return e=t.tagName.toLowerCase(),"script"===e},r=function(t){var e;return e=t.tagName.toLowerCase(),"style"===e||"link"===e&&"stylesheet"===t.getAttribute("rel")},t}()}.call(this),function(){var e=function(t,e){function n(){this.constructor=t}for(var o in e)r.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;t.SnapshotRenderer=function(r){function n(e,r){this.currentSnapshot=e,this.newSnapshot=r,this.currentHeadDetails=new t.HeadDetails(this.currentSnapshot.head),this.newHeadDetails=new t.HeadDetails(this.newSnapshot.head),this.newBody=this.newSnapshot.body}return e(n,r),n.prototype.render=function(t){return this.trackedElementsAreIdentical()?(this.mergeHead(),this.renderView(function(e){return function(){return e.replaceBody(),e.focusFirstAutofocusableElement(),t()}}(this))):this.invalidateView()},n.prototype.mergeHead=function(){return this.copyNewHeadStylesheetElements(),this.copyNewHeadScriptElements(),this.removeCurrentHeadProvisionalElements(),this.copyNewHeadProvisionalElements()},n.prototype.replaceBody=function(){return this.activateBodyScriptElements(),this.importBodyPermanentElements(),this.assignNewBody()},n.prototype.trackedElementsAreIdentical=function(){return this.currentHeadDetails.getTrackedElementSignature()===this.newHeadDetails.getTrackedElementSignature()},n.prototype.copyNewHeadStylesheetElements=function(){var t,e,r,n,o;for(n=this.getNewHeadStylesheetElements(),o=[],e=0,r=n.length;r>e;e++)t=n[e],o.push(document.head.appendChild(t));return o},n.prototype.copyNewHeadScriptElements=function(){var t,e,r,n,o;for(n=this.getNewHeadScriptElements(),o=[],e=0,r=n.length;r>e;e++)t=n[e],o.push(document.head.appendChild(this.createScriptElement(t)));return o},n.prototype.removeCurrentHeadProvisionalElements=function(){var t,e,r,n,o;for(n=this.getCurrentHeadProvisionalElements(),o=[],e=0,r=n.length;r>e;e++)t=n[e],o.push(document.head.removeChild(t));return o},n.prototype.copyNewHeadProvisionalElements=function(){var t,e,r,n,o;for(n=this.getNewHeadProvisionalElements(),o=[],e=0,r=n.length;r>e;e++)t=n[e],o.push(document.head.appendChild(t));return o},n.prototype.importBodyPermanentElements=function(){var t,e,r,n,o,i;for(n=this.getNewBodyPermanentElements(),i=[],e=0,r=n.length;r>e;e++)o=n[e],(t=this.findCurrentBodyPermanentElement(o))?i.push(o.parentNode.replaceChild(t,o)):i.push(void 0);return i},n.prototype.activateBodyScriptElements=function(){var t,e,r,n,o,i;for(n=this.getNewBodyScriptElements(),i=[],e=0,r=n.length;r>e;e++)o=n[e],t=this.createScriptElement(o),i.push(o.parentNode.replaceChild(t,o));return i},n.prototype.assignNewBody=function(){return document.body=this.newBody},n.prototype.focusFirstAutofocusableElement=function(){var t;return null!=(t=this.findFirstAutofocusableElement())?t.focus():void 0},n.prototype.getNewHeadStylesheetElements=function(){return this.newHeadDetails.getStylesheetElementsNotInDetails(this.currentHeadDetails)},n.prototype.getNewHeadScriptElements=function(){return this.newHeadDetails.getScriptElementsNotInDetails(this.currentHeadDetails)},n.prototype.getCurrentHeadProvisionalElements=function(){return this.currentHeadDetails.getProvisionalElements()},n.prototype.getNewHeadProvisionalElements=function(){return this.newHeadDetails.getProvisionalElements()},n.prototype.getNewBodyPermanentElements=function(){return this.newBody.querySelectorAll("[id][data-turbolinks-permanent]")},n.prototype.findCurrentBodyPermanentElement=function(t){return document.body.querySelector("#"+t.id+"[data-turbolinks-permanent]")},n.prototype.getNewBodyScriptElements=function(){return this.newBody.querySelectorAll("script")},n.prototype.findFirstAutofocusableElement=function(){return document.body.querySelector("[autofocus]")},n}(t.Renderer)}.call(this),function(){var e=function(t,e){function n(){this.constructor=t}for(var o in e)r.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;t.ErrorRenderer=function(t){function r(t){this.html=t}return e(r,t),r.prototype.render=function(t){return this.renderView(function(e){return function(){return e.replaceDocumentHTML(),e.activateBodyScriptElements(),t()}}(this))},r.prototype.replaceDocumentHTML=function(){return document.documentElement.innerHTML=this.html},r.prototype.activateBodyScriptElements=function(){var t,e,r,n,o,i;for(n=this.getScriptElements(),i=[],e=0,r=n.length;r>e;e++)o=n[e],t=this.createScriptElement(o),i.push(o.parentNode.replaceChild(t,o));return i},r.prototype.getScriptElements=function(){return document.documentElement.querySelectorAll("script")},r}(t.Renderer)}.call(this),function(){t.View=function(){function e(t){this.delegate=t,this.element=document.documentElement}return e.prototype.getRootLocation=function(){return this.getSnapshot().getRootLocation()},e.prototype.getSnapshot=function(){return t.Snapshot.fromElement(this.element)},e.prototype.render=function(t,e){var r,n,o;return o=t.snapshot,r=t.error,n=t.isPreview,this.markAsPreview(n),null!=o?this.renderSnapshot(o,e):this.renderError(r,e)},e.prototype.markAsPreview=function(t){return t?this.element.setAttribute("data-turbolinks-preview",""):this.element.removeAttribute("data-turbolinks-preview")},e.prototype.renderSnapshot=function(e,r){return t.SnapshotRenderer.render(this.delegate,r,this.getSnapshot(),t.Snapshot.wrap(e))},e.prototype.renderError=function(e,r){return t.ErrorRenderer.render(this.delegate,r,e)},e}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.ScrollManager=function(){function r(r){this.delegate=r,this.onScroll=e(this.onScroll,this),this.onScroll=t.throttle(this.onScroll)}return r.prototype.start=function(){return this.started?void 0:(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)},r.prototype.stop=function(){return this.started?(removeEventListener("scroll",this.onScroll,!1),this.started=!1):void 0},r.prototype.scrollToElement=function(t){return t.scrollIntoView()},r.prototype.scrollToPosition=function(t){var e,r;return e=t.x,r=t.y,window.scrollTo(e,r)},r.prototype.onScroll=function(t){return this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})},r.prototype.updatePosition=function(t){var e;return this.position=t,null!=(e=this.delegate)?e.scrollPositionChanged(this.position):void 0},r}()}.call(this),function(){t.SnapshotCache=function(){function e(t){this.size=t,this.keys=[],this.snapshots={}}var r;return e.prototype.has=function(t){var e;return e=r(t),e in this.snapshots},e.prototype.get=function(t){var e;if(this.has(t))return e=this.read(t),this.touch(t),e},e.prototype.put=function(t,e){return this.write(t,e),this.touch(t),e},e.prototype.read=function(t){var e;return e=r(t),this.snapshots[e]},e.prototype.write=function(t,e){var n;return n=r(t),this.snapshots[n]=e},e.prototype.touch=function(t){var e,n;return n=r(t),e=this.keys.indexOf(n),e>-1&&this.keys.splice(e,1),this.keys.unshift(n),this.trim()},e.prototype.trim=function(){var t,e,r,n,o;for(n=this.keys.splice(this.size),o=[],t=0,r=n.length;r>t;t++)e=n[t],o.push(delete this.snapshots[e]);return o},r=function(e){return t.Location.wrap(e).toCacheKey()},e}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.Visit=function(){function r(r,n,o){this.controller=r,this.action=o,this.performScroll=e(this.performScroll,this),this.identifier=t.uuid(),this.location=t.Location.wrap(n),this.adapter=this.controller.adapter,this.state="initialized",this.timingMetrics={}}var n;return r.prototype.start=function(){return"initialized"===this.state?(this.recordTimingMetric("visitStart"),this.state="started",this.adapter.visitStarted(this)):void 0},r.prototype.cancel=function(){var t;return"started"===this.state?(null!=(t=this.request)&&t.cancel(),this.cancelRender(),this.state="canceled"):void 0},r.prototype.complete=function(){var t;return"started"===this.state?(this.recordTimingMetric("visitEnd"),this.state="completed","function"==typeof(t=this.adapter).visitCompleted&&t.visitCompleted(this),this.controller.visitCompleted(this)):void 0},r.prototype.fail=function(){var t;return"started"===this.state?(this.state="failed","function"==typeof(t=this.adapter).visitFailed?t.visitFailed(this):void 0):void 0},r.prototype.changeHistory=function(){var t,e;return this.historyChanged?void 0:(t=this.location.isEqualTo(this.referrer)?"replace":this.action,e=n(t),this.controller[e](this.location,this.restorationIdentifier),this.historyChanged=!0)},r.prototype.issueRequest=function(){return this.shouldIssueRequest()&&null==this.request?(this.progress=0,this.request=new t.HttpRequest(this,this.location,this.referrer),this.request.send()):void 0},r.prototype.getCachedSnapshot=function(){var t;return!(t=this.controller.getCachedSnapshotForLocation(this.location))||null!=this.location.anchor&&!t.hasAnchor(this.location.anchor)||"restore"!==this.action&&!t.isPreviewable()?void 0:t},r.prototype.hasCachedSnapshot=function(){return null!=this.getCachedSnapshot()},r.prototype.loadCachedSnapshot=function(){var t,e;return(e=this.getCachedSnapshot())?(t=this.shouldIssueRequest(),this.render(function(){var r;return this.cacheSnapshot(),this.controller.render({snapshot:e,isPreview:t},this.performScroll),"function"==typeof(r=this.adapter).visitRendered&&r.visitRendered(this),t?void 0:this.complete()})):void 0},r.prototype.loadResponse=function(){return null!=this.response?this.render(function(){var t,e;return this.cacheSnapshot(),this.request.failed?(this.controller.render({error:this.response},this.performScroll),"function"==typeof(t=this.adapter).visitRendered&&t.visitRendered(this),this.fail()):(this.controller.render({snapshot:this.response},this.performScroll),"function"==typeof(e=this.adapter).visitRendered&&e.visitRendered(this),this.complete())}):void 0},r.prototype.followRedirect=function(){return this.redirectedToLocation&&!this.followedRedirect?(this.location=this.redirectedToLocation,this.controller.replaceHistoryWithLocationAndRestorationIdentifier(this.redirectedToLocation,this.restorationIdentifier),this.followedRedirect=!0):void 0},r.prototype.requestStarted=function(){var t;return this.recordTimingMetric("requestStart"),"function"==typeof(t=this.adapter).visitRequestStarted?t.visitRequestStarted(this):void 0},r.prototype.requestProgressed=function(t){var e;return this.progress=t,"function"==typeof(e=this.adapter).visitRequestProgressed?e.visitRequestProgressed(this):void 0},r.prototype.requestCompletedWithResponse=function(e,r){return this.response=e,null!=r&&(this.redirectedToLocation=t.Location.wrap(r)),this.adapter.visitRequestCompleted(this)},r.prototype.requestFailedWithStatusCode=function(t,e){return this.response=e,this.adapter.visitRequestFailedWithStatusCode(this,t)},r.prototype.requestFinished=function(){var t;return this.recordTimingMetric("requestEnd"),"function"==typeof(t=this.adapter).visitRequestFinished?t.visitRequestFinished(this):void 0},r.prototype.performScroll=function(){return this.scrolled?void 0:("restore"===this.action?this.scrollToRestoredPosition()||this.scrollToTop():this.scrollToAnchor()||this.scrollToTop(),this.scrolled=!0)},r.prototype.scrollToRestoredPosition=function(){var t,e;return t=null!=(e=this.restorationData)?e.scrollPosition:void 0,null!=t?(this.controller.scrollToPosition(t),!0):void 0},r.prototype.scrollToAnchor=function(){return null!=this.location.anchor?(this.controller.scrollToAnchor(this.location.anchor),!0):void 0},r.prototype.scrollToTop=function(){return this.controller.scrollToPosition({x:0,y:0})},r.prototype.recordTimingMetric=function(t){var e;return null!=(e=this.timingMetrics)[t]?e[t]:e[t]=(new Date).getTime()},r.prototype.getTimingMetrics=function(){return t.copyObject(this.timingMetrics)},n=function(t){switch(t){case"replace":return"replaceHistoryWithLocationAndRestorationIdentifier";case"advance":case"restore":return"pushHistoryWithLocationAndRestorationIdentifier"}},r.prototype.shouldIssueRequest=function(){return"restore"===this.action?!this.hasCachedSnapshot():!0},r.prototype.cacheSnapshot=function(){return this.snapshotCached?void 0:(this.controller.cacheSnapshot(),this.snapshotCached=!0)},r.prototype.render=function(t){return this.cancelRender(),this.frame=requestAnimationFrame(function(e){return function(){return e.frame=null,t.call(e)}}(this))},r.prototype.cancelRender=function(){return this.frame?cancelAnimationFrame(this.frame):void 0},r}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.Controller=function(){function r(){this.clickBubbled=e(this.clickBubbled,this),this.clickCaptured=e(this.clickCaptured,this),this.pageLoaded=e(this.pageLoaded,this),this.history=new t.History(this),this.view=new t.View(this),this.scrollManager=new t.ScrollManager(this),this.restorationData={},this.clearCache()}return r.prototype.start=function(){return t.supported&&!this.started?(addEventListener("click",this.clickCaptured,!0),addEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.start(),this.startHistory(),this.started=!0,this.enabled=!0):void 0},r.prototype.disable=function(){return this.enabled=!1},r.prototype.stop=function(){return this.started?(removeEventListener("click",this.clickCaptured,!0),removeEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.stop(),this.stopHistory(),this.started=!1):void 0},r.prototype.clearCache=function(){return this.cache=new t.SnapshotCache(10)},r.prototype.visit=function(e,r){var n,o;return null==r&&(r={}),e=t.Location.wrap(e),this.applicationAllowsVisitingLocation(e)?this.locationIsVisitable(e)?(n=null!=(o=r.action)?o:"advance",this.adapter.visitProposedToLocationWithAction(e,n)):window.location=e:void 0},r.prototype.startVisitToLocationWithAction=function(e,r,n){var o;return t.supported?(o=this.getRestorationDataForIdentifier(n),this.startVisit(e,r,{restorationData:o})):window.location=e},r.prototype.startHistory=function(){return this.location=t.Location.wrap(window.location),this.restorationIdentifier=t.uuid(),this.history.start(),this.history.replace(this.location,this.restorationIdentifier)},r.prototype.stopHistory=function(){return this.history.stop()},r.prototype.pushHistoryWithLocationAndRestorationIdentifier=function(e,r){return this.restorationIdentifier=r,this.location=t.Location.wrap(e),this.history.push(this.location,this.restorationIdentifier)},r.prototype.replaceHistoryWithLocationAndRestorationIdentifier=function(e,r){return this.restorationIdentifier=r,this.location=t.Location.wrap(e),this.history.replace(this.location,this.restorationIdentifier)},r.prototype.historyPoppedToLocationWithRestorationIdentifier=function(e,r){var n;return this.restorationIdentifier=r,this.enabled?(n=this.getRestorationDataForIdentifier(this.restorationIdentifier),this.startVisit(e,"restore",{restorationIdentifier:this.restorationIdentifier,restorationData:n,historyChanged:!0}),this.location=t.Location.wrap(e)):this.adapter.pageInvalidated()},r.prototype.getCachedSnapshotForLocation=function(t){var e;return e=this.cache.get(t),e?e.clone():void 0},r.prototype.shouldCacheSnapshot=function(){return this.view.getSnapshot().isCacheable()},r.prototype.cacheSnapshot=function(){var t;return this.shouldCacheSnapshot()?(this.notifyApplicationBeforeCachingSnapshot(),t=this.view.getSnapshot(),this.cache.put(this.lastRenderedLocation,t.clone())):void 0},r.prototype.scrollToAnchor=function(t){var e;return(e=document.getElementById(t))?this.scrollToElement(e):this.scrollToPosition({x:0,y:0})},r.prototype.scrollToElement=function(t){return this.scrollManager.scrollToElement(t)},r.prototype.scrollToPosition=function(t){return this.scrollManager.scrollToPosition(t)},r.prototype.scrollPositionChanged=function(t){var e;return e=this.getCurrentRestorationData(),e.scrollPosition=t},r.prototype.render=function(t,e){return this.view.render(t,e)},r.prototype.viewInvalidated=function(){return this.adapter.pageInvalidated()},r.prototype.viewWillRender=function(t){return this.notifyApplicationBeforeRender(t)},r.prototype.viewRendered=function(){return this.lastRenderedLocation=this.currentVisit.location,this.notifyApplicationAfterRender()},r.prototype.pageLoaded=function(){return this.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()},r.prototype.clickCaptured=function(){return removeEventListener("click",this.clickBubbled,!1),addEventListener("click",this.clickBubbled,!1)},r.prototype.clickBubbled=function(t){var e,r,n;return this.enabled&&this.clickEventIsSignificant(t)&&(r=this.getVisitableLinkForNode(t.target))&&(n=this.getVisitableLocationForLink(r))&&this.applicationAllowsFollowingLinkToLocation(r,n)?(t.preventDefault(),e=this.getActionForLink(r),this.visit(n,{action:e})):void 0},r.prototype.applicationAllowsFollowingLinkToLocation=function(t,e){var r;return r=this.notifyApplicationAfterClickingLinkToLocation(t,e),!r.defaultPrevented},r.prototype.applicationAllowsVisitingLocation=function(t){var e;return e=this.notifyApplicationBeforeVisitingLocation(t),!e.defaultPrevented},r.prototype.notifyApplicationAfterClickingLinkToLocation=function(e,r){return t.dispatch("turbolinks:click",{target:e,data:{url:r.absoluteURL},cancelable:!0})},r.prototype.notifyApplicationBeforeVisitingLocation=function(e){return t.dispatch("turbolinks:before-visit",{data:{url:e.absoluteURL},cancelable:!0})},r.prototype.notifyApplicationAfterVisitingLocation=function(e){return t.dispatch("turbolinks:visit",{data:{url:e.absoluteURL}})},r.prototype.notifyApplicationBeforeCachingSnapshot=function(){return t.dispatch("turbolinks:before-cache")},r.prototype.notifyApplicationBeforeRender=function(e){
|
6
|
+
return t.dispatch("turbolinks:before-render",{data:{newBody:e}})},r.prototype.notifyApplicationAfterRender=function(){return t.dispatch("turbolinks:render")},r.prototype.notifyApplicationAfterPageLoad=function(e){return null==e&&(e={}),t.dispatch("turbolinks:load",{data:{url:this.location.absoluteURL,timing:e}})},r.prototype.startVisit=function(t,e,r){var n;return null!=(n=this.currentVisit)&&n.cancel(),this.currentVisit=this.createVisit(t,e,r),this.currentVisit.start(),this.notifyApplicationAfterVisitingLocation(t)},r.prototype.createVisit=function(e,r,n){var o,i,s,a,u;return i=null!=n?n:{},a=i.restorationIdentifier,s=i.restorationData,o=i.historyChanged,u=new t.Visit(this,e,r),u.restorationIdentifier=null!=a?a:t.uuid(),u.restorationData=t.copyObject(s),u.historyChanged=o,u.referrer=this.location,u},r.prototype.visitCompleted=function(t){return this.notifyApplicationAfterPageLoad(t.getTimingMetrics())},r.prototype.clickEventIsSignificant=function(t){return!(t.defaultPrevented||t.target.isContentEditable||t.which>1||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)},r.prototype.getVisitableLinkForNode=function(e){return this.nodeIsVisitable(e)?t.closest(e,"a[href]:not([target]):not([download])"):void 0},r.prototype.getVisitableLocationForLink=function(e){var r;return r=new t.Location(e.getAttribute("href")),this.locationIsVisitable(r)?r:void 0},r.prototype.getActionForLink=function(t){var e;return null!=(e=t.getAttribute("data-turbolinks-action"))?e:"advance"},r.prototype.nodeIsVisitable=function(e){var r;return(r=t.closest(e,"[data-turbolinks]"))?"false"!==r.getAttribute("data-turbolinks"):!0},r.prototype.locationIsVisitable=function(t){return t.isPrefixedBy(this.view.getRootLocation())&&t.isHTML()},r.prototype.getCurrentRestorationData=function(){return this.getRestorationDataForIdentifier(this.restorationIdentifier)},r.prototype.getRestorationDataForIdentifier=function(t){var e;return null!=(e=this.restorationData)[t]?e[t]:e[t]={}},r}()}.call(this),function(){var e,r,n;t.start=function(){return r()?(null==t.controller&&(t.controller=e()),t.controller.start()):void 0},r=function(){return null==window.Turbolinks&&(window.Turbolinks=t),n()},e=function(){var e;return e=new t.Controller,e.adapter=new t.BrowserAdapter(e),e},n=function(){return window.Turbolinks===t},n()&&t.start()}.call(this)}).call(this),"object"==typeof module&&module.exports?module.exports=t:"function"==typeof define&&define.amd&&define(t)}).call(this);
|
@@ -0,0 +1 @@
|
|
1
|
+
5.0.3
|
@@ -0,0 +1,61 @@
|
|
1
|
+
#= require ./http_request
|
2
|
+
#= require ./progress_bar
|
3
|
+
|
4
|
+
class Turbolinks.BrowserAdapter
|
5
|
+
{NETWORK_FAILURE, TIMEOUT_FAILURE} = Turbolinks.HttpRequest
|
6
|
+
PROGRESS_BAR_DELAY = 500
|
7
|
+
|
8
|
+
constructor: (@controller) ->
|
9
|
+
@progressBar = new Turbolinks.ProgressBar
|
10
|
+
|
11
|
+
visitProposedToLocationWithAction: (location, action) ->
|
12
|
+
@controller.startVisitToLocationWithAction(location, action)
|
13
|
+
|
14
|
+
visitStarted: (visit) ->
|
15
|
+
visit.issueRequest()
|
16
|
+
visit.changeHistory()
|
17
|
+
visit.loadCachedSnapshot()
|
18
|
+
|
19
|
+
visitRequestStarted: (visit) ->
|
20
|
+
@progressBar.setValue(0)
|
21
|
+
if visit.hasCachedSnapshot() or visit.action isnt "restore"
|
22
|
+
@showProgressBarAfterDelay()
|
23
|
+
else
|
24
|
+
@showProgressBar()
|
25
|
+
|
26
|
+
visitRequestProgressed: (visit) ->
|
27
|
+
@progressBar.setValue(visit.progress)
|
28
|
+
|
29
|
+
visitRequestCompleted: (visit) ->
|
30
|
+
visit.loadResponse()
|
31
|
+
|
32
|
+
visitRequestFailedWithStatusCode: (visit, statusCode) ->
|
33
|
+
switch statusCode
|
34
|
+
when NETWORK_FAILURE, TIMEOUT_FAILURE
|
35
|
+
@reload()
|
36
|
+
else
|
37
|
+
visit.loadResponse()
|
38
|
+
|
39
|
+
visitRequestFinished: (visit) ->
|
40
|
+
@hideProgressBar()
|
41
|
+
|
42
|
+
visitCompleted: (visit) ->
|
43
|
+
visit.followRedirect()
|
44
|
+
|
45
|
+
pageInvalidated: ->
|
46
|
+
@reload()
|
47
|
+
|
48
|
+
# Private
|
49
|
+
|
50
|
+
showProgressBarAfterDelay: ->
|
51
|
+
@progressBarTimeout = setTimeout(@showProgressBar, PROGRESS_BAR_DELAY)
|
52
|
+
|
53
|
+
showProgressBar: =>
|
54
|
+
@progressBar.show()
|
55
|
+
|
56
|
+
hideProgressBar: ->
|
57
|
+
@progressBar.hide()
|
58
|
+
clearTimeout(@progressBarTimeout)
|
59
|
+
|
60
|
+
reload: ->
|
61
|
+
window.location.reload()
|
@@ -0,0 +1,30 @@
|
|
1
|
+
{defer, dispatch} = Turbolinks
|
2
|
+
|
3
|
+
handleEvent = (eventName, handler) ->
|
4
|
+
document.addEventListener(eventName, handler, false)
|
5
|
+
|
6
|
+
translateEvent = ({from, to}) ->
|
7
|
+
handler = (event) ->
|
8
|
+
event = dispatch(to, target: event.target, cancelable: event.cancelable, data: event.data)
|
9
|
+
event.preventDefault() if event.defaultPrevented
|
10
|
+
handleEvent(from, handler)
|
11
|
+
|
12
|
+
translateEvent from: "turbolinks:click", to: "page:before-change"
|
13
|
+
translateEvent from: "turbolinks:request-start", to: "page:fetch"
|
14
|
+
translateEvent from: "turbolinks:request-end", to: "page:receive"
|
15
|
+
translateEvent from: "turbolinks:before-cache", to: "page:before-unload"
|
16
|
+
translateEvent from: "turbolinks:render", to: "page:update"
|
17
|
+
translateEvent from: "turbolinks:load", to: "page:change"
|
18
|
+
translateEvent from: "turbolinks:load", to: "page:update"
|
19
|
+
|
20
|
+
loaded = false
|
21
|
+
handleEvent "DOMContentLoaded", ->
|
22
|
+
defer ->
|
23
|
+
loaded = true
|
24
|
+
handleEvent "turbolinks:load", ->
|
25
|
+
if loaded
|
26
|
+
dispatch("page:load")
|
27
|
+
|
28
|
+
jQuery?(document).on "ajaxSuccess", (event, xhr, settings) ->
|
29
|
+
if jQuery.trim(xhr.responseText).length > 0
|
30
|
+
dispatch("page:update")
|
@@ -0,0 +1,239 @@
|
|
1
|
+
#= require ./location
|
2
|
+
#= require ./browser_adapter
|
3
|
+
#= require ./history
|
4
|
+
#= require ./view
|
5
|
+
#= require ./scroll_manager
|
6
|
+
#= require ./snapshot_cache
|
7
|
+
#= require ./visit
|
8
|
+
|
9
|
+
class Turbolinks.Controller
|
10
|
+
constructor: ->
|
11
|
+
@history = new Turbolinks.History this
|
12
|
+
@view = new Turbolinks.View this
|
13
|
+
@scrollManager = new Turbolinks.ScrollManager this
|
14
|
+
@restorationData = {}
|
15
|
+
@clearCache()
|
16
|
+
|
17
|
+
start: ->
|
18
|
+
if Turbolinks.supported and not @started
|
19
|
+
addEventListener("click", @clickCaptured, true)
|
20
|
+
addEventListener("DOMContentLoaded", @pageLoaded, false)
|
21
|
+
@scrollManager.start()
|
22
|
+
@startHistory()
|
23
|
+
@started = true
|
24
|
+
@enabled = true
|
25
|
+
|
26
|
+
disable: ->
|
27
|
+
@enabled = false
|
28
|
+
|
29
|
+
stop: ->
|
30
|
+
if @started
|
31
|
+
removeEventListener("click", @clickCaptured, true)
|
32
|
+
removeEventListener("DOMContentLoaded", @pageLoaded, false)
|
33
|
+
@scrollManager.stop()
|
34
|
+
@stopHistory()
|
35
|
+
@started = false
|
36
|
+
|
37
|
+
clearCache: ->
|
38
|
+
@cache = new Turbolinks.SnapshotCache 10
|
39
|
+
|
40
|
+
visit: (location, options = {}) ->
|
41
|
+
location = Turbolinks.Location.wrap(location)
|
42
|
+
if @applicationAllowsVisitingLocation(location)
|
43
|
+
if @locationIsVisitable(location)
|
44
|
+
action = options.action ? "advance"
|
45
|
+
@adapter.visitProposedToLocationWithAction(location, action)
|
46
|
+
else
|
47
|
+
window.location = location
|
48
|
+
|
49
|
+
startVisitToLocationWithAction: (location, action, restorationIdentifier) ->
|
50
|
+
if Turbolinks.supported
|
51
|
+
restorationData = @getRestorationDataForIdentifier(restorationIdentifier)
|
52
|
+
@startVisit(location, action, {restorationData})
|
53
|
+
else
|
54
|
+
window.location = location
|
55
|
+
|
56
|
+
# History
|
57
|
+
|
58
|
+
startHistory: ->
|
59
|
+
@location = Turbolinks.Location.wrap(window.location)
|
60
|
+
@restorationIdentifier = Turbolinks.uuid()
|
61
|
+
@history.start()
|
62
|
+
@history.replace(@location, @restorationIdentifier)
|
63
|
+
|
64
|
+
stopHistory: ->
|
65
|
+
@history.stop()
|
66
|
+
|
67
|
+
pushHistoryWithLocationAndRestorationIdentifier: (location, @restorationIdentifier) ->
|
68
|
+
@location = Turbolinks.Location.wrap(location)
|
69
|
+
@history.push(@location, @restorationIdentifier)
|
70
|
+
|
71
|
+
replaceHistoryWithLocationAndRestorationIdentifier: (location, @restorationIdentifier) ->
|
72
|
+
@location = Turbolinks.Location.wrap(location)
|
73
|
+
@history.replace(@location, @restorationIdentifier)
|
74
|
+
|
75
|
+
# History delegate
|
76
|
+
|
77
|
+
historyPoppedToLocationWithRestorationIdentifier: (location, @restorationIdentifier) ->
|
78
|
+
if @enabled
|
79
|
+
restorationData = @getRestorationDataForIdentifier(@restorationIdentifier)
|
80
|
+
@startVisit(location, "restore", {@restorationIdentifier, restorationData, historyChanged: true})
|
81
|
+
@location = Turbolinks.Location.wrap(location)
|
82
|
+
else
|
83
|
+
@adapter.pageInvalidated()
|
84
|
+
|
85
|
+
# Snapshot cache
|
86
|
+
|
87
|
+
getCachedSnapshotForLocation: (location) ->
|
88
|
+
snapshot = @cache.get(location)
|
89
|
+
snapshot.clone() if snapshot
|
90
|
+
|
91
|
+
shouldCacheSnapshot: ->
|
92
|
+
@view.getSnapshot().isCacheable()
|
93
|
+
|
94
|
+
cacheSnapshot: ->
|
95
|
+
if @shouldCacheSnapshot()
|
96
|
+
@notifyApplicationBeforeCachingSnapshot()
|
97
|
+
snapshot = @view.getSnapshot()
|
98
|
+
@cache.put(@lastRenderedLocation, snapshot.clone())
|
99
|
+
|
100
|
+
# Scrolling
|
101
|
+
|
102
|
+
scrollToAnchor: (anchor) ->
|
103
|
+
if element = document.getElementById(anchor)
|
104
|
+
@scrollToElement(element)
|
105
|
+
else
|
106
|
+
@scrollToPosition(x: 0, y: 0)
|
107
|
+
|
108
|
+
scrollToElement: (element) ->
|
109
|
+
@scrollManager.scrollToElement(element)
|
110
|
+
|
111
|
+
scrollToPosition: (position) ->
|
112
|
+
@scrollManager.scrollToPosition(position)
|
113
|
+
|
114
|
+
# Scroll manager delegate
|
115
|
+
|
116
|
+
scrollPositionChanged: (scrollPosition) ->
|
117
|
+
restorationData = @getCurrentRestorationData()
|
118
|
+
restorationData.scrollPosition = scrollPosition
|
119
|
+
|
120
|
+
# View
|
121
|
+
|
122
|
+
render: (options, callback) ->
|
123
|
+
@view.render(options, callback)
|
124
|
+
|
125
|
+
viewInvalidated: ->
|
126
|
+
@adapter.pageInvalidated()
|
127
|
+
|
128
|
+
viewWillRender: (newBody) ->
|
129
|
+
@notifyApplicationBeforeRender(newBody)
|
130
|
+
|
131
|
+
viewRendered: ->
|
132
|
+
@lastRenderedLocation = @currentVisit.location
|
133
|
+
@notifyApplicationAfterRender()
|
134
|
+
|
135
|
+
# Event handlers
|
136
|
+
|
137
|
+
pageLoaded: =>
|
138
|
+
@lastRenderedLocation = @location
|
139
|
+
@notifyApplicationAfterPageLoad()
|
140
|
+
|
141
|
+
clickCaptured: =>
|
142
|
+
removeEventListener("click", @clickBubbled, false)
|
143
|
+
addEventListener("click", @clickBubbled, false)
|
144
|
+
|
145
|
+
clickBubbled: (event) =>
|
146
|
+
if @enabled and @clickEventIsSignificant(event)
|
147
|
+
if link = @getVisitableLinkForNode(event.target)
|
148
|
+
if location = @getVisitableLocationForLink(link)
|
149
|
+
if @applicationAllowsFollowingLinkToLocation(link, location)
|
150
|
+
event.preventDefault()
|
151
|
+
action = @getActionForLink(link)
|
152
|
+
@visit(location, {action})
|
153
|
+
|
154
|
+
# Application events
|
155
|
+
|
156
|
+
applicationAllowsFollowingLinkToLocation: (link, location) ->
|
157
|
+
event = @notifyApplicationAfterClickingLinkToLocation(link, location)
|
158
|
+
not event.defaultPrevented
|
159
|
+
|
160
|
+
applicationAllowsVisitingLocation: (location) ->
|
161
|
+
event = @notifyApplicationBeforeVisitingLocation(location)
|
162
|
+
not event.defaultPrevented
|
163
|
+
|
164
|
+
notifyApplicationAfterClickingLinkToLocation: (link, location) ->
|
165
|
+
Turbolinks.dispatch("turbolinks:click", target: link, data: { url: location.absoluteURL }, cancelable: true)
|
166
|
+
|
167
|
+
notifyApplicationBeforeVisitingLocation: (location) ->
|
168
|
+
Turbolinks.dispatch("turbolinks:before-visit", data: { url: location.absoluteURL }, cancelable: true)
|
169
|
+
|
170
|
+
notifyApplicationAfterVisitingLocation: (location) ->
|
171
|
+
Turbolinks.dispatch("turbolinks:visit", data: { url: location.absoluteURL })
|
172
|
+
|
173
|
+
notifyApplicationBeforeCachingSnapshot: ->
|
174
|
+
Turbolinks.dispatch("turbolinks:before-cache")
|
175
|
+
|
176
|
+
notifyApplicationBeforeRender: (newBody) ->
|
177
|
+
Turbolinks.dispatch("turbolinks:before-render", data: {newBody})
|
178
|
+
|
179
|
+
notifyApplicationAfterRender: ->
|
180
|
+
Turbolinks.dispatch("turbolinks:render")
|
181
|
+
|
182
|
+
notifyApplicationAfterPageLoad: (timing = {}) ->
|
183
|
+
Turbolinks.dispatch("turbolinks:load", data: { url: @location.absoluteURL, timing })
|
184
|
+
|
185
|
+
# Private
|
186
|
+
|
187
|
+
startVisit: (location, action, properties) ->
|
188
|
+
@currentVisit?.cancel()
|
189
|
+
@currentVisit = @createVisit(location, action, properties)
|
190
|
+
@currentVisit.start()
|
191
|
+
@notifyApplicationAfterVisitingLocation(location)
|
192
|
+
|
193
|
+
createVisit: (location, action, {restorationIdentifier, restorationData, historyChanged} = {}) ->
|
194
|
+
visit = new Turbolinks.Visit this, location, action
|
195
|
+
visit.restorationIdentifier = restorationIdentifier ? Turbolinks.uuid()
|
196
|
+
visit.restorationData = Turbolinks.copyObject(restorationData)
|
197
|
+
visit.historyChanged = historyChanged
|
198
|
+
visit.referrer = @location
|
199
|
+
visit
|
200
|
+
|
201
|
+
visitCompleted: (visit) ->
|
202
|
+
@notifyApplicationAfterPageLoad(visit.getTimingMetrics())
|
203
|
+
|
204
|
+
clickEventIsSignificant: (event) ->
|
205
|
+
not (
|
206
|
+
event.defaultPrevented or
|
207
|
+
event.target.isContentEditable or
|
208
|
+
event.which > 1 or
|
209
|
+
event.altKey or
|
210
|
+
event.ctrlKey or
|
211
|
+
event.metaKey or
|
212
|
+
event.shiftKey
|
213
|
+
)
|
214
|
+
|
215
|
+
getVisitableLinkForNode: (node) ->
|
216
|
+
if @nodeIsVisitable(node)
|
217
|
+
Turbolinks.closest(node, "a[href]:not([target]):not([download])")
|
218
|
+
|
219
|
+
getVisitableLocationForLink: (link) ->
|
220
|
+
location = new Turbolinks.Location link.getAttribute("href")
|
221
|
+
location if @locationIsVisitable(location)
|
222
|
+
|
223
|
+
getActionForLink: (link) ->
|
224
|
+
link.getAttribute("data-turbolinks-action") ? "advance"
|
225
|
+
|
226
|
+
nodeIsVisitable: (node) ->
|
227
|
+
if container = Turbolinks.closest(node, "[data-turbolinks]")
|
228
|
+
container.getAttribute("data-turbolinks") isnt "false"
|
229
|
+
else
|
230
|
+
true
|
231
|
+
|
232
|
+
locationIsVisitable: (location) ->
|
233
|
+
location.isPrefixedBy(@view.getRootLocation()) and location.isHTML()
|
234
|
+
|
235
|
+
getCurrentRestorationData: ->
|
236
|
+
@getRestorationDataForIdentifier(@restorationIdentifier)
|
237
|
+
|
238
|
+
getRestorationDataForIdentifier: (identifier) ->
|
239
|
+
@restorationData[identifier] ?= {}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#= require ./renderer
|
2
|
+
|
3
|
+
class Turbolinks.ErrorRenderer extends Turbolinks.Renderer
|
4
|
+
constructor: (@html) ->
|
5
|
+
|
6
|
+
render: (callback) ->
|
7
|
+
@renderView =>
|
8
|
+
@replaceDocumentHTML()
|
9
|
+
@activateBodyScriptElements()
|
10
|
+
callback()
|
11
|
+
|
12
|
+
replaceDocumentHTML: ->
|
13
|
+
document.documentElement.innerHTML = @html
|
14
|
+
|
15
|
+
activateBodyScriptElements: ->
|
16
|
+
for replaceableElement in @getScriptElements()
|
17
|
+
element = @createScriptElement(replaceableElement)
|
18
|
+
replaceableElement.parentNode.replaceChild(element, replaceableElement)
|
19
|
+
|
20
|
+
getScriptElements: ->
|
21
|
+
document.documentElement.querySelectorAll("script")
|
@@ -0,0 +1,51 @@
|
|
1
|
+
class Turbolinks.HeadDetails
|
2
|
+
constructor: (@element) ->
|
3
|
+
@elements = {}
|
4
|
+
for element in @element.childNodes when element.nodeType is Node.ELEMENT_NODE
|
5
|
+
key = element.outerHTML
|
6
|
+
data = @elements[key] ?=
|
7
|
+
type: elementType(element)
|
8
|
+
tracked: elementIsTracked(element)
|
9
|
+
elements: []
|
10
|
+
data.elements.push(element)
|
11
|
+
|
12
|
+
hasElementWithKey: (key) ->
|
13
|
+
key of @elements
|
14
|
+
|
15
|
+
getTrackedElementSignature: ->
|
16
|
+
(key for key, {tracked} of @elements when tracked).join("")
|
17
|
+
|
18
|
+
getScriptElementsNotInDetails: (headDetails) ->
|
19
|
+
@getElementsMatchingTypeNotInDetails("script", headDetails)
|
20
|
+
|
21
|
+
getStylesheetElementsNotInDetails: (headDetails) ->
|
22
|
+
@getElementsMatchingTypeNotInDetails("stylesheet", headDetails)
|
23
|
+
|
24
|
+
getElementsMatchingTypeNotInDetails: (matchedType, headDetails) ->
|
25
|
+
elements[0] for key, {type, elements} of @elements when type is matchedType and not headDetails.hasElementWithKey(key)
|
26
|
+
|
27
|
+
getProvisionalElements: ->
|
28
|
+
provisionalElements = []
|
29
|
+
for key, {type, tracked, elements} of @elements
|
30
|
+
if not type? and not tracked
|
31
|
+
provisionalElements.push(elements...)
|
32
|
+
else if elements.length > 1
|
33
|
+
provisionalElements.push(elements[1...]...)
|
34
|
+
provisionalElements
|
35
|
+
|
36
|
+
elementType = (element) ->
|
37
|
+
if elementIsScript(element)
|
38
|
+
"script"
|
39
|
+
else if elementIsStylesheet(element)
|
40
|
+
"stylesheet"
|
41
|
+
|
42
|
+
elementIsTracked = (element) ->
|
43
|
+
element.getAttribute("data-turbolinks-track") is "reload"
|
44
|
+
|
45
|
+
elementIsScript = (element) ->
|
46
|
+
tagName = element.tagName.toLowerCase()
|
47
|
+
tagName is "script"
|
48
|
+
|
49
|
+
elementIsStylesheet = (element) ->
|
50
|
+
tagName = element.tagName.toLowerCase()
|
51
|
+
tagName is "style" or (tagName is "link" and element.getAttribute("rel") is "stylesheet")
|
@@ -0,0 +1,57 @@
|
|
1
|
+
Turbolinks.copyObject = (object) ->
|
2
|
+
result = {}
|
3
|
+
for key, value of object
|
4
|
+
result[key] = value
|
5
|
+
result
|
6
|
+
|
7
|
+
|
8
|
+
Turbolinks.closest = (element, selector) ->
|
9
|
+
closest.call(element, selector)
|
10
|
+
|
11
|
+
closest = do ->
|
12
|
+
html = document.documentElement
|
13
|
+
html.closest ? (selector) ->
|
14
|
+
node = this
|
15
|
+
while node
|
16
|
+
return node if node.nodeType is Node.ELEMENT_NODE and match.call(node, selector)
|
17
|
+
node = node.parentNode
|
18
|
+
|
19
|
+
|
20
|
+
Turbolinks.defer = (callback) ->
|
21
|
+
setTimeout(callback, 1)
|
22
|
+
|
23
|
+
Turbolinks.throttle = (fn) ->
|
24
|
+
request = null
|
25
|
+
(args...) ->
|
26
|
+
request ?= requestAnimationFrame =>
|
27
|
+
request = null
|
28
|
+
fn.apply(this, args)
|
29
|
+
|
30
|
+
Turbolinks.dispatch = (eventName, {target, cancelable, data} = {}) ->
|
31
|
+
event = document.createEvent("Events")
|
32
|
+
event.initEvent(eventName, true, cancelable is true)
|
33
|
+
event.data = data ? {}
|
34
|
+
(target ? document).dispatchEvent(event)
|
35
|
+
event
|
36
|
+
|
37
|
+
|
38
|
+
Turbolinks.match = (element, selector) ->
|
39
|
+
match.call(element, selector)
|
40
|
+
|
41
|
+
match = do ->
|
42
|
+
html = document.documentElement
|
43
|
+
html.matchesSelector ? html.webkitMatchesSelector ? html.msMatchesSelector ? html.mozMatchesSelector
|
44
|
+
|
45
|
+
|
46
|
+
Turbolinks.uuid = ->
|
47
|
+
result = ""
|
48
|
+
for i in [1..36]
|
49
|
+
if i in [9, 14, 19, 24]
|
50
|
+
result += "-"
|
51
|
+
else if i is 15
|
52
|
+
result += "4"
|
53
|
+
else if i is 20
|
54
|
+
result += (Math.floor(Math.random() * 4) + 8).toString(16)
|
55
|
+
else
|
56
|
+
result += Math.floor(Math.random() * 15).toString(16)
|
57
|
+
result
|