diff options
40 files changed, 1765 insertions, 71 deletions
diff --git a/amelia/index.html b/amelia/index.html index 77b8bd2b..5c9e2177 100644 --- a/amelia/index.html +++ b/amelia/index.html @@ -8,8 +8,8 @@ <link rel="stylesheet" href="../assets/css/bootswatch.min.css"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> - <script src="../bower_components/bootstrap/assets/js/html5shiv.js"></script> - <script src="../bower_components/bootstrap/assets/js/respond.min.js"></script> + <script src="../bower_components/html5shiv/dist/html5shiv.js"></script> + <script src="../bower_components/respond/dest/respond.min.js"></script> <![endif]--> <script type="text/javascript"> @@ -1172,7 +1172,7 @@ </div> - <script src="../bower_components/jquery/jquery.min.js"></script> + <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script> <script src="../assets/js/bootswatch.js"></script> </body> @@ -1,21 +1,25 @@ { - "name": "bootswatch", - "description": "Bootswatch is a collection of themes for Bootstrap.", - "version": "3.0.3+1", - "author": "Thomas Park", - "homepage": "http://bootswatch.com", - "repository": { - "type": "git", - "url": "git://github.com/thomaspark/bootswatch.git" - }, - "dependencies": { - "bootstrap": "~3.0.3", - "font-awesome": "~4.0.0" - }, - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ] + "name": "bootswatch", + "description": "Bootswatch is a collection of themes for Bootstrap.", + "version": "3.0.3+1", + "author": "Thomas Park", + "homepage": "http://bootswatch.com", + "repository": { + "type": "git", + "url": "git://github.com/thomaspark/bootswatch.git" + }, + "dependencies": { + "bootstrap": "~3.0.3", + "font-awesome": "~4.0.0" + }, + "licenses": [ + { + "type": "Apache-2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0" + } + ], + "devDependencies": { + "html5shiv": "~3.7.0", + "respond": "~1.4.2" + } } diff --git a/bower_components/html5shiv/.bower.json b/bower_components/html5shiv/.bower.json new file mode 100644 index 00000000..3b4632bd --- /dev/null +++ b/bower_components/html5shiv/.bower.json @@ -0,0 +1,27 @@ +{ + "name": "html5shiv", + "version": "3.7.0", + "main": [ + "dist/html5shiv.js", + "dist/html5shiv-printshiv.js" + ], + "ignore": [ + "**/.*", + "*.json", + "test", + "build", + "src", + "build.xml" + ], + "homepage": "https://github.com/aFarkas/html5shiv", + "_release": "3.7.0", + "_resolution": { + "type": "version", + "tag": "3.7.0", + "commit": "a4d4dcbe0875ba10c4c56c54454ae93031d59584" + }, + "_source": "git://github.com/aFarkas/html5shiv.git", + "_target": "~3.7.0", + "_originalSource": "html5shiv", + "_direct": true +}
\ No newline at end of file diff --git a/bower_components/html5shiv/dist/html5shiv-printshiv.js b/bower_components/html5shiv/dist/html5shiv-printshiv.js new file mode 100644 index 00000000..b12379e0 --- /dev/null +++ b/bower_components/html5shiv/dist/html5shiv-printshiv.js @@ -0,0 +1,11 @@ +/* + HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +(function(j,f){function s(a,b){var c=a.createElement("p"),m=a.getElementsByTagName("head")[0]||a.documentElement;c.innerHTML="x<style>"+b+"</style>";return m.insertBefore(c.lastChild,m.firstChild)}function o(){var a=d.elements;return"string"==typeof a?a.split(" "):a}function n(a){var b=t[a[u]];b||(b={},p++,a[u]=p,t[p]=b);return b}function v(a,b,c){b||(b=f);if(e)return b.createElement(a);c||(c=n(b));b=c.cache[a]?c.cache[a].cloneNode():y.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a); +return b.canHaveChildren&&!z.test(a)?c.frag.appendChild(b):b}function A(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();a.createElement=function(c){return!d.shivMethods?b.createElem(c):v(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+o().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(d,b.frag)} +function w(a){a||(a=f);var b=n(a);if(d.shivCSS&&!q&&!b.hasCSS)b.hasCSS=!!s(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}");e||A(a,b);return a}function B(a){for(var b,c=a.attributes,m=c.length,f=a.ownerDocument.createElement(l+":"+a.nodeName);m--;)b=c[m],b.specified&&f.setAttribute(b.nodeName,b.nodeValue);f.style.cssText=a.style.cssText;return f}function x(a){function b(){clearTimeout(d._removeSheetTimer); +c&&c.removeNode(!0);c=null}var c,f,d=n(a),e=a.namespaces,j=a.parentWindow;if(!C||a.printShived)return a;"undefined"==typeof e[l]&&e.add(l);j.attachEvent("onbeforeprint",function(){b();var g,i,d;d=a.styleSheets;for(var e=[],h=d.length,k=Array(h);h--;)k[h]=d[h];for(;d=k.pop();)if(!d.disabled&&D.test(d.media)){try{g=d.imports,i=g.length}catch(j){i=0}for(h=0;h<i;h++)k.push(g[h]);try{e.push(d.cssText)}catch(n){}}g=e.reverse().join("").split("{");i=g.length;h=RegExp("(^|[\\s,>+~])("+o().join("|")+")(?=[[\\s,>+~#.:]|$)", +"gi");for(k="$1"+l+"\\:$2";i--;)e=g[i]=g[i].split("}"),e[e.length-1]=e[e.length-1].replace(h,k),g[i]=e.join("}");e=g.join("{");i=a.getElementsByTagName("*");h=i.length;k=RegExp("^(?:"+o().join("|")+")$","i");for(d=[];h--;)g=i[h],k.test(g.nodeName)&&d.push(g.applyElement(B(g)));f=d;c=s(a,e)});j.attachEvent("onafterprint",function(){for(var a=f,c=a.length;c--;)a[c].removeNode();clearTimeout(d._removeSheetTimer);d._removeSheetTimer=setTimeout(b,500)});a.printShived=!0;return a}var r=j.html5||{},z=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i, +y=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q,u="_html5shiv",p=0,t={},e;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";q="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}e=b}catch(d){e=q=!0}})();var d={elements:r.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video", +version:"3.7.0",shivCSS:!1!==r.shivCSS,supportsUnknownElements:e,shivMethods:!1!==r.shivMethods,type:"default",shivDocument:w,createElement:v,createDocumentFragment:function(a,b){a||(a=f);if(e)return a.createDocumentFragment();for(var b=b||n(a),c=b.frag.cloneNode(),d=0,j=o(),l=j.length;d<l;d++)c.createElement(j[d]);return c}};j.html5=d;w(f);var D=/^$|\b(?:all|print)\b/,l="html5shiv",C=!e&&function(){var a=f.documentElement;return!("undefined"==typeof f.namespaces||"undefined"==typeof f.parentWindow|| +"undefined"==typeof a.applyElement||"undefined"==typeof a.removeNode||"undefined"==typeof j.attachEvent)}();d.type+=" print";d.shivPrint=x;x(f)})(this,document); diff --git a/bower_components/html5shiv/dist/html5shiv.js b/bower_components/html5shiv/dist/html5shiv.js new file mode 100644 index 00000000..448cebd7 --- /dev/null +++ b/bower_components/html5shiv/dist/html5shiv.js @@ -0,0 +1,8 @@ +/* + HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); +a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}</style>"; +c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| +"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f); +if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document); diff --git a/bower_components/html5shiv/readme.md b/bower_components/html5shiv/readme.md new file mode 100644 index 00000000..4b3af989 --- /dev/null +++ b/bower_components/html5shiv/readme.md @@ -0,0 +1,143 @@ +# The HTML5 Shiv + +The HTML5 Shiv enables use of HTML5 sectioning elements in legacy Internet Explorer and provides basic HTML5 styling for Internet Explorer 6-9, Safari 4.x (and iPhone 3.x), and Firefox 3.x. + +### What do these files do? + +#### `html5shiv.js` +* This includes the basic `createElement()` shiv technique, along with monkeypatches for `document.createElement` and `document.createDocumentFragment` for IE6-8. It also applies [basic styling](https://github.com/aFarkas/html5shiv/blob/51da98dabd3c537891b7fe6114633fb10de52473/src/html5shiv.js#L216-220) for HTML5 elements for IE6-9, Safari 4.x and FF 3.x. + +####`html5shiv-printshiv.js` +* This includes all of the above, as well as a mechanism allowing HTML5 elements to be styled and contain children while being printed in IE 6-8. + +### Who can I get mad at now? + +HTML5 Shiv is maintained by [Alexander Farkas](https://github.com/aFarkas/), [Jonathan Neal](https://twitter.com/jon_neal) and [Paul Irish](https://twitter.com/paul_irish), with many contributions from [John-David Dalton](https://twitter.com/jdalton). It is also distributed with [Modernizr](http://modernizr.com/), and the two google code projects, [html5shiv](https://code.google.com/p/html5shiv/) and [html5shim](https://code.google.com/p/html5shim/), maintained by [Remy Sharp](https://twitter.com/rem). + +If you have any issues in these implementations, you can report them here! :) + +For the full story of HTML5 Shiv and all of the people involved in making it, read [The Story of the HTML5 Shiv](http://paulirish.com/2011/the-history-of-the-html5-shiv/). + +## Installation + +###Using [Bower](http://bower.io/) + +`bower install html5shiv --save-dev` + +This will clone the latest version of the HTML5 shiv into the `components` directory at the root of your project and also create or update the file `bower.json` which specifies your projects dependencies. + +Include the HTML5 shiv in the `<head>` of your page in a conditional comment and after any stylesheets. + +```html +<!--[if lt IE 9]> + <script src="components/html5shiv/html5shiv.js"></script> +<![endif]--> +``` + +###Manual installation + +Download and extract the [latest zip package](https://github.com/aFarkas/html5shiv/archive/master.zip) from this repositiory and copy the two files `dist/html5shiv.js` and `dist/html5shiv-printshiv.js` into your project. Then include one of them into your `<head>` as above. + +## HTML5 Shiv API + +HTML5 Shiv works as a simple drop-in solution. In most cases there is no need to configure HTML5 Shiv or use methods provided by HTML5 Shiv. + +### `html5.elements` option + +The `elements` option is a space separated string or array, which describes the **full** list of the elements to shiv. + +**Configuring `elements` before `html5shiv.js` is included.** + +```js +//create a global html5 options object +window.html5 = { + 'elements': 'mark section customelement' +}; +``` +**Configuring `elements` after `html5shiv.js` is included.** + +```js +//change the html5shiv options object +window.html5.elements = 'mark section customelement'; +//and re-invoke the `shivDocument` method +html5.shivDocument(document); +``` + +### `html5.shivCSS` + +If `shivCSS` is set to `true` HTML5 Shiv will add basic styles (mostly display: block) to sectioning elements (like section, article). In most cases a webpage author should include those basic styles in his normal stylesheet to ensure older browser support (i.e. Firefox 3.6) without JavaScript. + +The `shivCSS` is true by default and can be set false, only before html5shiv.js is included: + +```js +//create a global html5 options object +window.html5 = { + 'shivCSS': false +}; +``` + +### `html5.shivMethods` + +If the `shivMethods` option is set to `true` (by default) HTML5 Shiv will override `document.createElement`/`document.createDocumentFragment` in Internet Explorer 6-8 to allow dynamic DOM creation of HTML5 elements. + +Known issue: If an element is created using the overridden `createElement` method this element returns a document fragment as its `parentNode`, but should be normally `null`. If a script relays on this behavior, `shivMethods`should be set to `false`. +Note: jQuery 1.7+ has implemented his own HTML5 DOM creation fix for Internet Explorer 6-8. If all your scripts (including Third party scripts) are using jQuery's manipulation and DOM creation methods, you might want to set this option to `false`. + +**Configuring `shivMethods` before `html5shiv.js` is included.** + +```js +//create a global html5 options object +window.html5 = { + 'shivMethods': false +}; +``` +**Configuring `elements` after `html5shiv.js` is included.** + +```js +//change the html5shiv options object +window.html5.shivMethods = false; +``` + +### `html5.createElement( nodeName [, document] )` + +The `html5.createElement` method creates a shived element, even if `shivMethods` is set to false. + +```js +var container = html5.createElement('div'); +//container is shived so we can add HTML5 elements using `innerHTML` +container.innerHTML = '<section>This is a section</section>'; +``` + +### `html5.createDocumentFragment( [document] )` + +The `html5.createDocumentFragment` method creates a shived document fragment, even if `shivMethods` is set to false. + +```js +var fragment = html5.createDocumentFragment(); +var container = document.createElement('div'); +fragment.appendChild(container); +//fragment is shived so we can add HTML5 elements using `innerHTML` +container.innerHTML = '<section>This is a section</section>'; +``` + +## HTML5 Shiv Known Issues and Limitations + +- The `shivMethods` option (overriding `document.createElement`) and the `html5.createElement` method create elements, which are not disconnected and have a parentNode (see also issue #64) +- The cloneNode problem is currently not addressed by HTML5 Shiv. HTML5 elements can be dynamically created, but can't be cloned in all cases. +- The printshiv version of HTML5 Shiv has to alter the print styles and the whole DOM for printing. In case of complex websites and or a lot of print styles this might cause performance and/or styling issues. A possible solution could be the [htc-branch](https://github.com/aFarkas/html5shiv/tree/iepp-htc) of HTML5 Shiv, which uses another technique to implement print styles for Internet Explorer 6-8. + +### What about the other HTML5 element projects? + +- The original conception and community collaboration story of the project is described at [The History of the HTML5 Shiv](http://paulirish.com/2011/the-history-of-the-html5-shiv/). +- [IEPP](https://code.google.com/p/ie-print-protector), by Jon Neal, addressed the printing fault of the original `html5shiv`. It was merged into `html5shiv`. +- **Shimprove**, in April 2010, patched `cloneNode` and `createElement` was later merged into `html5shiv` +- **innerShiv**, introduced in August 2010 by JD Barlett, addressed dynamically adding new HTML5 elements into the DOM. [jQuery added support](http://blog.jquery.com/2011/11/03/jquery-1-7-released/) that made innerShiv redundant and `html5shiv` addressed the same issues as well, so the project was completed. +- The **html5shim** and **html5shiv** sites on Google Code are maintained by Remy Sharp and are identical distribution points of this `html5shiv` project. +- **Modernizr** is developed by the same people as `html5shiv` and can include the latest version in any custom builds created at modernizr.com +- This `html5shiv` repo now contains tests for all the edge cases pursued by the above libraries and has been extensively tested, both in development and production. + +A [detailed changelog of html5shiv](https://github.com/aFarkas/html5shiv/wiki) is available. + +### Why is it called a *shiv*? + +The term **shiv** [originates](http://ejohn.org/blog/html5-shiv/) from [John Resig](https://github.com/jeresig), who was thought to have used the word for its slang meaning, *a sharp object used as a knife-like weapon*, intended for Internet Explorer. Truth be known, John probably intended to use the word [shim](http://en.wikipedia.org/wiki/Shim_(computing\)), which in computing means *an application compatibility workaround*. Rather than correct his mispelling, most developers familiar with Internet Explorer appreciated the visual imagery. And that, [kids](http://html5homi.es/), is [etymology](https://en.wikipedia.org/wiki/Etymology). diff --git a/bower_components/respond/.bower.json b/bower_components/respond/.bower.json new file mode 100644 index 00000000..1286c6c8 --- /dev/null +++ b/bower_components/respond/.bower.json @@ -0,0 +1,21 @@ +{ + "name": "respond", + "version": "1.4.2", + "main": "dest/respond.src.js", + "description": "Fast and lightweight polyfill for min/max-width CSS3 Media Queries (for IE 6-8, and more)", + "ignore": [ + "**/.*", + "test" + ], + "homepage": "https://github.com/scottjehl/Respond", + "_release": "1.4.2", + "_resolution": { + "type": "version", + "tag": "v1.4.2", + "commit": "20b7f4a192bb910c8c7e067b961de38519d334e4" + }, + "_source": "git://github.com/scottjehl/Respond.git", + "_target": "~1.4.2", + "_originalSource": "respond", + "_direct": true +}
\ No newline at end of file diff --git a/bower_components/respond/Gruntfile.js b/bower_components/respond/Gruntfile.js new file mode 100644 index 00000000..70d4f187 --- /dev/null +++ b/bower_components/respond/Gruntfile.js @@ -0,0 +1,90 @@ +module.exports = function(grunt) { + "use strict"; + + // Project configuration. + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + banner: + '/*! Respond.js v<%= pkg.version %>: <%= pkg.description %>' + + ' * Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>\n' + + ' * Licensed under <%= _.pluck(pkg.licenses, "url").join(", ") %>\n' + + ' * <%= pkg.website %>' + + ' */\n\n', + uglify: { + nonMinMatchMedia: { + options: { + mangle: false, + compress: false, + preserveComments: 'some', + beautify: { + beautify: true, + indent_level: 2 + } + }, + files: { + 'dest/respond.src.js': ['src/matchmedia.polyfill.js', 'src/respond.js'] + } + }, + minMatchMedia: { + options: { + banner: '<%= banner %>' + }, + files: { + 'dest/respond.min.js': ['src/matchmedia.polyfill.js', 'src/respond.js'] + } + }, + nonMinMatchMediaListener: { + options: { + mangle: false, + compress: false, + preserveComments: 'some', + beautify: { + beautify: true, + indent_level: 2 + } + }, + files: { + 'dest/respond.matchmedia.addListener.src.js': ['src/matchmedia.polyfill.js', 'src/matchmedia.addListener.js', 'src/respond.js'] + } + }, + minMatchMediaListener: { + options: { + banner: '<%= banner %>' + }, + files: { + 'dest/respond.matchmedia.addListener.min.js': ['src/matchmedia.polyfill.js', 'src/matchmedia.addListener.js', 'src/respond.js'] + } + } + }, + jshint: { + files: ['src/respond.js', 'src/matchmedia.polyfill.js'], + options: { + curly: true, + eqeqeq: true, + immed: true, + latedef: false, + newcap: true, + noarg: true, + sub: true, + undef: true, + boss: true, + eqnull: true, + smarttabs: true, + node: true, + es5: true, + strict: false + }, + globals: { + Image: true, + window: true + } + } + }); + + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); + grunt.loadNpmTasks( 'grunt-contrib-uglify' ); + + // Default task. + grunt.registerTask('default', ['jshint', 'uglify']); + +}; diff --git a/bower_components/respond/LICENSE-MIT b/bower_components/respond/LICENSE-MIT new file mode 100644 index 00000000..c7cf40db --- /dev/null +++ b/bower_components/respond/LICENSE-MIT @@ -0,0 +1,22 @@ +Copyright (c) 2012 Scott Jehl + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/bower_components/respond/README.md b/bower_components/respond/README.md new file mode 100644 index 00000000..2cdc7c29 --- /dev/null +++ b/bower_components/respond/README.md @@ -0,0 +1,114 @@ +# Respond.js +### A fast & lightweight polyfill for min/max-width CSS3 Media Queries (for IE 6-8, and more) + + - Copyright 2011: Scott Jehl, scottjehl.com + + - Licensed under the MIT license. + +The goal of this script is to provide a fast and lightweight (3kb minified / 1kb gzipped) script to enable [responsive web designs](http://www.alistapart.com/articles/responsive-web-design/) in browsers that don't support CSS3 Media Queries - in particular, Internet Explorer 8 and under. It's written in such a way that it will probably patch support for other non-supporting browsers as well (more information on that soon). + +If you're unfamiliar with the concepts surrounding Responsive Web Design, you can read up [here](http://www.alistapart.com/articles/responsive-web-design/) and also [here](http://filamentgroup.com/examples/responsive-images/) + +[Demo page](https://rawgithub.com/scottjehl/Respond/master/test/test.html) (the colors change to show media queries working) + + +Usage Instructions +====== + +1. Craft your CSS with min/max-width media queries to adapt your layout from mobile (first) all the way up to desktop + + +<pre> + @media screen and (min-width: 480px){ + ...styles for 480px and up go here + } +</pre> + +2. Reference the respond.min.js script (1kb min/gzipped) after all of your CSS (the earlier it runs, the greater chance IE users will not see a flash of un-media'd content) + +3. Crack open Internet Explorer and pump fists in delight + + +CDN/X-Domain Setup +====== + +Respond.js works by requesting a pristine copy of your CSS via AJAX, so if you host your stylesheets on a CDN (or a subdomain), you'll need to upload a proxy page to enable cross-domain communication. + +See `cross-domain/example.html` for a demo: + +- Upload `cross-domain/respond-proxy.html` to your external domain +- Upload `cross-domain/respond.proxy.gif` to your origin domain +- Reference the file(s) via `<link />` element(s): + +<pre> + <!-- Respond.js proxy on external server --> + <link href="http://externalcdn.com/respond-proxy.html" id="respond-proxy" rel="respond-proxy" /> + + <!-- Respond.js redirect location on local server --> + <link href="/path/to/respond.proxy.gif" id="respond-redirect" rel="respond-redirect" /> + + <!-- Respond.js proxy script on local server --> + <script src="/path/to/respond.proxy.js"></script> +</pre> + +If you are having problems with the cross-domain setup, make sure respond-proxy.html does not have a query string appended to it. + +Note: HUGE thanks to @doctyper for the contributions in the cross-domain proxy! + + +Support & Caveats +====== + +Some notes to keep in mind: + +- This script's focus is purposely very narrow: only min-width and max-width media queries and all media types (screen, print, etc) are translated to non-supporting browsers. I wanted to keep things simple for filesize, maintenance, and performance, so I've intentionally limited support to queries that are essential to building a (mobile-first) responsive design. In the future, I may rework things a bit to include a hook for patching-in additional media query features - stay tuned! + +- Browsers that natively support CSS3 Media Queries are opted-out of running this script as quickly as possible. In testing for support, all other browsers are subjected to a quick test to determine whether they support media queries or not before proceeding to run the script. This test is now included separately at the top, and uses the window.matchMedia polyfill found here: https://github.com/paulirish/matchMedia.js . If you are already including this polyfill via Modernizr or otherwise, feel free to remove that part. + +- This script relies on no other scripts or frameworks (aside from the included matchMedia polyfill), and is optimized for mobile delivery (~1kb total filesize min/gzip) + +- As you might guess, this implementation is quite dumb in regards to CSS parsing rules. This is a good thing, because that allows it to run really fast, but its looseness may also cause unexpected behavior. For example: if you enclose a whole media query in a comment intending to disable its rules, you'll probably find that those rules will end up enabled in non-media-query-supporting browsers. + +- Respond.js doesn't parse CSS referenced via @import, nor does it work with media queries within style elements, as those styles can't be re-requested for parsing. + +- Due to security restrictions, some browsers may not allow this script to work on file:// urls (because it uses xmlHttpRequest). Run it on a web server. + +- If the request for the CSS file that includes MQ-specific styling is + behind a redirect, Respond.js will fail silently. CSS files should +respond with a 200 status. + +- Currently, media attributes on link elements are supported, but only if the linked stylesheet contains no media queries. If it does contain queries, the media attribute will be ignored and the internal queries will be parsed normally. In other words, @media statements in the CSS take priority. + +- Reportedly, if CSS files are encoded in UTF-8 with Byte-Order-Mark (BOM), they will not work with Respond.js in IE7 or IE8. Noted in issue #97 + +- WARNING: Including @font-face rules inside a media query will cause IE7 and IE8 to hang during load. To work around this, place @font-face rules in the wide open, as a sibling to other media queries. + +- If you have more than 32 stylesheets referenced, IE will throw an error, `Invalid procedure call or argument`. Concatenate your CSS and the issue should go away. + +- Sass/SCSS source maps are not supported; `@media -sass-debug-info` will break respond.js. Noted in issue [#148](https://github.com/scottjehl/Respond/issues/148) + +- Internet Explorer 9 supports css3 media queries, but not within frames when the CSS containing the media query is in an external file (this appears to be a bug in IE9 — see http://stackoverflow.com/questions/10316247/media-queries-fail-inside-ie9-iframe). See this commit for a fix if you're having this problem. https://github.com/NewSignature/Respond/commit/1c86c66075f0a2099451eb426702fc3540d2e603 + +- Nested Media Queries are not supported + + +How's it work? +====== +Basically, the script loops through the CSS referenced in the page and runs a regular expression or two on their contents to find media queries and their associated blocks of CSS. In Internet Explorer, the content of the stylesheet is impossible to retrieve in its pre-parsed state (which in IE 8-, means its media queries are removed from the text), so Respond.js re-requests the CSS files using Ajax and parses the text response from there. Be sure to configure your CSS files' caching properly so that this re-request doesn't actually go to the server, hitting your browser cache instead. + +From there, each media query block is appended to the head in order via style elements, and those style elements are enabled and disabled (read: appended and removed from the DOM) depending on how their min/max width compares with the browser width. The media attribute on the style elements will match that of the query in the CSS, so it could be "screen", "projector", or whatever you want. Any relative paths contained in the CSS will be prefixed by their stylesheet's href, so image paths will direct to their proper destination + +API Options? +====== +Sure, a couple: + +- respond.update() : rerun the parser (helpful if you added a stylesheet to the page and it needs to be translated) +- respond.mediaQueriesSupported: set to true if the browser natively supports media queries. +- respond.getEmValue() : returns the pixel value of one em + + +Alternatives to this script +====== +This isn't the only CSS3 Media Query polyfill script out there; but it damn well may be the fastest. + +If you're looking for more robust CSS3 Media Query support, you might check out http://code.google.com/p/css3-mediaqueries-js/. In testing, I've found that script to be noticeably slow when rendering complex responsive designs (both in filesize and performance), but it really does support a lot more media query features than this script. Big hat tip to the authors! :) diff --git a/bower_components/respond/bower.json b/bower_components/respond/bower.json new file mode 100644 index 00000000..b98e9646 --- /dev/null +++ b/bower_components/respond/bower.json @@ -0,0 +1,10 @@ +{ + "name": "respond", + "version": "1.4.2", + "main": "dest/respond.src.js", + "description": "Fast and lightweight polyfill for min/max-width CSS3 Media Queries (for IE 6-8, and more)", + "ignore": [ + "**/.*", + "test" + ] +} diff --git a/bower_components/respond/cross-domain/example.html b/bower_components/respond/cross-domain/example.html new file mode 100644 index 00000000..700224e7 --- /dev/null +++ b/bower_components/respond/cross-domain/example.html @@ -0,0 +1,24 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <title>Respond JS Test Page</title> + <link href="https://rawgithub.com/scottjehl/Respond/master/test/test.css" rel="stylesheet"/> + <link href="https://rawgithub.com/scottjehl/Respond/master/test/test2.css" media="screen and (min-width: 600px)" rel="stylesheet"/> + <script src="../dest/respond.src.js"></script> + + <!-- Respond.js proxy on external server --> + <link href="https://rawgithub.com/scottjehl/Respond/master/cross-domain/respond-proxy.html" id="respond-proxy" rel="respond-proxy" /> + <link href="respond.proxy.gif" id="respond-redirect" rel="respond-redirect" /> + <script src="respond.proxy.js"></script> +</head> +<body> + <p>This is a visual test file for cross-domain proxy.</p> + + <p>The media queries in the included CSS file simply change the body's background color depending on the browser width. If you see any colors aside from black, then the media queries are working in your browser. You can resize your browser window to see it change on the fly.</p> + + + <p id="attribute-test">Media-attributes are working too! This should be visible above 600px.</p> + +</body> +</html> diff --git a/bower_components/respond/cross-domain/respond-proxy.html b/bower_components/respond/cross-domain/respond-proxy.html new file mode 100644 index 00000000..f828a0a5 --- /dev/null +++ b/bower_components/respond/cross-domain/respond-proxy.html @@ -0,0 +1,96 @@ +<!-- Respond.js: min/max-width media query polyfill. Remote proxy (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs --> +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <title>Respond JS Proxy</title> +</head> +<body> + <script> + (function () { + var domain, css, query, getQueryString, ajax, xmlHttp; + + /* + http://stackoverflow.com/questions/4963673/get-url-array-variables-in-javascript-jquery/4963817#4963817 + */ + getQueryString = function() { + var ret = {}, parts, i, p; + + parts = (document.location.toString().split("?")[1]).split("&"); + + for (i = 0; i < parts.length; i++) { + + p = parts[i].split("="); + // so strings will be correctly parsed: + p[1] = decodeURIComponent(p[1].replace(/\+/g, " ")); + + if (p[0].search(/\[\]/) >= 0) { // then it"s an array + p[0] = p[0].replace("[]", ""); + + if (typeof ret[p[0]] != "object") { + ret[p[0]] = []; + } + ret[p[0]].push(p[1]); + } else { + ret[p[0]] = p[1]; + } + } + return ret; + }; + + ajax = function( url, callback ) { + var req = xmlHttp(); + if (!req){ + return; + } + req.open( "GET", url, true ); + req.onreadystatechange = function () { + if ( req.readyState != 4 || req.status != 200 && req.status != 304 ){ + return; + } + callback( req.responseText ); + }; + if ( req.readyState == 4 ){ + return; + } + req.send(); + }; + + //define ajax obj + xmlHttp = (function() { + var xmlhttpmethod = false, + attempts = [ + function(){ return new XMLHttpRequest(); }, + function(){ return new ActiveXObject("Microsoft.XMLHTTP"); }, + function(){ return new ActiveXObject("MSXML2.XMLHTTP.3.0"); } + ], + al = attempts.length; + + while( al-- ){ + try { + xmlhttpmethod = attempts[ al ](); + } + catch(e) { + continue; + } + break; + } + return function(){ + return xmlhttpmethod; + }; + })(); + + query = getQueryString(); + css = query["css"]; + domain = query["url"]; + + if (css && domain) { + ajax(css, function (response) { + window.name = response; + window.location.href = domain; + }); + } + }()); + </script> +</body> +</html>
\ No newline at end of file diff --git a/bower_components/respond/cross-domain/respond.proxy.gif b/bower_components/respond/cross-domain/respond.proxy.gif Binary files differnew file mode 100644 index 00000000..ced1c053 --- /dev/null +++ b/bower_components/respond/cross-domain/respond.proxy.gif diff --git a/bower_components/respond/cross-domain/respond.proxy.js b/bower_components/respond/cross-domain/respond.proxy.js new file mode 100644 index 00000000..e9422cb7 --- /dev/null +++ b/bower_components/respond/cross-domain/respond.proxy.js @@ -0,0 +1,127 @@ +/*! Respond.js: min/max-width media query polyfill. Remote proxy (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ +(function(win, doc, undefined){ + var docElem = doc.documentElement, + proxyURL = doc.getElementById("respond-proxy").href, + redirectURL = (doc.getElementById("respond-redirect") || location).href, + baseElem = doc.getElementsByTagName("base")[0], + urls = [], + refNode; + + function encode(url){ + return win.encodeURIComponent(url); + } + + function fakejax( url, callback ){ + + var iframe, + AXO; + + // All hail Google http://j.mp/iKMI19 + // Behold, an iframe proxy without annoying clicky noises. + if ( "ActiveXObject" in win ) { + AXO = new ActiveXObject( "htmlfile" ); + AXO.open(); + AXO.write( '<iframe id="x"></iframe>' ); + AXO.close(); + iframe = AXO.getElementById( "x" ); + } else { + iframe = doc.createElement( "iframe" ); + iframe.style.cssText = "position:absolute;top:-99em"; + docElem.insertBefore(iframe, docElem.firstElementChild || docElem.firstChild ); + } + + iframe.src = checkBaseURL(proxyURL) + "?url=" + encode(redirectURL) + "&css=" + encode(checkBaseURL(url)); + + function checkFrameName() { + var cssText; + + try { + cssText = iframe.contentWindow.name; + } + catch (e) { } + + if (cssText) { + // We've got what we need. Stop the iframe from loading further content. + iframe.src = "about:blank"; + iframe.parentNode.removeChild(iframe); + iframe = null; + + + // Per http://j.mp/kn9EPh, not taking any chances. Flushing the ActiveXObject + if (AXO) { + AXO = null; + + if (win.CollectGarbage) { + win.CollectGarbage(); + } + } + + callback(cssText); + } + else{ + win.setTimeout(checkFrameName, 100); + } + } + + win.setTimeout(checkFrameName, 500); + } + + function checkBaseURL(href) { + if (baseElem && href.indexOf(baseElem.href) === -1) { + bref = (/\/$/).test(baseElem.href) ? baseElem.href : (baseElem.href + "/"); + href = bref + href; + } + + return href; + } + + function checkRedirectURL() { + // IE6 & IE7 don't build out absolute urls in <link /> attributes. + // So respond.proxy.gif remains relative instead of http://example.com/respond.proxy.gif. + // This trickery resolves that issue. + if (~ !redirectURL.indexOf(location.host)) { + + var fakeLink = doc.createElement("div"); + + fakeLink.innerHTML = '<a href="' + redirectURL + '"></a>'; + docElem.insertBefore(fakeLink, docElem.firstElementChild || docElem.firstChild ); + + // Grab the parsed URL from that dummy object + redirectURL = fakeLink.firstChild.href; + + // Clean up + fakeLink.parentNode.removeChild(fakeLink); + fakeLink = null; + } + } + + function buildUrls(){ + var links = doc.getElementsByTagName( "link" ); + + for( var i = 0, linkl = links.length; i < linkl; i++ ){ + + var thislink = links[i], + href = links[i].href, + extreg = (/^([a-zA-Z:]*\/\/(www\.)?)/).test( href ), + ext = (baseElem && !extreg) || extreg; + + //make sure it's an external stylesheet + if( thislink.rel.indexOf( "stylesheet" ) >= 0 && ext ){ + (function( link ){ + fakejax( href, function( css ){ + link.styleSheet.rawCssText = css; + respond.update(); + } ); + })( thislink ); + } + } + + + } + + if( !respond.mediaQueriesSupported ){ + checkRedirectURL(); + buildUrls(); + } + +})( window, document ); diff --git a/bower_components/respond/dest/respond.matchmedia.addListener.min.js b/bower_components/respond/dest/respond.matchmedia.addListener.min.js new file mode 100644 index 00000000..50ac74c9 --- /dev/null +++ b/bower_components/respond/dest/respond.matchmedia.addListener.min.js @@ -0,0 +1,5 @@ +/*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl + * Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT + * */ + +!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='­<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";if(a.matchMedia&&a.matchMedia("all").addListener)return!1;var b=a.matchMedia,c=b("only all").matches,d=!1,e=0,f=[],g=function(){a.clearTimeout(e),e=a.setTimeout(function(){for(var c=0,d=f.length;d>c;c++){var e=f[c].mql,g=f[c].listeners||[],h=b(e.media).matches;if(h!==e.matches){e.matches=h;for(var i=0,j=g.length;j>i;i++)g[i].call(a,e)}}},30)};a.matchMedia=function(e){var h=b(e),i=[],j=0;return h.addListener=function(b){c&&(d||(d=!0,a.addEventListener("resize",g,!0)),0===j&&(j=f.push({mql:h,listeners:i})),i.push(b))},h.removeListener=function(a){for(var b=0,c=i.length;c>b;b++)i[b]===a&&i.splice(b,1)},h}}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b<s.length;b++){var c=s[b],e=c.href,f=c.media,g=c.rel&&"stylesheet"===c.rel.toLowerCase();e&&g&&!o[e]&&(c.styleSheet&&c.styleSheet.rawCssText?(v(c.styleSheet.rawCssText,e,f),o[e]=!0):(!/^([a-zA-Z:]*\/\/)/.test(e)&&!r||e.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&("//"===e.substring(0,2)&&(e=a.location.protocol+e),d.push({href:e,media:f})))}w()};x(),c.update=x,c.getEmValue=t,a.addEventListener?a.addEventListener("resize",b,!1):a.attachEvent&&a.attachEvent("onresize",b)}}(this);
\ No newline at end of file diff --git a/bower_components/respond/dest/respond.matchmedia.addListener.src.js b/bower_components/respond/dest/respond.matchmedia.addListener.src.js new file mode 100644 index 00000000..31571cda --- /dev/null +++ b/bower_components/respond/dest/respond.matchmedia.addListener.src.js @@ -0,0 +1,273 @@ +/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */ +/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */ +(function(w) { + "use strict"; + w.matchMedia = w.matchMedia || function(doc, undefined) { + var bool, docElem = doc.documentElement, refNode = docElem.firstElementChild || docElem.firstChild, fakeBody = doc.createElement("body"), div = doc.createElement("div"); + div.id = "mq-test-1"; + div.style.cssText = "position:absolute;top:-100em"; + fakeBody.style.background = "none"; + fakeBody.appendChild(div); + return function(q) { + div.innerHTML = '­<style media="' + q + '"> #mq-test-1 { width: 42px; }</style>'; + docElem.insertBefore(fakeBody, refNode); + bool = div.offsetWidth === 42; + docElem.removeChild(fakeBody); + return { + matches: bool, + media: q + }; + }; + }(w.document); +})(this); + +/*! matchMedia() polyfill addListener/removeListener extension. Author & copyright (c) 2012: Scott Jehl. Dual MIT/BSD license */ +(function(w) { + "use strict"; + if (w.matchMedia && w.matchMedia("all").addListener) { + return false; + } + var localMatchMedia = w.matchMedia, hasMediaQueries = localMatchMedia("only all").matches, isListening = false, timeoutID = 0, queries = [], handleChange = function(evt) { + w.clearTimeout(timeoutID); + timeoutID = w.setTimeout(function() { + for (var i = 0, il = queries.length; i < il; i++) { + var mql = queries[i].mql, listeners = queries[i].listeners || [], matches = localMatchMedia(mql.media).matches; + if (matches !== mql.matches) { + mql.matches = matches; + for (var j = 0, jl = listeners.length; j < jl; j++) { + listeners[j].call(w, mql); + } + } + } + }, 30); + }; + w.matchMedia = function(media) { + var mql = localMatchMedia(media), listeners = [], index = 0; + mql.addListener = function(listener) { + if (!hasMediaQueries) { + return; + } + if (!isListening) { + isListening = true; + w.addEventListener("resize", handleChange, true); + } + if (index === 0) { + index = queries.push({ + mql: mql, + listeners: listeners + }); + } + listeners.push(listener); + }; + mql.removeListener = function(listener) { + for (var i = 0, il = listeners.length; i < il; i++) { + if (listeners[i] === listener) { + listeners.splice(i, 1); + } + } + }; + return mql; + }; +})(this); + +/*! Respond.js v1.4.0: min/max-width media query polyfill. (c) Scott Jehl. MIT Lic. j.mp/respondjs */ +(function(w) { + "use strict"; + var respond = {}; + w.respond = respond; + respond.update = function() {}; + var requestQueue = [], xmlHttp = function() { + var xmlhttpmethod = false; + try { + xmlhttpmethod = new w.XMLHttpRequest(); + } catch (e) { + xmlhttpmethod = new w.ActiveXObject("Microsoft.XMLHTTP"); + } + return function() { + return xmlhttpmethod; + }; + }(), ajax = function(url, callback) { + var req = xmlHttp(); + if (!req) { + return; + } + req.open("GET", url, true); + req.onreadystatechange = function() { + if (req.readyState !== 4 || req.status !== 200 && req.status !== 304) { + return; + } + callback(req.responseText); + }; + if (req.readyState === 4) { + return; + } + req.send(null); + }; + respond.ajax = ajax; + respond.queue = requestQueue; + respond.regex = { + media: /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi, + keyframes: /@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi, + urls: /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g, + findStyles: /@media *([^\{]+)\{([\S\s]+?)$/, + only: /(only\s+)?([a-zA-Z]+)\s?/, + minw: /\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/, + maxw: /\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/ + }; + respond.mediaQueriesSupported = w.matchMedia && w.matchMedia("only all") !== null && w.matchMedia("only all").matches; + if (respond.mediaQueriesSupported) { + return; + } + var doc = w.document, docElem = doc.documentElement, mediastyles = [], rules = [], appendedEls = [], parsedSheets = {}, resizeThrottle = 30, head = doc.getElementsByTagName("head")[0] || docElem, base = doc.getElementsByTagName("base")[0], links = head.getElementsByTagName("link"), lastCall, resizeDefer, eminpx, getEmValue = function() { + var ret, div = doc.createElement("div"), body = doc.body, originalHTMLFontSize = docElem.style.fontSize, originalBodyFontSize = body && body.style.fontSize, fakeUsed = false; + div.style.cssText = "position:absolute;font-size:1em;width:1em"; + if (!body) { + body = fakeUsed = doc.createElement("body"); + body.style.background = "none"; + } + docElem.style.fontSize = "100%"; + body.style.fontSize = "100%"; + body.appendChild(div); + if (fakeUsed) { + docElem.insertBefore(body, docElem.firstChild); + } + ret = div.offsetWidth; + if (fakeUsed) { + docElem.removeChild(body); + } else { + body.removeChild(div); + } + docElem.style.fontSize = originalHTMLFontSize; + if (originalBodyFontSize) { + body.style.fontSize = originalBodyFontSize; + } + ret = eminpx = parseFloat(ret); + return ret; + }, applyMedia = function(fromResize) { + var name = "clientWidth", docElemProp = docElem[name], currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[name] || docElemProp, styleBlocks = {}, lastLink = links[links.length - 1], now = new Date().getTime(); + if (fromResize && lastCall && now - lastCall < resizeThrottle) { + w.clearTimeout(resizeDefer); + resizeDefer = w.setTimeout(applyMedia, resizeThrottle); + return; + } else { + lastCall = now; + } + for (var i in mediastyles) { + if (mediastyles.hasOwnProperty(i)) { + var thisstyle = mediastyles[i], min = thisstyle.minw, max = thisstyle.maxw, minnull = min === null, maxnull = max === null, em = "em"; + if (!!min) { + min = parseFloat(min) * (min.indexOf(em) > -1 ? eminpx || getEmValue() : 1); + } + if (!!max) { + max = parseFloat(max) * (max.indexOf(em) > -1 ? eminpx || getEmValue() : 1); + } + if (!thisstyle.hasquery || (!minnull || !maxnull) && (minnull || currWidth >= min) && (maxnull || currWidth <= max)) { + if (!styleBlocks[thisstyle.media]) { + styleBlocks[thisstyle.media] = []; + } + styleBlocks[thisstyle.media].push(rules[thisstyle.rules]); + } + } + } + for (var j in appendedEls) { + if (appendedEls.hasOwnProperty(j)) { + if (appendedEls[j] && appendedEls[j].parentNode === head) { + head.removeChild(appendedEls[j]); + } + } + } + appendedEls.length = 0; + for (var k in styleBlocks) { + if (styleBlocks.hasOwnProperty(k)) { + var ss = doc.createElement("style"), css = styleBlocks[k].join("\n"); + ss.type = "text/css"; + ss.media = k; + head.insertBefore(ss, lastLink.nextSibling); + if (ss.styleSheet) { + ss.styleSheet.cssText = css; + } else { + ss.appendChild(doc.createTextNode(css)); + } + appendedEls.push(ss); + } + } + }, translate = function(styles, href, media) { + var qs = styles.replace(respond.regex.keyframes, "").match(respond.regex.media), ql = qs && qs.length || 0; + href = href.substring(0, href.lastIndexOf("/")); + var repUrls = function(css) { + return css.replace(respond.regex.urls, "$1" + href + "$2$3"); + }, useMedia = !ql && media; + if (href.length) { + href += "/"; + } + if (useMedia) { + ql = 1; + } + for (var i = 0; i < ql; i++) { + var fullq, thisq, eachq, eql; + if (useMedia) { + fullq = media; + rules.push(repUrls(styles)); + } else { + fullq = qs[i].match(respond.regex.findStyles) && RegExp.$1; + rules.push(RegExp.$2 && repUrls(RegExp.$2)); + } + eachq = fullq.split(","); + eql = eachq.length; + for (var j = 0; j < eql; j++) { + thisq = eachq[j]; + mediastyles.push({ + media: thisq.split("(")[0].match(respond.regex.only) && RegExp.$2 || "all", + rules: rules.length - 1, + hasquery: thisq.indexOf("(") > -1, + minw: thisq.match(respond.regex.minw) && parseFloat(RegExp.$1) + (RegExp.$2 || ""), + maxw: thisq.match(respond.regex.maxw) && parseFloat(RegExp.$1) + (RegExp.$2 || "") + }); + } + } + applyMedia(); + }, makeRequests = function() { + if (requestQueue.length) { + var thisRequest = requestQueue.shift(); + ajax(thisRequest.href, function(styles) { + translate(styles, thisRequest.href, thisRequest.media); + parsedSheets[thisRequest.href] = true; + w.setTimeout(function() { + makeRequests(); + }, 0); + }); + } + }, ripCSS = function() { + for (var i = 0; i < links.length; i++) { + var sheet = links[i], href = sheet.href, media = sheet.media, isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet"; + if (!!href && isCSS && !parsedSheets[href]) { + if (sheet.styleSheet && sheet.styleSheet.rawCssText) { + translate(sheet.styleSheet.rawCssText, href, media); + parsedSheets[href] = true; + } else { + if (!/^([a-zA-Z:]*\/\/)/.test(href) && !base || href.replace(RegExp.$1, "").split("/")[0] === w.location.host) { + if (href.substring(0, 2) === "//") { + href = w.location.protocol + href; + } + requestQueue.push({ + href: href, + media: media + }); + } + } + } + } + makeRequests(); + }; + ripCSS(); + respond.update = ripCSS; + respond.getEmValue = getEmValue; + function callMedia() { + applyMedia(true); + } + if (w.addEventListener) { + w.addEventListener("resize", callMedia, false); + } else if (w.attachEvent) { + w.attachEvent("onresize", callMedia); + } +})(this);
\ No newline at end of file diff --git a/bower_components/respond/dest/respond.min.js b/bower_components/respond/dest/respond.min.js new file mode 100644 index 00000000..80a7b69d --- /dev/null +++ b/bower_components/respond/dest/respond.min.js @@ -0,0 +1,5 @@ +/*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl + * Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT + * */ + +!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='­<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b<s.length;b++){var c=s[b],e=c.href,f=c.media,g=c.rel&&"stylesheet"===c.rel.toLowerCase();e&&g&&!o[e]&&(c.styleSheet&&c.styleSheet.rawCssText?(v(c.styleSheet.rawCssText,e,f),o[e]=!0):(!/^([a-zA-Z:]*\/\/)/.test(e)&&!r||e.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&("//"===e.substring(0,2)&&(e=a.location.protocol+e),d.push({href:e,media:f})))}w()};x(),c.update=x,c.getEmValue=t,a.addEventListener?a.addEventListener("resize",b,!1):a.attachEvent&&a.attachEvent("onresize",b)}}(this);
\ No newline at end of file diff --git a/bower_components/respond/dest/respond.src.js b/bower_components/respond/dest/respond.src.js new file mode 100644 index 00000000..b1298d07 --- /dev/null +++ b/bower_components/respond/dest/respond.src.js @@ -0,0 +1,224 @@ +/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */ +/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */ +(function(w) { + "use strict"; + w.matchMedia = w.matchMedia || function(doc, undefined) { + var bool, docElem = doc.documentElement, refNode = docElem.firstElementChild || docElem.firstChild, fakeBody = doc.createElement("body"), div = doc.createElement("div"); + div.id = "mq-test-1"; + div.style.cssText = "position:absolute;top:-100em"; + fakeBody.style.background = "none"; + fakeBody.appendChild(div); + return function(q) { + div.innerHTML = '­<style media="' + q + '"> #mq-test-1 { width: 42px; }</style>'; + docElem.insertBefore(fakeBody, refNode); + bool = div.offsetWidth === 42; + docElem.removeChild(fakeBody); + return { + matches: bool, + media: q + }; + }; + }(w.document); +})(this); + +/*! Respond.js v1.4.0: min/max-width media query polyfill. (c) Scott Jehl. MIT Lic. j.mp/respondjs */ +(function(w) { + "use strict"; + var respond = {}; + w.respond = respond; + respond.update = function() {}; + var requestQueue = [], xmlHttp = function() { + var xmlhttpmethod = false; + try { + xmlhttpmethod = new w.XMLHttpRequest(); + } catch (e) { + xmlhttpmethod = new w.ActiveXObject("Microsoft.XMLHTTP"); + } + return function() { + return xmlhttpmethod; + }; + }(), ajax = function(url, callback) { + var req = xmlHttp(); + if (!req) { + return; + } + req.open("GET", url, true); + req.onreadystatechange = function() { + if (req.readyState !== 4 || req.status !== 200 && req.status !== 304) { + return; + } + callback(req.responseText); + }; + if (req.readyState === 4) { + return; + } + req.send(null); + }; + respond.ajax = ajax; + respond.queue = requestQueue; + respond.regex = { + media: /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi, + keyframes: /@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi, + urls: /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g, + findStyles: /@media *([^\{]+)\{([\S\s]+?)$/, + only: /(only\s+)?([a-zA-Z]+)\s?/, + minw: /\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/, + maxw: /\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/ + }; + respond.mediaQueriesSupported = w.matchMedia && w.matchMedia("only all") !== null && w.matchMedia("only all").matches; + if (respond.mediaQueriesSupported) { + return; + } + var doc = w.document, docElem = doc.documentElement, mediastyles = [], rules = [], appendedEls = [], parsedSheets = {}, resizeThrottle = 30, head = doc.getElementsByTagName("head")[0] || docElem, base = doc.getElementsByTagName("base")[0], links = head.getElementsByTagName("link"), lastCall, resizeDefer, eminpx, getEmValue = function() { + var ret, div = doc.createElement("div"), body = doc.body, originalHTMLFontSize = docElem.style.fontSize, originalBodyFontSize = body && body.style.fontSize, fakeUsed = false; + div.style.cssText = "position:absolute;font-size:1em;width:1em"; + if (!body) { + body = fakeUsed = doc.createElement("body"); + body.style.background = "none"; + } + docElem.style.fontSize = "100%"; + body.style.fontSize = "100%"; + body.appendChild(div); + if (fakeUsed) { + docElem.insertBefore(body, docElem.firstChild); + } + ret = div.offsetWidth; + if (fakeUsed) { + docElem.removeChild(body); + } else { + body.removeChild(div); + } + docElem.style.fontSize = originalHTMLFontSize; + if (originalBodyFontSize) { + body.style.fontSize = originalBodyFontSize; + } + ret = eminpx = parseFloat(ret); + return ret; + }, applyMedia = function(fromResize) { + var name = "clientWidth", docElemProp = docElem[name], currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[name] || docElemProp, styleBlocks = {}, lastLink = links[links.length - 1], now = new Date().getTime(); + if (fromResize && lastCall && now - lastCall < resizeThrottle) { + w.clearTimeout(resizeDefer); + resizeDefer = w.setTimeout(applyMedia, resizeThrottle); + return; + } else { + lastCall = now; + } + for (var i in mediastyles) { + if (mediastyles.hasOwnProperty(i)) { + var thisstyle = mediastyles[i], min = thisstyle.minw, max = thisstyle.maxw, minnull = min === null, maxnull = max === null, em = "em"; + if (!!min) { + min = parseFloat(min) * (min.indexOf(em) > -1 ? eminpx || getEmValue() : 1); + } + if (!!max) { + max = parseFloat(max) * (max.indexOf(em) > -1 ? eminpx || getEmValue() : 1); + } + if (!thisstyle.hasquery || (!minnull || !maxnull) && (minnull || currWidth >= min) && (maxnull || currWidth <= max)) { + if (!styleBlocks[thisstyle.media]) { + styleBlocks[thisstyle.media] = []; + } + styleBlocks[thisstyle.media].push(rules[thisstyle.rules]); + } + } + } + for (var j in appendedEls) { + if (appendedEls.hasOwnProperty(j)) { + if (appendedEls[j] && appendedEls[j].parentNode === head) { + head.removeChild(appendedEls[j]); + } + } + } + appendedEls.length = 0; + for (var k in styleBlocks) { + if (styleBlocks.hasOwnProperty(k)) { + var ss = doc.createElement("style"), css = styleBlocks[k].join("\n"); + ss.type = "text/css"; + ss.media = k; + head.insertBefore(ss, lastLink.nextSibling); + if (ss.styleSheet) { + ss.styleSheet.cssText = css; + } else { + ss.appendChild(doc.createTextNode(css)); + } + appendedEls.push(ss); + } + } + }, translate = function(styles, href, media) { + var qs = styles.replace(respond.regex.keyframes, "").match(respond.regex.media), ql = qs && qs.length || 0; + href = href.substring(0, href.lastIndexOf("/")); + var repUrls = function(css) { + return css.replace(respond.regex.urls, "$1" + href + "$2$3"); + }, useMedia = !ql && media; + if (href.length) { + href += "/"; + } + if (useMedia) { + ql = 1; + } + for (var i = 0; i < ql; i++) { + var fullq, thisq, eachq, eql; + if (useMedia) { + fullq = media; + rules.push(repUrls(styles)); + } else { + fullq = qs[i].match(respond.regex.findStyles) && RegExp.$1; + rules.push(RegExp.$2 && repUrls(RegExp.$2)); + } + eachq = fullq.split(","); + eql = eachq.length; + for (var j = 0; j < eql; j++) { + thisq = eachq[j]; + mediastyles.push({ + media: thisq.split("(")[0].match(respond.regex.only) && RegExp.$2 || "all", + rules: rules.length - 1, + hasquery: thisq.indexOf("(") > -1, + minw: thisq.match(respond.regex.minw) && parseFloat(RegExp.$1) + (RegExp.$2 || ""), + maxw: thisq.match(respond.regex.maxw) && parseFloat(RegExp.$1) + (RegExp.$2 || "") + }); + } + } + applyMedia(); + }, makeRequests = function() { + if (requestQueue.length) { + var thisRequest = requestQueue.shift(); + ajax(thisRequest.href, function(styles) { + translate(styles, thisRequest.href, thisRequest.media); + parsedSheets[thisRequest.href] = true; + w.setTimeout(function() { + makeRequests(); + }, 0); + }); + } + }, ripCSS = function() { + for (var i = 0; i < links.length; i++) { + var sheet = links[i], href = sheet.href, media = sheet.media, isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet"; + if (!!href && isCSS && !parsedSheets[href]) { + if (sheet.styleSheet && sheet.styleSheet.rawCssText) { + translate(sheet.styleSheet.rawCssText, href, media); + parsedSheets[href] = true; + } else { + if (!/^([a-zA-Z:]*\/\/)/.test(href) && !base || href.replace(RegExp.$1, "").split("/")[0] === w.location.host) { + if (href.substring(0, 2) === "//") { + href = w.location.protocol + href; + } + requestQueue.push({ + href: href, + media: media + }); + } + } + } + } + makeRequests(); + }; + ripCSS(); + respond.update = ripCSS; + respond.getEmValue = getEmValue; + function callMedia() { + applyMedia(true); + } + if (w.addEventListener) { + w.addEventListener("resize", callMedia, false); + } else if (w.attachEvent) { + w.attachEvent("onresize", callMedia); + } +})(this);
\ No newline at end of file diff --git a/bower_components/respond/package.json b/bower_components/respond/package.json new file mode 100644 index 00000000..42864b01 --- /dev/null +++ b/bower_components/respond/package.json @@ -0,0 +1,32 @@ +{ + "name": "Respond.js", + "description": "min/max-width media query polyfill", + "version": "1.4.2", + "homepage": "https://github.com/scottjehl/Respond", + "author": { + "name": "Scott Jehl", + "email": "scott@filamentgroup.com", + "url": "http://filamentgroup.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/scottjehl/Respond.git" + }, + "bugs": { + "url": "https://github.com/scottjehl/Respond/issues" + }, + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT" + } + ], + "devDependencies": { + "grunt-cli":"~0.1", + "grunt": "~0.4.0", + "grunt-contrib-jshint": "~0.2.0", + "grunt-contrib-qunit": "~0.3.0", + "grunt-contrib-uglify": "0.2.7" + } + +} diff --git a/bower_components/respond/src/matchmedia.addListener.js b/bower_components/respond/src/matchmedia.addListener.js new file mode 100644 index 00000000..82909157 --- /dev/null +++ b/bower_components/respond/src/matchmedia.addListener.js @@ -0,0 +1,76 @@ +/*! matchMedia() polyfill addListener/removeListener extension. Author & copyright (c) 2012: Scott Jehl. Dual MIT/BSD license */ +(function( w ){ + "use strict"; + // Bail out for browsers that have addListener support + if (w.matchMedia && w.matchMedia('all').addListener) { + return false; + } + + var localMatchMedia = w.matchMedia, + hasMediaQueries = localMatchMedia('only all').matches, + isListening = false, + timeoutID = 0, // setTimeout for debouncing 'handleChange' + queries = [], // Contains each 'mql' and associated 'listeners' if 'addListener' is used + handleChange = function(evt) { + // Debounce + w.clearTimeout(timeoutID); + + timeoutID = w.setTimeout(function() { + for (var i = 0, il = queries.length; i < il; i++) { + var mql = queries[i].mql, + listeners = queries[i].listeners || [], + matches = localMatchMedia(mql.media).matches; + + // Update mql.matches value and call listeners + // Fire listeners only if transitioning to or from matched state + if (matches !== mql.matches) { + mql.matches = matches; + + for (var j = 0, jl = listeners.length; j < jl; j++) { + listeners[j].call(w, mql); + } + } + } + }, 30); + }; + + w.matchMedia = function(media) { + var mql = localMatchMedia(media), + listeners = [], + index = 0; + + mql.addListener = function(listener) { + // Changes would not occur to css media type so return now (Affects IE <= 8) + if (!hasMediaQueries) { + return; + } + + // Set up 'resize' listener for browsers that support CSS3 media queries (Not for IE <= 8) + // There should only ever be 1 resize listener running for performance + if (!isListening) { + isListening = true; + w.addEventListener('resize', handleChange, true); + } + + // Push object only if it has not been pushed already + if (index === 0) { + index = queries.push({ + mql : mql, + listeners : listeners + }); + } + + listeners.push(listener); + }; + + mql.removeListener = function(listener) { + for (var i = 0, il = listeners.length; i < il; i++){ + if (listeners[i] === listener){ + listeners.splice(i, 1); + } + } + }; + + return mql; + }; +}( this )); diff --git a/bower_components/respond/src/matchmedia.polyfill.js b/bower_components/respond/src/matchmedia.polyfill.js new file mode 100644 index 00000000..12d2b95f --- /dev/null +++ b/bower_components/respond/src/matchmedia.polyfill.js @@ -0,0 +1,36 @@ +/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */ +/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */ + +(function(w){ + "use strict"; + w.matchMedia = w.matchMedia || (function( doc, undefined ) { + + var bool, + docElem = doc.documentElement, + refNode = docElem.firstElementChild || docElem.firstChild, + // fakeBody required for <FF4 when executed in <head> + fakeBody = doc.createElement( "body" ), + div = doc.createElement( "div" ); + + div.id = "mq-test-1"; + div.style.cssText = "position:absolute;top:-100em"; + fakeBody.style.background = "none"; + fakeBody.appendChild(div); + + return function(q){ + + div.innerHTML = "­<style media=\"" + q + "\"> #mq-test-1 { width: 42px; }</style>"; + + docElem.insertBefore( fakeBody, refNode ); + bool = div.offsetWidth === 42; + docElem.removeChild( fakeBody ); + + return { + matches: bool, + media: q + }; + + }; + + }( w.document )); +}( this )); diff --git a/bower_components/respond/src/respond.js b/bower_components/respond/src/respond.js new file mode 100644 index 00000000..7b77134f --- /dev/null +++ b/bower_components/respond/src/respond.js @@ -0,0 +1,341 @@ +/*! Respond.js v1.4.0: min/max-width media query polyfill. (c) Scott Jehl. MIT Lic. j.mp/respondjs */ +(function( w ){ + + "use strict"; + + //exposed namespace + var respond = {}; + w.respond = respond; + + //define update even in native-mq-supporting browsers, to avoid errors + respond.update = function(){}; + + //define ajax obj + var requestQueue = [], + xmlHttp = (function() { + var xmlhttpmethod = false; + try { + xmlhttpmethod = new w.XMLHttpRequest(); + } + catch( e ){ + xmlhttpmethod = new w.ActiveXObject( "Microsoft.XMLHTTP" ); + } + return function(){ + return xmlhttpmethod; + }; + })(), + + //tweaked Ajax functions from Quirksmode + ajax = function( url, callback ) { + var req = xmlHttp(); + if (!req){ + return; + } + req.open( "GET", url, true ); + req.onreadystatechange = function () { + if ( req.readyState !== 4 || req.status !== 200 && req.status !== 304 ){ + return; + } + callback( req.responseText ); + }; + if ( req.readyState === 4 ){ + return; + } + req.send( null ); + }; + + //expose for testing + respond.ajax = ajax; + respond.queue = requestQueue; + + // expose for testing + respond.regex = { + media: /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi, + keyframes: /@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi, + urls: /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g, + findStyles: /@media *([^\{]+)\{([\S\s]+?)$/, + only: /(only\s+)?([a-zA-Z]+)\s?/, + minw: /\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/, + maxw: /\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/ + }; + + //expose media query support flag for external use + respond.mediaQueriesSupported = w.matchMedia && w.matchMedia( "only all" ) !== null && w.matchMedia( "only all" ).matches; + + //if media queries are supported, exit here + if( respond.mediaQueriesSupported ){ + return; + } + + //define vars + var doc = w.document, + docElem = doc.documentElement, + mediastyles = [], + rules = [], + appendedEls = [], + parsedSheets = {}, + resizeThrottle = 30, + head = doc.getElementsByTagName( "head" )[0] || docElem, + base = doc.getElementsByTagName( "base" )[0], + links = head.getElementsByTagName( "link" ), + + lastCall, + resizeDefer, + + //cached container for 1em value, populated the first time it's needed + eminpx, + + // returns the value of 1em in pixels + getEmValue = function() { + var ret, + div = doc.createElement('div'), + body = doc.body, + originalHTMLFontSize = docElem.style.fontSize, + originalBodyFontSize = body && body.style.fontSize, + fakeUsed = false; + + div.style.cssText = "position:absolute;font-size:1em;width:1em"; + + if( !body ){ + body = fakeUsed = doc.createElement( "body" ); + body.style.background = "none"; + } + + // 1em in a media query is the value of the default font size of the browser + // reset docElem and body to ensure the correct value is returned + docElem.style.fontSize = "100%"; + body.style.fontSize = "100%"; + + body.appendChild( div ); + + if( fakeUsed ){ + docElem.insertBefore( body, docElem.firstChild ); + } + + ret = div.offsetWidth; + + if( fakeUsed ){ + docElem.removeChild( body ); + } + else { + body.removeChild( div ); + } + + // restore the original values + docElem.style.fontSize = originalHTMLFontSize; + if( originalBodyFontSize ) { + body.style.fontSize = originalBodyFontSize; + } + + + //also update eminpx before returning + ret = eminpx = parseFloat(ret); + + return ret; + }, + + //enable/disable styles + applyMedia = function( fromResize ){ + var name = "clientWidth", + docElemProp = docElem[ name ], + currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[ name ] || docElemProp, + styleBlocks = {}, + lastLink = links[ links.length-1 ], + now = (new Date()).getTime(); + + //throttle resize calls + if( fromResize && lastCall && now - lastCall < resizeThrottle ){ + w.clearTimeout( resizeDefer ); + resizeDefer = w.setTimeout( applyMedia, resizeThrottle ); + return; + } + else { + lastCall = now; + } + + for( var i in mediastyles ){ + if( mediastyles.hasOwnProperty( i ) ){ + var thisstyle = mediastyles[ i ], + min = thisstyle.minw, + max = thisstyle.maxw, + minnull = min === null, + maxnull = max === null, + em = "em"; + + if( !!min ){ + min = parseFloat( min ) * ( min.indexOf( em ) > -1 ? ( eminpx || getEmValue() ) : 1 ); + } + if( !!max ){ + max = parseFloat( max ) * ( max.indexOf( em ) > -1 ? ( eminpx || getEmValue() ) : 1 ); + } + + // if there's no media query at all (the () part), or min or max is not null, and if either is present, they're true + if( !thisstyle.hasquery || ( !minnull || !maxnull ) && ( minnull || currWidth >= min ) && ( maxnull || currWidth <= max ) ){ + if( !styleBlocks[ thisstyle.media ] ){ + styleBlocks[ thisstyle.media ] = []; + } + styleBlocks[ thisstyle.media ].push( rules[ thisstyle.rules ] ); + } + } + } + + //remove any existing respond style element(s) + for( var j in appendedEls ){ + if( appendedEls.hasOwnProperty( j ) ){ + if( appendedEls[ j ] && appendedEls[ j ].parentNode === head ){ + head.removeChild( appendedEls[ j ] ); + } + } + } + appendedEls.length = 0; + + //inject active styles, grouped by media type + for( var k in styleBlocks ){ + if( styleBlocks.hasOwnProperty( k ) ){ + var ss = doc.createElement( "style" ), + css = styleBlocks[ k ].join( "\n" ); + + ss.type = "text/css"; + ss.media = k; + + //originally, ss was appended to a documentFragment and sheets were appended in bulk. + //this caused crashes in IE in a number of circumstances, such as when the HTML element had a bg image set, so appending beforehand seems best. Thanks to @dvelyk for the initial research on this one! + head.insertBefore( ss, lastLink.nextSibling ); + + if ( ss.styleSheet ){ + ss.styleSheet.cssText = css; + } + else { + ss.appendChild( doc.createTextNode( css ) ); + } + + //push to appendedEls to track for later removal + appendedEls.push( ss ); + } + } + }, + //find media blocks in css text, convert to style blocks + translate = function( styles, href, media ){ + var qs = styles.replace( respond.regex.keyframes, '' ).match( respond.regex.media ), + ql = qs && qs.length || 0; + + //try to get CSS path + href = href.substring( 0, href.lastIndexOf( "/" ) ); + + var repUrls = function( css ){ + return css.replace( respond.regex.urls, "$1" + href + "$2$3" ); + }, + useMedia = !ql && media; + + //if path exists, tack on trailing slash + if( href.length ){ href += "/"; } + + //if no internal queries exist, but media attr does, use that + //note: this currently lacks support for situations where a media attr is specified on a link AND + //its associated stylesheet has internal CSS media queries. + //In those cases, the media attribute will currently be ignored. + if( useMedia ){ + ql = 1; + } + + for( var i = 0; i < ql; i++ ){ + var fullq, thisq, eachq, eql; + + //media attr + if( useMedia ){ + fullq = media; + rules.push( repUrls( styles ) ); + } + //parse for styles + else{ + fullq = qs[ i ].match( respond.regex.findStyles ) && RegExp.$1; + rules.push( RegExp.$2 && repUrls( RegExp.$2 ) ); + } + + eachq = fullq.split( "," ); + eql = eachq.length; + + for( var j = 0; j < eql; j++ ){ + thisq = eachq[ j ]; + mediastyles.push( { + media : thisq.split( "(" )[ 0 ].match( respond.regex.only ) && RegExp.$2 || "all", + rules : rules.length - 1, + hasquery : thisq.indexOf("(") > -1, + minw : thisq.match( respond.regex.minw ) && parseFloat( RegExp.$1 ) + ( RegExp.$2 || "" ), + maxw : thisq.match( respond.regex.maxw ) && parseFloat( RegExp.$1 ) + ( RegExp.$2 || "" ) + } ); + } + } + + applyMedia(); + }, + + //recurse through request queue, get css text + makeRequests = function(){ + if( requestQueue.length ){ + var thisRequest = requestQueue.shift(); + + ajax( thisRequest.href, function( styles ){ + translate( styles, thisRequest.href, thisRequest.media ); + parsedSheets[ thisRequest.href ] = true; + + // by wrapping recursive function call in setTimeout + // we prevent "Stack overflow" error in IE7 + w.setTimeout(function(){ makeRequests(); },0); + } ); + } + }, + + //loop stylesheets, send text content to translate + ripCSS = function(){ + + for( var i = 0; i < links.length; i++ ){ + var sheet = links[ i ], + href = sheet.href, + media = sheet.media, + isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet"; + + //only links plz and prevent re-parsing + if( !!href && isCSS && !parsedSheets[ href ] ){ + // selectivizr exposes css through the rawCssText expando + if (sheet.styleSheet && sheet.styleSheet.rawCssText) { + translate( sheet.styleSheet.rawCssText, href, media ); + parsedSheets[ href ] = true; + } else { + if( (!/^([a-zA-Z:]*\/\/)/.test( href ) && !base) || + href.replace( RegExp.$1, "" ).split( "/" )[0] === w.location.host ){ + // IE7 doesn't handle urls that start with '//' for ajax request + // manually add in the protocol + if ( href.substring(0,2) === "//" ) { href = w.location.protocol + href; } + requestQueue.push( { + href: href, + media: media + } ); + } + } + } + } + makeRequests(); + }; + + //translate CSS + ripCSS(); + + //expose update for re-running respond later on + respond.update = ripCSS; + + //expose getEmValue + respond.getEmValue = getEmValue; + + //adjust on resize + function callMedia(){ + applyMedia( true ); + } + + if( w.addEventListener ){ + w.addEventListener( "resize", callMedia, false ); + } + else if( w.attachEvent ){ + w.attachEvent( "onresize", callMedia ); + } +})(this); diff --git a/cerulean/index.html b/cerulean/index.html index 9bf53eb0..539edde6 100644 --- a/cerulean/index.html +++ b/cerulean/index.html @@ -8,8 +8,8 @@ <link rel="stylesheet" href="../assets/css/bootswatch.min.css"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> - <script src="../bower_components/bootstrap/assets/js/html5shiv.js"></script> - <script src="../bower_components/bootstrap/assets/js/respond.min.js"></script> + <script src="../bower_components/html5shiv/dist/html5shiv.js"></script> + <script src="../bower_components/respond/dest/respond.min.js"></script> <![endif]--> <script type="text/javascript"> @@ -1164,7 +1164,7 @@ </div> - <script src="../bower_components/jquery/jquery.min.js"></script> + <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script> <script src="../assets/js/bootswatch.js"></script> </body> diff --git a/cosmo/index.html b/cosmo/index.html index 7ef14cff..78c4a078 100644 --- a/cosmo/index.html +++ b/cosmo/index.html @@ -8,8 +8,8 @@ <link rel="stylesheet" href="../assets/css/bootswatch.min.css"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> - <script src="../bower_components/bootstrap/assets/js/html5shiv.js"></script> - <script src="../bower_components/bootstrap/assets/js/respond.min.js"></script> + <script src="../bower_components/html5shiv/dist/html5shiv.js"></script> + <script src="../bower_components/respond/dest/respond.min.js"></script> <![endif]--> <script type="text/javascript"> @@ -1164,7 +1164,7 @@ </div> - <script src="../bower_components/jquery/jquery.min.js"></script> + <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script> <script src="../assets/js/bootswatch.js"></script> </body> diff --git a/custom/index.html b/custom/index.html index 5fc1d6f1..1865cee4 100644 --- a/custom/index.html +++ b/custom/index.html @@ -8,8 +8,8 @@ <link rel="stylesheet" href="../assets/css/bootswatch.min.css"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> - <script src="../bower_components/bootstrap/assets/js/html5shiv.js"></script> - <script src="../bower_components/bootstrap/assets/js/respond.min.js"></script> + <script src="../bower_components/html5shiv/dist/html5shiv.js"></script> + <script src="../bower_components/respond/dest/respond.min.js"></script> <![endif]--> <script type="text/javascript"> @@ -1164,7 +1164,7 @@ </div> - <script src="../bower_components/jquery/jquery.min.js"></script> + <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script> <script src="../assets/js/bootswatch.js"></script> </body> diff --git a/cyborg/index.html b/cyborg/index.html index 49e5952d..2de4ca40 100644 --- a/cyborg/index.html +++ b/cyborg/index.html @@ -8,8 +8,8 @@ <link rel="stylesheet" href="../assets/css/bootswatch.min.css"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> - <script src="../bower_components/bootstrap/assets/js/html5shiv.js"></script> - <script src="../bower_components/bootstrap/assets/js/respond.min.js"></script> + <script src="../bower_components/html5shiv/dist/html5shiv.js"></script> + <script src="../bower_components/respond/dest/respond.min.js"></script> <![endif]--> <script type="text/javascript"> @@ -1164,7 +1164,7 @@ </div> - <script src="../bower_components/jquery/jquery.min.js"></script> + <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script> <script src="../assets/js/bootswatch.js"></script> </body> diff --git a/default/index.html b/default/index.html index 7de6d062..a6273488 100644 --- a/default/index.html +++ b/default/index.html @@ -9,8 +9,8 @@ <link rel="stylesheet" href="../assets/css/bootswatch.min.css"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> - <script src="../bower_components/bootstrap/assets/js/html5shiv.js"></script> - <script src="../bower_components/bootstrap/assets/js/respond.min.js"></script> + <script src="../bower_components/html5shiv/dist/html5shiv.js"></script> + <script src="../bower_components/respond/dest/respond.min.js"></script> <![endif]--> <script type="text/javascript"> @@ -1162,7 +1162,7 @@ </div> - <script src="../bower_components/jquery/jquery.min.js"></script> + <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script> <script src="../assets/js/bootswatch.js"></script> </body> diff --git a/flatly/index.html b/flatly/index.html index a23775ac..67136e47 100644 --- a/flatly/index.html +++ b/flatly/index.html @@ -8,8 +8,8 @@ <link rel="stylesheet" href="../assets/css/bootswatch.min.css"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> - <script src="../bower_components/bootstrap/assets/js/html5shiv.js"></script> - <script src="../bower_components/bootstrap/assets/js/respond.min.js"></script> + <script src="../bower_components/html5shiv/dist/html5shiv.js"></script> + <script src="../bower_components/respond/dest/respond.min.js"></script> <![endif]--> <script type="text/javascript"> @@ -1164,7 +1164,7 @@ </div> - <script src="../bower_components/jquery/jquery.min.js"></script> + <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script> <script src="../assets/js/bootswatch.js"></script> </body> diff --git a/help/index.html b/help/index.html index 1432a907..863493b0 100644 --- a/help/index.html +++ b/help/index.html @@ -8,8 +8,8 @@ <link rel="stylesheet" href="../assets/css/bootswatch.min.css"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> - <script src="../bower_components/bootstrap/assets/js/html5shiv.js"></script> - <script src="../bower_components/bootstrap/assets/js/respond.min.js"></script> + <script src="../bower_components/html5shiv/dist/html5shiv.js"></script> + <script src="../bower_components/respond/dest/respond.min.js"></script> <![endif]--> <style> @@ -152,7 +152,7 @@ </div> - <script src="../bower_components/jquery/jquery.min.js"></script> + <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script> <script src="../assets/js/bootswatch.js"></script> <script type="text/javascript"> @@ -9,8 +9,8 @@ <link rel="stylesheet" href="./assets/css/bootswatch.min.css"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> - <script src="./bower_components/bootstrap/assets/js/html5shiv.js"></script> - <script src="./bower_components/bootstrap/assets/js/respond.min.js"></script> + <script src="./bower_components/html5shiv/dist/html5shiv.js"></script> + <script src="./bower_components/respond/dest/respond.min.js"></script> <![endif]--> <script type="text/javascript"> @@ -638,7 +638,7 @@ </div> - <script src="./bower_components/jquery/jquery.min.js"></script> + <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="./bower_components/bootstrap/dist/js/bootstrap.min.js"></script> <script src="./assets/js/bootswatch.js"></script> <script type="text/javascript"> diff --git a/journal/index.html b/journal/index.html index 6f99fa45..be5d4daa 100644 --- a/journal/index.html +++ b/journal/index.html @@ -6,6 +6,11 @@ <meta charset="utf-8"> <link rel="stylesheet" href="./bootstrap.css" media="screen"> <link rel="stylesheet" href="../assets/css/bootswatch.min.css"> + <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> + <!--[if lt IE 9]> + <script src="../bower_components/html5shiv/dist/html5shiv.js"></script> + <script src="../bower_components/respond/dest/respond.min.js"></script> + <![endif]--> <script type="text/javascript"> var _gaq = _gaq || []; @@ -1159,7 +1164,7 @@ </div> - <script src="../bower_components/jquery/jquery.min.js"></script> + <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script> <script src="../assets/js/bootswatch.js"></script> </body> diff --git a/readable/index.html b/readable/index.html index adca2b97..a1afe021 100644 --- a/readable/index.html +++ b/readable/index.html @@ -8,8 +8,8 @@ <link rel="stylesheet" href="../assets/css/bootswatch.min.css"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> - <script src="../bower_components/bootstrap/assets/js/html5shiv.js"></script> - <script src="../bower_components/bootstrap/assets/js/respond.min.js"></script> + <script src="../bower_components/html5shiv/dist/html5shiv.js"></script> + <script src="../bower_components/respond/dest/respond.min.js"></script> <![endif]--> <script type="text/javascript"> @@ -1164,7 +1164,7 @@ </div> - <script src="../bower_components/jquery/jquery.min.js"></script> + <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script> <script src="../assets/js/bootswatch.js"></script> </body> diff --git a/simplex/index.html b/simplex/index.html index 5ef8bb72..d9fcc9cc 100644 --- a/simplex/index.html +++ b/simplex/index.html @@ -8,8 +8,8 @@ <link rel="stylesheet" href="../assets/css/bootswatch.min.css"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> - <script src="../bower_components/bootstrap/assets/js/html5shiv.js"></script> - <script src="../bower_components/bootstrap/assets/js/respond.min.js"></script> + <script src="../bower_components/html5shiv/dist/html5shiv.js"></script> + <script src="../bower_components/respond/dest/respond.min.js"></script> <![endif]--> <script type="text/javascript"> @@ -1140,7 +1140,7 @@ </div> - <script src="../bower_components/jquery/jquery.min.js"></script> + <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script> <script src="../assets/js/bootswatch.js"></script> </body> diff --git a/slate/index.html b/slate/index.html index acabe021..9d55607d 100644 --- a/slate/index.html +++ b/slate/index.html @@ -8,8 +8,8 @@ <link rel="stylesheet" href="../assets/css/bootswatch.min.css"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> - <script src="../bower_components/bootstrap/assets/js/html5shiv.js"></script> - <script src="../bower_components/bootstrap/assets/js/respond.min.js"></script> + <script src="../bower_components/html5shiv/dist/html5shiv.js"></script> + <script src="../bower_components/respond/dest/respond.min.js"></script> <![endif]--> <script type="text/javascript"> @@ -1164,7 +1164,7 @@ </div> - <script src="../bower_components/jquery/jquery.min.js"></script> + <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script> <script src="../assets/js/bootswatch.js"></script> </body> diff --git a/spacelab/index.html b/spacelab/index.html index 74dd9517..da1366ca 100644 --- a/spacelab/index.html +++ b/spacelab/index.html @@ -8,8 +8,8 @@ <link rel="stylesheet" href="../assets/css/bootswatch.min.css"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> - <script src="../bower_components/bootstrap/assets/js/html5shiv.js"></script> - <script src="../bower_components/bootstrap/assets/js/respond.min.js"></script> + <script src="../bower_components/html5shiv/dist/html5shiv.js"></script> + <script src="../bower_components/respond/dest/respond.min.js"></script> <![endif]--> <script type="text/javascript"> @@ -1164,7 +1164,7 @@ </div> - <script src="../bower_components/jquery/jquery.min.js"></script> + <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script> <script src="../assets/js/bootswatch.js"></script> </body> diff --git a/tests/components.html b/tests/components.html index 94a7929f..8c83dca8 100644 --- a/tests/components.html +++ b/tests/components.html @@ -18,8 +18,8 @@ </style> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> - <script src="../bower_components/bootstrap/assets/js/html5shiv.js"></script> - <script src="../bower_components/bootstrap/assets/js/respond.min.js"></script> + <script src="../bower_components/html5shiv/dist/html5shiv.js"></script> + <script src="../bower_components/respond/dest/respond.min.js"></script> <![endif]--> </head> <body> @@ -2730,7 +2730,7 @@ </div> - <script src="../bower_components/jquery/jquery.min.js"></script> + <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/mustache.js/0.7.2/mustache.min.js"></script> <script src="../assets/js/bootswatch.js"></script> diff --git a/tests/thumbnail.html b/tests/thumbnail.html index 59ea34f0..3206d6e5 100644 --- a/tests/thumbnail.html +++ b/tests/thumbnail.html @@ -8,8 +8,8 @@ <link rel="stylesheet" href="../assets/css/bootswatch.min.css"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> - <script src="../bower_components/bootstrap/assets/js/html5shiv.js"></script> - <script src="../bower_components/bootstrap/assets/js/respond.min.js"></script> + <script src="../bower_components/html5shiv/dist/html5shiv.js"></script> + <script src="../bower_components/respond/dest/respond.min.js"></script> <![endif]--> <style> @@ -89,7 +89,7 @@ </div> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> + <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/mustache.js/0.7.2/mustache.min.js"></script> <script> diff --git a/united/index.html b/united/index.html index 25a4fe4d..66918efa 100644 --- a/united/index.html +++ b/united/index.html @@ -9,8 +9,8 @@ <link rel="stylesheet" href="../assets/css/bootswatch.min.css"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> - <script src="../bower_components/bootstrap/assets/js/html5shiv.js"></script> - <script src="../bower_components/bootstrap/assets/js/respond.min.js"></script> + <script src="../bower_components/html5shiv/dist/html5shiv.js"></script> + <script src="../bower_components/respond/dest/respond.min.js"></script> <![endif]--> <script type="text/javascript"> @@ -1170,7 +1170,7 @@ </div> - <script src="../bower_components/jquery/jquery.min.js"></script> + <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script> <script src="../assets/js/bootswatch.js"></script> </body> diff --git a/yeti/index.html b/yeti/index.html index 7174205c..0994d929 100644 --- a/yeti/index.html +++ b/yeti/index.html @@ -8,8 +8,8 @@ <link rel="stylesheet" href="../assets/css/bootswatch.min.css"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> - <script src="../bower_components/bootstrap/assets/js/html5shiv.js"></script> - <script src="../bower_components/bootstrap/assets/js/respond.min.js"></script> + <script src="../bower_components/html5shiv/dist/html5shiv.js"></script> + <script src="../bower_components/respond/dest/respond.min.js"></script> <![endif]--> <script type="text/javascript"> @@ -1164,7 +1164,7 @@ </div> - <script src="../bower_components/jquery/jquery.min.js"></script> + <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script> <script src="../assets/js/bootswatch.js"></script> </body> |