jekyll-theme-chalk 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 @@
|
|
|
1
|
+
.gitignore
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
module.exports = function( grunt ) {
|
|
2
|
+
|
|
3
|
+
grunt.initConfig( {
|
|
4
|
+
|
|
5
|
+
// Import package manifest
|
|
6
|
+
pkg: grunt.file.readJSON("package.json"),
|
|
7
|
+
|
|
8
|
+
// Banner definitions
|
|
9
|
+
meta: {
|
|
10
|
+
banner: "/*\n" +
|
|
11
|
+
" * <%= pkg.title || pkg.name %> - v<%= pkg.version %>\n" +
|
|
12
|
+
" * <%= pkg.description %>\n" +
|
|
13
|
+
" * <%= pkg.homepage %>\n" +
|
|
14
|
+
" *\n" +
|
|
15
|
+
" * Made by <%= pkg.author.name %>\n" +
|
|
16
|
+
" * Under <%= pkg.license %> License\n" +
|
|
17
|
+
" */\n"
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
// Concat definitions
|
|
21
|
+
concat: {
|
|
22
|
+
options: {
|
|
23
|
+
banner: "<%= meta.banner %>"
|
|
24
|
+
},
|
|
25
|
+
dist: {
|
|
26
|
+
src: ["src/throttle-debounce-fn.js"],
|
|
27
|
+
dest: "dist/throttle-debounce-fn.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
// Lint definitions
|
|
32
|
+
jshint: {
|
|
33
|
+
files: ["src/throttle-debounce-fn.js", "test/**/*"],
|
|
34
|
+
options: {
|
|
35
|
+
jshintrc: ".jshintrc"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
jscs: {
|
|
40
|
+
src: "src/**/*.js",
|
|
41
|
+
options: {
|
|
42
|
+
config: ".jscsrc"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
// Minify definitions
|
|
47
|
+
uglify: {
|
|
48
|
+
dist: {
|
|
49
|
+
src: ["dist/throttle-debounce-fn.js"],
|
|
50
|
+
dest: "dist/throttle-debounce-fn.min.js"
|
|
51
|
+
},
|
|
52
|
+
options: {
|
|
53
|
+
banner: "<%= meta.banner %>"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
// watch for changes to source
|
|
58
|
+
// Better than calling grunt a million times
|
|
59
|
+
// (call 'grunt watch')
|
|
60
|
+
watch: {
|
|
61
|
+
files: ["src/*", "test/**/*"],
|
|
62
|
+
tasks: ["default"]
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
} );
|
|
66
|
+
|
|
67
|
+
grunt.loadNpmTasks("grunt-contrib-concat");
|
|
68
|
+
grunt.loadNpmTasks("grunt-contrib-jshint");
|
|
69
|
+
grunt.loadNpmTasks("grunt-jscs");
|
|
70
|
+
grunt.loadNpmTasks("grunt-contrib-uglify");
|
|
71
|
+
grunt.loadNpmTasks("grunt-contrib-watch");
|
|
72
|
+
|
|
73
|
+
grunt.registerTask("lint", ["jshint", "jscs"]);
|
|
74
|
+
grunt.registerTask("build", ["concat", "uglify"]);
|
|
75
|
+
grunt.registerTask("default", ["jshint", "build"]);
|
|
76
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Original work Copyright (c) 2010 "Cowboy" Ben Alman
|
|
4
|
+
Modified work Copyright (c) 2017 Miguel de Moura
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Throttle Debounce Fn
|
|
2
|
+
|
|
3
|
+
Throttle Debounce Fn is a jQuery-based plugin that allows you to throttle and debounce your functions. It is based on [jQuery-Throttle-Debounce], with only a few changes.
|
|
4
|
+
|
|
5
|
+
## Compatibility
|
|
6
|
+
|
|
7
|
+
- Chrome
|
|
8
|
+
- Firefox
|
|
9
|
+
- Edge
|
|
10
|
+
- Opera
|
|
11
|
+
- Safari
|
|
12
|
+
- IE8+
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```shell
|
|
17
|
+
npm install throttle-debounce-fn
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
You may also manually download the `dist/throttle-debounce-fn.min.js` file.
|
|
21
|
+
|
|
22
|
+
Throttle Debounce Fn requires [jQuery] 1.4.0+ to work.
|
|
23
|
+
```html
|
|
24
|
+
<!-- jQuery must be loaded before this line -->
|
|
25
|
+
<script src="throttle-debounce-fn.min.js"></script>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Usage
|
|
29
|
+
|
|
30
|
+
```javascript
|
|
31
|
+
$.throttle(...);
|
|
32
|
+
$.debounce(...);
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
http://benalman.com/code/projects/jquery-throttle-debounce/docs/
|
|
36
|
+
|
|
37
|
+
#### Demos
|
|
38
|
+
|
|
39
|
+
http://benalman.com/code/projects/jquery-throttle-debounce/examples/throttle/
|
|
40
|
+
http://benalman.com/code/projects/jquery-throttle-debounce/examples/debounce/
|
|
41
|
+
|
|
42
|
+
## License
|
|
43
|
+
|
|
44
|
+
MIT. See `LICENSE.md` for further information.
|
|
45
|
+
|
|
46
|
+
## Authors
|
|
47
|
+
|
|
48
|
+
Miguel de Moura <me@migueldemoura.com>
|
|
49
|
+
["Cowboy" Ben Alman]
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
[jQuery-Throttle-Debounce]: <https://github.com/cowboy/jquery-throttle-debounce>
|
|
53
|
+
["Cowboy" Ben Alman]: <https://github.com/Cowboy>
|
|
54
|
+
[jQuery]: <https://jquery.com/>
|
|
55
|
+
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* throttle-debounce-fn - v1.0.1
|
|
3
|
+
* jQuery-based plugin that allows you to throttle and debounce your functions
|
|
4
|
+
* https://github.com/migueldemoura/throttle-debounce-fn
|
|
5
|
+
*
|
|
6
|
+
* Made by Miguel de Moura
|
|
7
|
+
* Under MIT License
|
|
8
|
+
*/
|
|
9
|
+
;(function ($, window, document, undefined) {
|
|
10
|
+
// Throttle execution of a function. Especially useful for rate limiting
|
|
11
|
+
// execution of handlers on events like resize and scroll. If you want to
|
|
12
|
+
// rate-limit execution of a function to a single time, see the
|
|
13
|
+
// <$.debounce> method.
|
|
14
|
+
//
|
|
15
|
+
// In this visualization, | is a throttled-function call and X is the actual
|
|
16
|
+
// callback execution:
|
|
17
|
+
//
|
|
18
|
+
// > Throttled with `noTrailing` specified as false or unspecified:
|
|
19
|
+
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
|
20
|
+
// > X X X X X X X X X X X X
|
|
21
|
+
// >
|
|
22
|
+
// > Throttled with `noTrailing` specified as true:
|
|
23
|
+
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
|
24
|
+
// > X X X X X X X X X X
|
|
25
|
+
//
|
|
26
|
+
// Usage:
|
|
27
|
+
//
|
|
28
|
+
// > var throttled = $.throttle(delay, [ noTrailing, ] callback);
|
|
29
|
+
// >
|
|
30
|
+
// > $('selector').bind('someevent', throttled);
|
|
31
|
+
// > $('selector').unbind('someevent', throttled);
|
|
32
|
+
//
|
|
33
|
+
// Arguments:
|
|
34
|
+
//
|
|
35
|
+
// delay - (Number) A zero-or-greater delay in milliseconds. For event
|
|
36
|
+
// callbacks, values around 100 or 250 (or even higher) are most useful.
|
|
37
|
+
// noTrailing - (Boolean) Optional, defaults to false. If noTrailing is
|
|
38
|
+
// true, callback will only execute every `delay` milliseconds while the
|
|
39
|
+
// throttled-function is being called. If noTrailing is false or
|
|
40
|
+
// unspecified, callback will be executed one final time after the last
|
|
41
|
+
// throttled-function call. (After the throttled-function has not been
|
|
42
|
+
// called for `delay` milliseconds, the internal counter is reset)
|
|
43
|
+
// callback - (Function) A function to be executed after delay milliseconds.
|
|
44
|
+
// The `this` context and all arguments are passed through, as-is, to
|
|
45
|
+
// `callback` when the throttled-function is executed.
|
|
46
|
+
//
|
|
47
|
+
// Returns:
|
|
48
|
+
//
|
|
49
|
+
// (Function) A new, throttled, function.
|
|
50
|
+
|
|
51
|
+
$.throttle = function(delay, noTrailing, callback, debounceMode) {
|
|
52
|
+
// After wrapper has stopped being called, this timeout ensures that
|
|
53
|
+
// `callback` is executed at the proper times in `throttle` and `end`
|
|
54
|
+
// debounce modes.
|
|
55
|
+
var timeoutId,
|
|
56
|
+
|
|
57
|
+
// Keep track of the last time `callback` was executed.
|
|
58
|
+
lastExec = 0;
|
|
59
|
+
|
|
60
|
+
// `noTrailing` defaults to false.
|
|
61
|
+
if (typeof noTrailing !== 'boolean') {
|
|
62
|
+
debounceMode = callback;
|
|
63
|
+
callback = noTrailing;
|
|
64
|
+
noTrailing = undefined;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// The `wrapper` function encapsulates all of the throttling / debouncing
|
|
68
|
+
// functionality and when executed will limit the rate at which `callback`
|
|
69
|
+
// is executed.
|
|
70
|
+
function wrapper() {
|
|
71
|
+
var that = this,
|
|
72
|
+
elapsed = +new Date() - lastExec,
|
|
73
|
+
args = arguments;
|
|
74
|
+
|
|
75
|
+
// Execute `callback` and update the `lastExec` timestamp.
|
|
76
|
+
function exec() {
|
|
77
|
+
lastExec = +new Date();
|
|
78
|
+
callback.apply(that, args);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// If `debounceMode` is true (atBegin) this is used to clear the flag
|
|
82
|
+
// to allow future `callback` executions.
|
|
83
|
+
function clear() {
|
|
84
|
+
timeoutId = undefined;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (debounceMode && !timeoutId) {
|
|
88
|
+
// Since `wrapper` is being called for the first time and
|
|
89
|
+
// `debounceMode` is true (atBegin), execute `callback`.
|
|
90
|
+
exec();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Clear any existing timeout.
|
|
94
|
+
timeoutId && clearTimeout(timeoutId);
|
|
95
|
+
|
|
96
|
+
if (debounceMode === undefined && elapsed > delay) {
|
|
97
|
+
// In throttle mode, if `delay` time has been exceeded, execute
|
|
98
|
+
// `callback`.
|
|
99
|
+
exec();
|
|
100
|
+
} else if (noTrailing !== true) {
|
|
101
|
+
// In trailing throttle mode, since `delay` time has not been
|
|
102
|
+
// exceeded, schedule `callback` to execute `delay` ms after most
|
|
103
|
+
// recent execution.
|
|
104
|
+
// If `debounceMode` is true (atBegin), schedule `clear` to execute
|
|
105
|
+
// after `delay` ms.
|
|
106
|
+
// If `debounceMode` is false (at end), schedule `callback` to
|
|
107
|
+
// execute after `delay` ms.
|
|
108
|
+
timeoutId = setTimeout(
|
|
109
|
+
debounceMode ? clear : exec,
|
|
110
|
+
debounceMode === undefined ? delay - elapsed : delay
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return wrapper;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
// Debounce execution of a function. Debouncing, unlike throttling,
|
|
119
|
+
// guarantees that a function is only executed a single time, either at the
|
|
120
|
+
// very beginning of a series of calls, or at the very end. If you want to
|
|
121
|
+
// simply rate-limit execution of a function, see the <$.throttle>
|
|
122
|
+
// method.
|
|
123
|
+
//
|
|
124
|
+
// In this visualization, | is a debounced-function call and X is the actual
|
|
125
|
+
// callback execution:
|
|
126
|
+
//
|
|
127
|
+
// > Debounced with `atBegin` specified as false or unspecified:
|
|
128
|
+
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
|
129
|
+
// > X X
|
|
130
|
+
// >
|
|
131
|
+
// > Debounced with `atBegin` specified as true:
|
|
132
|
+
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
|
133
|
+
// > X X
|
|
134
|
+
//
|
|
135
|
+
// Usage:
|
|
136
|
+
//
|
|
137
|
+
// > var debounced = $.debounce(delay, [ atBegin, ] callback);
|
|
138
|
+
// >
|
|
139
|
+
// > $('selector').bind('someevent', debounced);
|
|
140
|
+
// > $('selector').unbind('someevent', debounced);
|
|
141
|
+
//
|
|
142
|
+
// Arguments:
|
|
143
|
+
//
|
|
144
|
+
// delay - (Number) A zero-or-greater delay in milliseconds. For event
|
|
145
|
+
// callbacks, values around 100 or 250 (or even higher) are most useful.
|
|
146
|
+
// atBegin - (Boolean) Optional, defaults to false. If atBegin is false or
|
|
147
|
+
// unspecified, callback will only be executed `delay` milliseconds after
|
|
148
|
+
// the last debounced-function call. If atBegin is true, callback will be
|
|
149
|
+
// executed only at the first debounced-function call. (After the
|
|
150
|
+
// throttled-function has not been called for `delay` milliseconds, the
|
|
151
|
+
// internal counter is reset)
|
|
152
|
+
// callback - (Function) A function to be executed after delay milliseconds.
|
|
153
|
+
// The `this` context and all arguments are passed through, as-is, to
|
|
154
|
+
// `callback` when the debounced-function is executed.
|
|
155
|
+
//
|
|
156
|
+
// Returns:
|
|
157
|
+
//
|
|
158
|
+
// (Function) A new, debounced, function.
|
|
159
|
+
$.debounce = function(delay, atBegin, callback) {
|
|
160
|
+
return callback === undefined ?
|
|
161
|
+
$.throttle(delay, atBegin, false) :
|
|
162
|
+
$.throttle(delay, callback, atBegin !== false);
|
|
163
|
+
};
|
|
164
|
+
}(jQuery, window, document));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* throttle-debounce-fn - v1.0.1
|
|
3
|
+
* jQuery-based plugin that allows you to throttle and debounce your functions
|
|
4
|
+
* https://github.com/migueldemoura/throttle-debounce-fn
|
|
5
|
+
*
|
|
6
|
+
* Made by Miguel de Moura
|
|
7
|
+
* Under MIT License
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
!function(a,b,c,d){a.throttle=function(a,b,c,e){function f(){function f(){h=+new Date,c.apply(j,l)}function i(){g=d}var j=this,k=+new Date-h,l=arguments;e&&!g&&f(),g&&clearTimeout(g),e===d&&k>a?f():!0!==b&&(g=setTimeout(e?i:f,e===d?a-k:a))}var g,h=0;return"boolean"!=typeof b&&(e=c,c=b,b=d),f},a.debounce=function(b,c,e){return e===d?a.throttle(b,c,!1):a.throttle(b,e,!1!==c)}}(jQuery,window,document);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "throttle-debounce-fn",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "jQuery-based plugin that allows you to throttle and debounce your functions",
|
|
5
|
+
"main": "Gruntfile.js",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/migueldemoura/throttle-debounce-fn.git"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [
|
|
11
|
+
"throttle",
|
|
12
|
+
"debounce"
|
|
13
|
+
],
|
|
14
|
+
"author": {
|
|
15
|
+
"name": "Miguel de Moura",
|
|
16
|
+
"email": "me@migueldemoura.com",
|
|
17
|
+
"url": "https://github.com/migueldemoura"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"jquery": ">=1.4.0"
|
|
21
|
+
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/migueldemoura/throttle-debounce-fn/issues"
|
|
25
|
+
},
|
|
26
|
+
"homepage": "https://github.com/migueldemoura/throttle-debounce-fn",
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"grunt": "^1.0.1",
|
|
29
|
+
"grunt-contrib-concat": "^1.0.1",
|
|
30
|
+
"grunt-contrib-jshint": "^1.0.0",
|
|
31
|
+
"grunt-contrib-uglify": "^2.0.0",
|
|
32
|
+
"grunt-contrib-watch": "^1.0.0",
|
|
33
|
+
"grunt-jscs": "^3.0.1",
|
|
34
|
+
"jscs": "^3.0.7"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
;(function ($, window, document, undefined) {
|
|
2
|
+
// Throttle execution of a function. Especially useful for rate limiting
|
|
3
|
+
// execution of handlers on events like resize and scroll. If you want to
|
|
4
|
+
// rate-limit execution of a function to a single time, see the
|
|
5
|
+
// <$.debounce> method.
|
|
6
|
+
//
|
|
7
|
+
// In this visualization, | is a throttled-function call and X is the actual
|
|
8
|
+
// callback execution:
|
|
9
|
+
//
|
|
10
|
+
// > Throttled with `noTrailing` specified as false or unspecified:
|
|
11
|
+
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
|
12
|
+
// > X X X X X X X X X X X X
|
|
13
|
+
// >
|
|
14
|
+
// > Throttled with `noTrailing` specified as true:
|
|
15
|
+
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
|
16
|
+
// > X X X X X X X X X X
|
|
17
|
+
//
|
|
18
|
+
// Usage:
|
|
19
|
+
//
|
|
20
|
+
// > var throttled = $.throttle(delay, [ noTrailing, ] callback);
|
|
21
|
+
// >
|
|
22
|
+
// > $('selector').bind('someevent', throttled);
|
|
23
|
+
// > $('selector').unbind('someevent', throttled);
|
|
24
|
+
//
|
|
25
|
+
// Arguments:
|
|
26
|
+
//
|
|
27
|
+
// delay - (Number) A zero-or-greater delay in milliseconds. For event
|
|
28
|
+
// callbacks, values around 100 or 250 (or even higher) are most useful.
|
|
29
|
+
// noTrailing - (Boolean) Optional, defaults to false. If noTrailing is
|
|
30
|
+
// true, callback will only execute every `delay` milliseconds while the
|
|
31
|
+
// throttled-function is being called. If noTrailing is false or
|
|
32
|
+
// unspecified, callback will be executed one final time after the last
|
|
33
|
+
// throttled-function call. (After the throttled-function has not been
|
|
34
|
+
// called for `delay` milliseconds, the internal counter is reset)
|
|
35
|
+
// callback - (Function) A function to be executed after delay milliseconds.
|
|
36
|
+
// The `this` context and all arguments are passed through, as-is, to
|
|
37
|
+
// `callback` when the throttled-function is executed.
|
|
38
|
+
//
|
|
39
|
+
// Returns:
|
|
40
|
+
//
|
|
41
|
+
// (Function) A new, throttled, function.
|
|
42
|
+
|
|
43
|
+
$.throttle = function(delay, noTrailing, callback, debounceMode) {
|
|
44
|
+
// After wrapper has stopped being called, this timeout ensures that
|
|
45
|
+
// `callback` is executed at the proper times in `throttle` and `end`
|
|
46
|
+
// debounce modes.
|
|
47
|
+
var timeoutId,
|
|
48
|
+
|
|
49
|
+
// Keep track of the last time `callback` was executed.
|
|
50
|
+
lastExec = 0;
|
|
51
|
+
|
|
52
|
+
// `noTrailing` defaults to false.
|
|
53
|
+
if (typeof noTrailing !== 'boolean') {
|
|
54
|
+
debounceMode = callback;
|
|
55
|
+
callback = noTrailing;
|
|
56
|
+
noTrailing = undefined;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// The `wrapper` function encapsulates all of the throttling / debouncing
|
|
60
|
+
// functionality and when executed will limit the rate at which `callback`
|
|
61
|
+
// is executed.
|
|
62
|
+
function wrapper() {
|
|
63
|
+
var that = this,
|
|
64
|
+
elapsed = +new Date() - lastExec,
|
|
65
|
+
args = arguments;
|
|
66
|
+
|
|
67
|
+
// Execute `callback` and update the `lastExec` timestamp.
|
|
68
|
+
function exec() {
|
|
69
|
+
lastExec = +new Date();
|
|
70
|
+
callback.apply(that, args);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// If `debounceMode` is true (atBegin) this is used to clear the flag
|
|
74
|
+
// to allow future `callback` executions.
|
|
75
|
+
function clear() {
|
|
76
|
+
timeoutId = undefined;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (debounceMode && !timeoutId) {
|
|
80
|
+
// Since `wrapper` is being called for the first time and
|
|
81
|
+
// `debounceMode` is true (atBegin), execute `callback`.
|
|
82
|
+
exec();
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Clear any existing timeout.
|
|
86
|
+
timeoutId && clearTimeout(timeoutId);
|
|
87
|
+
|
|
88
|
+
if (debounceMode === undefined && elapsed > delay) {
|
|
89
|
+
// In throttle mode, if `delay` time has been exceeded, execute
|
|
90
|
+
// `callback`.
|
|
91
|
+
exec();
|
|
92
|
+
} else if (noTrailing !== true) {
|
|
93
|
+
// In trailing throttle mode, since `delay` time has not been
|
|
94
|
+
// exceeded, schedule `callback` to execute `delay` ms after most
|
|
95
|
+
// recent execution.
|
|
96
|
+
// If `debounceMode` is true (atBegin), schedule `clear` to execute
|
|
97
|
+
// after `delay` ms.
|
|
98
|
+
// If `debounceMode` is false (at end), schedule `callback` to
|
|
99
|
+
// execute after `delay` ms.
|
|
100
|
+
timeoutId = setTimeout(
|
|
101
|
+
debounceMode ? clear : exec,
|
|
102
|
+
debounceMode === undefined ? delay - elapsed : delay
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return wrapper;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
// Debounce execution of a function. Debouncing, unlike throttling,
|
|
111
|
+
// guarantees that a function is only executed a single time, either at the
|
|
112
|
+
// very beginning of a series of calls, or at the very end. If you want to
|
|
113
|
+
// simply rate-limit execution of a function, see the <$.throttle>
|
|
114
|
+
// method.
|
|
115
|
+
//
|
|
116
|
+
// In this visualization, | is a debounced-function call and X is the actual
|
|
117
|
+
// callback execution:
|
|
118
|
+
//
|
|
119
|
+
// > Debounced with `atBegin` specified as false or unspecified:
|
|
120
|
+
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
|
121
|
+
// > X X
|
|
122
|
+
// >
|
|
123
|
+
// > Debounced with `atBegin` specified as true:
|
|
124
|
+
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
|
125
|
+
// > X X
|
|
126
|
+
//
|
|
127
|
+
// Usage:
|
|
128
|
+
//
|
|
129
|
+
// > var debounced = $.debounce(delay, [ atBegin, ] callback);
|
|
130
|
+
// >
|
|
131
|
+
// > $('selector').bind('someevent', debounced);
|
|
132
|
+
// > $('selector').unbind('someevent', debounced);
|
|
133
|
+
//
|
|
134
|
+
// Arguments:
|
|
135
|
+
//
|
|
136
|
+
// delay - (Number) A zero-or-greater delay in milliseconds. For event
|
|
137
|
+
// callbacks, values around 100 or 250 (or even higher) are most useful.
|
|
138
|
+
// atBegin - (Boolean) Optional, defaults to false. If atBegin is false or
|
|
139
|
+
// unspecified, callback will only be executed `delay` milliseconds after
|
|
140
|
+
// the last debounced-function call. If atBegin is true, callback will be
|
|
141
|
+
// executed only at the first debounced-function call. (After the
|
|
142
|
+
// throttled-function has not been called for `delay` milliseconds, the
|
|
143
|
+
// internal counter is reset)
|
|
144
|
+
// callback - (Function) A function to be executed after delay milliseconds.
|
|
145
|
+
// The `this` context and all arguments are passed through, as-is, to
|
|
146
|
+
// `callback` when the debounced-function is executed.
|
|
147
|
+
//
|
|
148
|
+
// Returns:
|
|
149
|
+
//
|
|
150
|
+
// (Function) A new, debounced, function.
|
|
151
|
+
$.debounce = function(delay, atBegin, callback) {
|
|
152
|
+
return callback === undefined ?
|
|
153
|
+
$.throttle(delay, atBegin, false) :
|
|
154
|
+
$.throttle(delay, callback, atBegin !== false);
|
|
155
|
+
};
|
|
156
|
+
}(jQuery, window, document));
|