├── CNAME ├── robots.txt ├── _layouts └── blog.html ├── favicon.png ├── src ├── 2.0.0 │ ├── tests │ │ ├── test.css │ │ └── ready.html │ └── responsive.js ├── README.md ├── 0.97a │ ├── README.md │ └── changelog.txt ├── 0.98 │ ├── README.md │ └── changelog.txt ├── 0.99 │ ├── README.md │ └── changelog.txt └── 1.0.0 │ └── README.md ├── site ├── assets │ ├── img │ │ ├── 404.jpg │ │ ├── docs.png │ │ ├── forkme.png │ │ ├── download.png │ │ ├── logo-big.png │ │ ├── customize.png │ │ ├── global-var.gif │ │ ├── logos │ │ │ ├── logo.png │ │ │ ├── favicon.gif │ │ │ ├── favicon.png │ │ │ └── head-empty.pdn │ │ ├── serial-load.gif │ │ ├── social │ │ │ ├── github.png │ │ │ ├── nuget.png │ │ │ ├── qunit.png │ │ │ ├── twitter.png │ │ │ ├── uservoice.png │ │ │ ├── github-gray.png │ │ │ ├── html5-css3.png │ │ │ ├── sprite-social.png │ │ │ ├── stackoverflow.png │ │ │ ├── twitter-gray.png │ │ │ ├── uservoice-gray.png │ │ │ ├── html5-css3-gray.png │ │ │ └── stackoverflow-gray.png │ │ ├── browser_logos-64.png │ │ ├── expires-header.gif │ │ ├── togetherjs-logo.png │ │ ├── featured │ │ │ ├── noupe.com.png │ │ │ ├── speckyboy.com.png │ │ │ ├── webappers.com.png │ │ │ ├── creativebloq.com.png │ │ │ ├── net.tutsplus.com.png │ │ │ ├── noupe.com-small.png │ │ │ ├── smashing-apps.com.png │ │ │ ├── speckyboy.com-small.png │ │ │ ├── webappers.com-small.png │ │ │ ├── creativebloq.com-small.png │ │ │ ├── net.tutsplus.com-small.png │ │ │ ├── smashingmagazine.com.png │ │ │ ├── smashing-apps.com-small.png │ │ │ └── smashingmagazine.com-small.png │ │ └── truth-about-html5.jpg │ ├── css │ │ ├── html5.min.css │ │ ├── syntax.min.css │ │ ├── normalize.min.css │ │ └── syntax.css │ ├── libs │ │ ├── qunit │ │ │ ├── qunit-assert-step.min.js │ │ │ ├── qunit-assert-step.min.js.map │ │ │ ├── qunit-assert-step.js │ │ │ └── qunit.min.css │ │ ├── builder │ │ │ ├── builder.min.css │ │ │ ├── builder.css │ │ │ ├── builder.min.js │ │ │ ├── builder.min.js.map │ │ │ └── builder.js │ │ └── packer │ │ │ ├── words.min.js │ │ │ ├── words.js │ │ │ ├── words.min.js.map │ │ │ └── packer.min.js │ └── js │ │ ├── comments.min.js │ │ ├── comments.js │ │ └── comments.min.js.map ├── blog.html ├── documentation.html ├── unit.html └── resources.html ├── test ├── unit │ ├── 0.98 │ │ ├── assets │ │ │ └── test.css │ │ ├── test.feature.js │ │ ├── test.responsive.js │ │ ├── test.load-css.js │ │ └── index.html │ ├── 0.99 │ │ ├── assets │ │ │ └── test.css │ │ ├── test.feature.js │ │ ├── test.conf.js │ │ ├── test.responsive.js │ │ ├── test.load-css.js │ │ └── index.html │ ├── 1.0.0 │ │ ├── assets │ │ │ └── test.css │ │ ├── test.feature.js │ │ ├── test.conf.js │ │ ├── test.responsive.js │ │ ├── test.load-css.js │ │ └── index.html │ └── 0.97a │ │ ├── test.feature.js │ │ ├── test.responsive.js │ │ └── index.html ├── style.min.css ├── style.css ├── headjs.html ├── load.html ├── script-bottom.html ├── script.html └── headjs-ordered.html ├── .gitignore ├── _config.yml ├── dist ├── 0.99 │ ├── head.core.js.bundle │ ├── head.load.js.bundle │ ├── head.css3.js.bundle │ ├── head.js.bundle │ ├── README.md │ ├── changelog.txt │ ├── head.nuspec │ ├── head.core.min.js │ └── head.load.min.js ├── 1.0.0 │ ├── head.core.js.bundle │ ├── head.load.js.bundle │ ├── head.css3.js.bundle │ ├── head.js.bundle │ ├── README.md │ ├── head.nuspec │ └── head.core.min.js ├── README.md ├── 0.97a │ ├── README.md │ ├── changelog.txt │ ├── head.core.min.js │ └── head.load.min.js └── 0.98 │ ├── README.md │ ├── changelog.txt │ ├── head.core.min.js │ └── head.load.min.js ├── 404.html ├── _includes ├── sections │ ├── download.html │ ├── menu.html │ ├── featured.html │ └── footer.html ├── scripts │ ├── uservoice.html │ └── analytics.html └── api │ ├── 1.0.0 │ ├── responsive.html │ ├── router.html │ ├── setup.html │ ├── browser.html │ ├── html5.html │ ├── screen.html │ ├── load.html │ ├── configuration.html │ └── ready.html │ └── 2.0.0 │ ├── responsive.html │ ├── router.html │ ├── setup.html │ ├── browser.html │ ├── html5.html │ ├── screen.html │ ├── load.html │ └── ready.html ├── bower.json ├── _posts ├── 2013-11-13-HeadJS-v1.0.2-Update.md ├── 2013-11-05-HeadJS-v1.0.1-Update.md ├── 2013-05-20-Migrating-to-Jekyll.md ├── 2013-11-08-head.responsive-v2.0.0-alpha.md ├── 2013-11-22-HeadJS-v1.0.3-Update.md └── 2013-11-04-HeadJS-v1.0.0-Released.md ├── jekyll-windows.txt ├── sitemap.xml ├── .travis.yml ├── LICENSE ├── package.json ├── README.md └── .gitattributes /CNAME: -------------------------------------------------------------------------------- 1 | headjs.com 2 | -------------------------------------------------------------------------------- /robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: /test/unit/ -------------------------------------------------------------------------------- /_layouts/blog.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: main 3 | --- 4 | {{ content }} 5 | -------------------------------------------------------------------------------- /favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/favicon.png -------------------------------------------------------------------------------- /src/2.0.0/tests/test.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: rgb(0, 255, 61); 3 | } 4 | -------------------------------------------------------------------------------- /site/assets/img/404.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/404.jpg -------------------------------------------------------------------------------- /src/2.0.0/responsive.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/src/2.0.0/responsive.js -------------------------------------------------------------------------------- /site/assets/img/docs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/docs.png -------------------------------------------------------------------------------- /site/assets/img/forkme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/forkme.png -------------------------------------------------------------------------------- /site/assets/img/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/download.png -------------------------------------------------------------------------------- /site/assets/img/logo-big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/logo-big.png -------------------------------------------------------------------------------- /site/assets/img/customize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/customize.png -------------------------------------------------------------------------------- /site/assets/img/global-var.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/global-var.gif -------------------------------------------------------------------------------- /site/assets/img/logos/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/logos/logo.png -------------------------------------------------------------------------------- /site/assets/img/serial-load.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/serial-load.gif -------------------------------------------------------------------------------- /src/README.md: -------------------------------------------------------------------------------- 1 | Use these files only for testing. 2 | 3 | If you want production files, look in the /dist folder ;-) -------------------------------------------------------------------------------- /site/assets/img/logos/favicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/logos/favicon.gif -------------------------------------------------------------------------------- /site/assets/img/logos/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/logos/favicon.png -------------------------------------------------------------------------------- /site/assets/img/social/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/social/github.png -------------------------------------------------------------------------------- /site/assets/img/social/nuget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/social/nuget.png -------------------------------------------------------------------------------- /site/assets/img/social/qunit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/social/qunit.png -------------------------------------------------------------------------------- /src/0.97a/README.md: -------------------------------------------------------------------------------- 1 | Use these files only for testing. 2 | 3 | If you want production files, look in the /dist folder ;-) -------------------------------------------------------------------------------- /src/0.98/README.md: -------------------------------------------------------------------------------- 1 | Use these files only for testing. 2 | 3 | If you want production files, look in the /dist folder ;-) -------------------------------------------------------------------------------- /src/0.99/README.md: -------------------------------------------------------------------------------- 1 | Use these files only for testing. 2 | 3 | If you want production files, look in the /dist folder ;-) -------------------------------------------------------------------------------- /src/1.0.0/README.md: -------------------------------------------------------------------------------- 1 | Use these files only for testing. 2 | 3 | If you want production files, look in the /dist folder ;-) -------------------------------------------------------------------------------- /site/assets/img/browser_logos-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/browser_logos-64.png -------------------------------------------------------------------------------- /site/assets/img/expires-header.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/expires-header.gif -------------------------------------------------------------------------------- /site/assets/img/logos/head-empty.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/logos/head-empty.pdn -------------------------------------------------------------------------------- /site/assets/img/social/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/social/twitter.png -------------------------------------------------------------------------------- /site/assets/img/social/uservoice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/social/uservoice.png -------------------------------------------------------------------------------- /site/assets/img/togetherjs-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/togetherjs-logo.png -------------------------------------------------------------------------------- /test/unit/0.98/assets/test.css: -------------------------------------------------------------------------------- 1 | #browserscope { 2 | display: block; 3 | } 4 | body { 5 | background-color: #EEEEEE; 6 | } -------------------------------------------------------------------------------- /test/unit/0.99/assets/test.css: -------------------------------------------------------------------------------- 1 | #browserscope { 2 | display: block; 3 | } 4 | body { 5 | background-color: #EEEEEE; 6 | } -------------------------------------------------------------------------------- /test/unit/1.0.0/assets/test.css: -------------------------------------------------------------------------------- 1 | #browserscope { 2 | display: block; 3 | } 4 | body { 5 | background-color: #EEEEEE; 6 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # git ignore file 2 | .idea/ 3 | _site/ 4 | *.sln 5 | *.suo 6 | *.config 7 | *.bundle 8 | sauce_connect.* 9 | node_modules/ -------------------------------------------------------------------------------- /site/assets/img/featured/noupe.com.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/featured/noupe.com.png -------------------------------------------------------------------------------- /site/assets/img/social/github-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/social/github-gray.png -------------------------------------------------------------------------------- /site/assets/img/social/html5-css3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/social/html5-css3.png -------------------------------------------------------------------------------- /site/assets/img/truth-about-html5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/truth-about-html5.jpg -------------------------------------------------------------------------------- /site/assets/img/social/sprite-social.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/social/sprite-social.png -------------------------------------------------------------------------------- /site/assets/img/social/stackoverflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/social/stackoverflow.png -------------------------------------------------------------------------------- /site/assets/img/social/twitter-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/social/twitter-gray.png -------------------------------------------------------------------------------- /site/assets/img/social/uservoice-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/social/uservoice-gray.png -------------------------------------------------------------------------------- /site/assets/img/featured/speckyboy.com.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/featured/speckyboy.com.png -------------------------------------------------------------------------------- /site/assets/img/featured/webappers.com.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/featured/webappers.com.png -------------------------------------------------------------------------------- /site/assets/img/social/html5-css3-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/social/html5-css3-gray.png -------------------------------------------------------------------------------- /site/assets/img/featured/creativebloq.com.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/featured/creativebloq.com.png -------------------------------------------------------------------------------- /site/assets/img/featured/net.tutsplus.com.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/featured/net.tutsplus.com.png -------------------------------------------------------------------------------- /site/assets/img/featured/noupe.com-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/featured/noupe.com-small.png -------------------------------------------------------------------------------- /site/assets/img/featured/smashing-apps.com.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/featured/smashing-apps.com.png -------------------------------------------------------------------------------- /site/assets/img/social/stackoverflow-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/social/stackoverflow-gray.png -------------------------------------------------------------------------------- /site/assets/img/featured/speckyboy.com-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/featured/speckyboy.com-small.png -------------------------------------------------------------------------------- /site/assets/img/featured/webappers.com-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/featured/webappers.com-small.png -------------------------------------------------------------------------------- /site/assets/img/featured/creativebloq.com-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/featured/creativebloq.com-small.png -------------------------------------------------------------------------------- /site/assets/img/featured/net.tutsplus.com-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/featured/net.tutsplus.com-small.png -------------------------------------------------------------------------------- /site/assets/img/featured/smashingmagazine.com.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/featured/smashingmagazine.com.png -------------------------------------------------------------------------------- /site/assets/img/featured/smashing-apps.com-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/featured/smashing-apps.com-small.png -------------------------------------------------------------------------------- /site/assets/img/featured/smashingmagazine.com-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashandSalt/headjs/master/site/assets/img/featured/smashingmagazine.com-small.png -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # GitHub Defaults 2 | lsi: false 3 | pygments: true 4 | safe: true 5 | 6 | # UTF-8 & parse errors fix 7 | markdown: redcarpet 8 | 9 | # Custom Variables 10 | head: 11 | major: 1.0.0 12 | minor: 1.0.3 -------------------------------------------------------------------------------- /dist/0.99/head.core.js.bundle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /src/0.99/core.js 5 | -------------------------------------------------------------------------------- /dist/0.99/head.load.js.bundle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /src/0.99/load.js 5 | -------------------------------------------------------------------------------- /dist/1.0.0/head.core.js.bundle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /src/1.0.0/core.js 5 | -------------------------------------------------------------------------------- /dist/1.0.0/head.load.js.bundle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /src/1.0.0/load.js 5 | -------------------------------------------------------------------------------- /dist/0.99/head.css3.js.bundle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /src/0.99/core.js 5 | /src/0.99/css3.js 6 | -------------------------------------------------------------------------------- /dist/1.0.0/head.css3.js.bundle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /src/1.0.0/core.js 5 | /src/1.0.0/css3.js 6 | -------------------------------------------------------------------------------- /site/assets/css/html5.min.css: -------------------------------------------------------------------------------- 1 | article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block} 2 | audio{display:none} 3 | canvas,video{display:inline-block;*display:inline;*zoom:1} 4 | [hidden]{display:none} 5 | audio[controls]{display:inline-block;*display:inline;*zoom:1} 6 | mark{background:#FF0;color:#000} -------------------------------------------------------------------------------- /dist/0.99/head.js.bundle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /src/0.99/core.js 5 | /src/0.99/css3.js 6 | /src/0.99/load.js 7 | -------------------------------------------------------------------------------- /site/assets/libs/qunit/qunit-assert-step.min.js: -------------------------------------------------------------------------------- 1 | QUnit.extend(QUnit.assert,{step:function(n,t){QUnit.config.current.step++,typeof t=="undefined"&&(t="step "+n);var i=QUnit.config.current.step;QUnit.push(QUnit.equiv(i,n),i,n,t)}}),QUnit.testStart(function(){QUnit.config.current.step=0}); 2 | //# sourceMappingURL=qunit-assert-step.min.js.map -------------------------------------------------------------------------------- /dist/1.0.0/head.js.bundle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /src/1.0.0/core.js 5 | /src/1.0.0/css3.js 6 | /src/1.0.0/load.js 7 | -------------------------------------------------------------------------------- /dist/README.md: -------------------------------------------------------------------------------- 1 | #Prepackaged Files 2 | 3 | ###head.js / head.min.js 4 | 5 | - Complete package containing: core.js, css3.js, and load.js 6 | 7 | ###head.css3.js / head.css3.min.js 8 | 9 | - Package containing: core.js and css3.js 10 | 11 | ###head.core.js / head.core.min.js 12 | 13 | - Package containing only core.js 14 | 15 | ###head.load.js / head.load.min.js 16 | 17 | - Package containing only load.js -------------------------------------------------------------------------------- /dist/0.97a/README.md: -------------------------------------------------------------------------------- 1 | #Prepackaged Files 2 | 3 | ###head.js / head.min.js 4 | 5 | - Complete package containing: core.js, css3.js, and load.js 6 | 7 | ###head.css3.js / head.css3.min.js 8 | 9 | - Package containing: core.js and css3.js 10 | 11 | ###head.core.js / head.core.min.js 12 | 13 | - Package containing only core.js 14 | 15 | ###head.load.js / head.load.min.js 16 | 17 | - Package containing only load.js -------------------------------------------------------------------------------- /dist/0.98/README.md: -------------------------------------------------------------------------------- 1 | #Prepackaged Files 2 | 3 | ###head.js / head.min.js 4 | 5 | - Complete package containing: core.js, css3.js, and load.js 6 | 7 | ###head.css3.js / head.css3.min.js 8 | 9 | - Package containing: core.js and css3.js 10 | 11 | ###head.core.js / head.core.min.js 12 | 13 | - Package containing only core.js 14 | 15 | ###head.load.js / head.load.min.js 16 | 17 | - Package containing only load.js -------------------------------------------------------------------------------- /test/unit/0.97a/test.feature.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Test Feature Detection 3 | */ 4 | module('Features'); 5 | 6 | var classes = " " + document.documentElement.className; 7 | 8 | function hasClass(css) { 9 | return classes.indexOf(" " + css) !== -1; 10 | } 11 | 12 | test("hasClass(className)", function () { 13 | expect(1); 14 | 15 | ok(hasClass('boxshadow') || hasClass('no-boxshadow'), 'box-shadow'); 16 | }); -------------------------------------------------------------------------------- /test/unit/0.98/test.feature.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Test Feature Detection 3 | */ 4 | module('Features'); 5 | 6 | var classes = " " + document.documentElement.className; 7 | 8 | function hasClass(css) { 9 | return classes.indexOf(" " + css) !== -1; 10 | } 11 | 12 | test("hasClass(className)", function () { 13 | expect(1); 14 | 15 | ok(hasClass('boxshadow') || hasClass('no-boxshadow'), 'box-shadow'); 16 | }); -------------------------------------------------------------------------------- /test/unit/0.99/test.feature.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Test Feature Detection 3 | */ 4 | module("Features"); 5 | 6 | var classes = " " + document.documentElement.className; 7 | 8 | function hasClass(css) { 9 | return classes.indexOf(" " + css) !== -1; 10 | } 11 | 12 | test("hasClass(className)", function () { 13 | expect(1); 14 | 15 | ok(hasClass("boxshadow") || hasClass("no-boxshadow"), "box-shadow"); 16 | }); -------------------------------------------------------------------------------- /test/unit/1.0.0/test.feature.js: -------------------------------------------------------------------------------- 1 | module("Features"); 2 | 3 | // only sync tests use expect() 4 | // http://qunitjs.com/cookbook/#synchronous-callbacks 5 | 6 | var classes = " " + document.documentElement.className; 7 | 8 | function hasClass(css) { 9 | return classes.indexOf(" " + css) !== -1; 10 | } 11 | 12 | test("hasClass(className)", function () { 13 | expect(1); 14 | 15 | ok(hasClass("boxshadow") || hasClass("no-boxshadow"), "box-shadow"); 16 | }); -------------------------------------------------------------------------------- /site/assets/js/comments.min.js: -------------------------------------------------------------------------------- 1 | (function(n,t,i){"use strict";function r(i,r,u){n.load("https://cdn.moot.it/latest/moot.css"),t("#moot").detach().appendTo(t(i).parent()).moot({url:"https://api.moot.it/i/headjs/".concat(r),title:u})}function u(n,i,r){r=r||"result,js,html,css",t("#examples").detach().html("") 22 | .appendTo($(ele).parent()); 23 | } 24 | 25 | window.blog = { 26 | loadComments: loadComments, 27 | loadFiddle: loadFiddle 28 | }; 29 | })(head, jQuery, window, document, navigator); -------------------------------------------------------------------------------- /site/documentation.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: main 3 | title: Welcome to API documentation 4 | scripts: ["/site/assets/libs/jquery/jquery.min.js", "https://cdn.moot.it/latest/moot.min.js", "/site/assets/js/comments.min.js"] 5 | --- 6 | 7 |
8 |

API documentation

9 |
10 | See how different things are done with HeadJS 11 |
12 |

13 | Pick your version and get cookin' ! 14 |

15 |

16 | 24 |

25 |
26 | 27 |
28 | Make it the only script in your HEAD. 29 | « A concise solution to universal problems » 30 |
31 | 32 | {% include sections/download.html %} -------------------------------------------------------------------------------- /sitemap.xml: -------------------------------------------------------------------------------- 1 | --- 2 | baseUrl: http://headjs.com 3 | --- 4 | 5 | 6 | 7 | {{ page.baseUrl }} 8 | 9 | 10 | {{ page.baseUrl }}/site/blog.html 11 | 12 | 13 | {{ page.baseUrl }}/site/documentation.html 14 | 15 | 16 | {{ page.baseUrl }}/site/download.html 17 | 18 | 19 | {{ page.baseUrl }}/site/resources.html 20 | 21 | 22 | {{ page.baseUrl }}/site/unit.html 23 | 24 | 25 | {{ page.baseUrl }}/site/api/v1.00.html 26 | 27 | 28 | {% for post in site.posts %} 29 | 30 | {{ page.baseUrl }}{{ post.url }} 31 | 32 | {% endfor %} 33 | {% for page in site.pages %} 34 | 35 | {% endfor %} 36 | -------------------------------------------------------------------------------- /dist/0.99/README.md: -------------------------------------------------------------------------------- 1 | ##Prepackaged Files 2 | 3 | ###Full: Responsive Design + Feature Detections + Asset Loader 4 | ####head.js / head.min.js 5 | 6 | - Contains: core.js, css3.js, and load.js 7 | - For Debug: head.min.js.map ([js source map](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/)) 8 | 9 | ###Bundle: Responsive Design + Feature Detections 10 | ####head.css3.js / head.css3.min.js 11 | 12 | - Contains: core.js and css3.js 13 | - For Debug: head.css3.min.js.map ([js source map](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/)) 14 | 15 | ###Bundle: Responsive Design 16 | ####head.core.js / head.core.min.js 17 | 18 | - Contains: core.js 19 | - For Debug: head.core.min.js.map ([js source map](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/)) 20 | 21 | ###Bundle: Asset Loader 22 | ####head.load.js / head.load.min.js 23 | 24 | - Contains: load.js 25 | - For Debug: head.load.min.js.map ([js source map](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/)) -------------------------------------------------------------------------------- /dist/1.0.0/README.md: -------------------------------------------------------------------------------- 1 | ##Prepackaged Files 2 | 3 | ###Full: Responsive Design + Feature Detections + Asset Loader 4 | ####head.js / head.min.js 5 | 6 | - Contains: core.js, css3.js, and load.js 7 | - For Debug: head.min.js.map ([js source map](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/)) 8 | 9 | ###Bundle: Responsive Design + Feature Detections 10 | ####head.css3.js / head.css3.min.js 11 | 12 | - Contains: core.js and css3.js 13 | - For Debug: head.css3.min.js.map ([js source map](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/)) 14 | 15 | ###Bundle: Responsive Design 16 | ####head.core.js / head.core.min.js 17 | 18 | - Contains: core.js 19 | - For Debug: head.core.min.js.map ([js source map](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/)) 20 | 21 | ###Bundle: Asset Loader 22 | ####head.load.js / head.load.min.js 23 | 24 | - Contains: load.js 25 | - For Debug: head.load.min.js.map ([js source map](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/)) -------------------------------------------------------------------------------- /test/style.min.css: -------------------------------------------------------------------------------- 1 | html{background-color:#f9f9f9}body{color:#333;font:13px sans-serif}#wrap{margin:20px auto;width:800px}#nav{padding-left:30px}#nav a{float:left;margin-right:30px;color:#666;text-decoration:none;font-weight:bold}#nav em{display:block;font-style:normal;font-weight:normal;color:#999}#content{margin-top:10px;background-color:#fff;padding:30px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-moz-box-shadow:0 0 5px #000;-moz-box-shadow:0 0 5px rgba(0,0,0,.2);-webkit-box-shadow:0 0 5px #000;-webkit-box-shadow:0 0 5px rgba(0,0,0,.2)}h1{color:#777;font-size:40px;margin:0;margin-bottom:-10px}h1 em{font-weight:normal;font-style:normal;color:#999}#time{font-size:150px;color:#888}#ms{font-weight:bold;color:#222}#content p{font-size:18px;margin:5px 0;color:#777}#content strong{color:#222}.details{padding:10px 0 0 0;font-style:italic}#footer{margin:5px 15px}#footer a{text-decoration:none;color:#666;font-size:11px}.clear,.clearfix{zoom:1}.clear:after,.clearfix:after{content:" ";display:block;height:0;clear:both;visibility:hidden} -------------------------------------------------------------------------------- /site/assets/js/comments.min.js.map: -------------------------------------------------------------------------------- 1 | { 2 | "version":3, 3 | "file":"comments.min.js", 4 | "lineCount":1, 5 | "mappings":"CAAE,QAAQ,CAACA,CAAI,CAAEC,CAAC,CAAEC,CAAV,CAAkD,CACxD,Y,CAEAC,SAASA,CAAY,CAACC,CAAG,CAAEC,CAAI,CAAEC,CAAZ,CAAmB,CACpCN,CAAIO,KAAK,CAAC,qCAAD,CAAuC,CAEhDN,CAAC,CAAC,OAAD,CACGO,OAAO,CAAA,CACPC,SAAS,CAACR,CAAC,CAACG,CAAD,CAAKM,OAAO,CAAA,CAAd,CACTC,KAAK,CAAC,CACF,GAAK,CAAE,+BAA+BC,OAAO,CAACP,CAAD,CAAM,CACnD,KAAK,CAAEC,CAFL,CAAD,CAN2B,CAYxCO,SAASA,CAAU,CAACT,CAAG,CAAEU,CAAE,CAAEC,CAAV,CAAmB,CAClCA,CAAQ,CAAEA,CAAQ,EAAG,oBAAoB,CAEzCd,CAAC,CAAC,WAAD,CACGO,OAAO,CAAA,CACPQ,KAAK,CAAC,gDAAiD,CAAEF,CAAG,CAAE,YAAa,CAAEC,CAAQ,CAAE,8BAAlF,CACLN,SAAS,CAACR,CAAC,CAACG,CAAD,CAAKM,OAAO,CAAA,CAAd,CANqB,CAStCR,CAAMe,KAAM,CAAG,CACX,YAAY,CAAEd,CAAY,CAC1B,UAAU,CAAEU,CAFD,CAxByC,EA4B1D,CAACb,IAAI,CAAEkB,MAAM,CAAEhB,MAAM,CAAEiB,QAAQ,CAAEC,SAAjC,CAA2C", 6 | "sources":["comments.js"], 7 | "names":["head","$","window","loadComments","ele","path","label","load","detach","appendTo","parent","moot","concat","loadFiddle","id","options","html","blog","jQuery","document","navigator"] 8 | } 9 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # define language used 2 | language: node_js 3 | 4 | # configure node version 5 | node_js: 6 | - "0.11" 7 | 8 | # http://about.travis-ci.org/docs/user/build-configuration/#Build-Lifecycle 9 | # install dependencies 10 | before_script: 11 | - npm install -g grunt-cli 12 | - npm install grunt grunt-contrib-qunit 13 | 14 | # run 15 | script: grunt test -v -d 16 | 17 | 18 | # Run tests using Travis CI and Sauce Labs 19 | # https://saucelabs.com/opensource/travis 20 | # 21 | # Secure environment variables 22 | # http://about.travis-ci.org/docs/user/build-configuration/#Secure-environment-variables 23 | # 24 | # Extra links 25 | # https://github.com/axemclion/grunt-saucelabs 26 | env: 27 | global: 28 | - secure: "i8xVOci13yViGd+vqpiM0P2kL4qayAOOd80jmlOOKHu7tCMEF6EvkJBOwALVx+LDRFnyg/4iP0drQSMYztiF5ZTnEcbh+EknltKAA3ygI/d2RUDhB7Cn7Knu3baqE1By3BXHbVlhOZ0zTZUbwrGcnzxnBHec5mvISw9Y1dIaz94=" 29 | - secure: "M7lJ0WoAcSACTUJGHRuTcUzGrvo806mJ5UCJ3MjttL4DPz+kxeO2zLPCLff12zmv1x97lRjKtY7zJJei8ZkGgEQfLLlz5I3Hg7yJ2dSqTxGiKpr7vlipDZq6+ZPpHo3kElsGIy5ue/rVKNS/8l8I5zYRdNpWkwztLJvj6nHfxIo=" -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2013 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /_posts/2013-05-20-Migrating-to-Jekyll.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: main 3 | title: Migrating to Jekyll 4 | excerpt: Now testing Jekyll for static stite generation, including blog & comments 5 | scripts: ["/site/assets/libs/jquery/jquery.min.js", "https://cdn.moot.it/latest/moot.min.js", "/site/assets/js/comments.min.js"] 6 | --- 7 | 8 | #{{ page.title }} ({{ page.date | date_to_string }}) 9 | 10 |
11 | 12 | If you are reading this, then you found the new site :) 13 | 14 | This site is in full migration, so don't take heed of any content you may come across 15 | ..chances are things are incomplete or mixed up. 16 | 17 | But feel free to look around, some nice features are comming up. 18 | 19 | * Migrating to [Jekyll](http://jekyllrb.com) engine for site generation 20 | - logical layouts 21 | - post generation 22 | - static content generation 23 | * Testing HeadJS v2.0 24 | * Comments integration with [moot.it](http://moot.it) 25 | * project on which the original creator of HeadJS now works on 26 | * check it out, it's pretty cool (beta) 27 | 28 | 29 |
30 |

Show Comments

31 |
32 |
 
-------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "headjs", 3 | "description": "HeadJS: Responsive Design, Feature Detections & Asset Loading. The only script in your ", 4 | "version": "1.0.3", 5 | "homepage": "http://headjs.com", 6 | "author": { 7 | "name": "Various contributors", 8 | "url": "http://headjs.com" 9 | }, 10 | "contributors": [ 11 | { 12 | "name": "Tero Piirainen", 13 | "url": "https://plus.google.com/115630295536677299145" 14 | }, 15 | { 16 | "name": "Robert Hoffmann", 17 | "url": "https://google.com/+RobertHoffmann" 18 | } 19 | ], 20 | "keywords": [ 21 | "loader", 22 | "require", 23 | "polyfill", 24 | "html5", 25 | "css3", 26 | "feature", 27 | "responsive" 28 | ], 29 | "repository": { 30 | "type": "git", 31 | "url": "git://github.com/headjs/headjs.git" 32 | }, 33 | "bugs": { 34 | "url": "https://github.com/headjs/headjs/issues" 35 | }, 36 | "license" : "MIT", 37 | "dependencies": {}, 38 | "devDependencies": { 39 | "grunt": "~0.4.0", 40 | "grunt-cli": "~0.1.6", 41 | "grunt-saucelabs": "~4.0.2", 42 | "grunt-contrib-connect": "~0.1.2", 43 | "grunt-contrib-watch": "~0.2.0", 44 | "grunt-contrib-qunit": "~0.3.0" 45 | }, 46 | "scripts": { 47 | "test": "grunt test" 48 | } 49 | } -------------------------------------------------------------------------------- /dist/0.98/changelog.txt: -------------------------------------------------------------------------------- 1 | 0.98 (2012-11-09) 2 | - Load: Fixed loading bug in IE10 3 | - Load: Corrected some issues with loading from inside <head> 4 | - Load: Rewrite of large parts of code base 5 | - Started to massively document the sourcecode :) 6 | - Css3: moved "touch" detection from core to here 7 | - Css3: added "retina" detection 8 | - Css3: replaced "font-face" detection that was using "Conditional Comments" with simplisitc browser version detection 9 | - Core: Added gt, gte, lte, eq classes to width detection (lt existed already) 10 | - Core: Added gt, gte, lt, lte, eq classes for browser vendor & version detection 11 | - By default only lt/gt classes are activated 12 | - You can of course configure to your likings via head_conf 13 | 14 | 0.97a (2012-10-20) 15 | - Updated QUnit & got unit tests running again 16 | - Swictched to "use strict" 17 | - Fixed up some variable usage 18 | - Added browser detections other than just for ie-lt 19 | - updated browser regexes (firefox, safari, opera, ios, android, webkit) 20 | - detect if browser is: desktop, mobile, touch enabled 21 | - detect portrait/landscape mode 22 | - html5 shim now only triggers on ie-lt9 23 | - added a throttle to onResize, since some browsers fire tons of events/sec 24 | - added corrected height/width measurements, but only exposed via new object: head.screen 25 | - contains height/width, innerHeight/innerWidth, outerHeight/outerWidth 26 | - force all css router names to lowercase just in case ppl try typing in names with wierd casings -------------------------------------------------------------------------------- /src/0.98/changelog.txt: -------------------------------------------------------------------------------- 1 | 0.98 (2012-11-09) 2 | - Load: Fixed loading bug in IE10 3 | - Load: Corrected some issues with loading from inside <head> 4 | - Load: Rewrite of large parts of code base 5 | - Started to massively document the sourcecode :) 6 | - Css3: moved "touch" detection from core to here 7 | - Css3: added "retina" detection 8 | - Css3: replaced "font-face" detection that was using "Conditional Comments" with simplisitc browser version detection 9 | - Core: Added gt, gte, lte, eq classes to width detection (lt existed already) 10 | - Core: Added gt, gte, lt, lte, eq classes for browser vendor & version detection 11 | - By default only lt/gt classes are activated 12 | - You can of course configure to your likings via head_conf 13 | 14 | 0.97a (2012-10-20) 15 | - Updated QUnit & got unit tests running again 16 | - Swictched to "use strict" 17 | - Fixed up some variable usage 18 | - Added browser detections other than just for ie-lt 19 | - updated browser regexes (firefox, safari, opera, ios, android, webkit) 20 | - detect if browser is: desktop, mobile, touch enabled 21 | - detect portrait/landscape mode 22 | - html5 shim now only triggers on ie-lt9 23 | - added a throttle to onResize, since some browsers fire tons of events/sec 24 | - added corrected height/width measurements, but only exposed via new object: head.screen 25 | - contains height/width, innerHeight/innerWidth, outerHeight/outerWidth 26 | - force all css router names to lowercase just in case ppl try typing in names with wierd casings -------------------------------------------------------------------------------- /site/assets/libs/packer/words.js: -------------------------------------------------------------------------------- 1 | 2 | var Words = Collection.extend({ 3 | constructor: function(script) { 4 | this.base(); 5 | forEach (script.match(WORDS), this.add, this); 6 | this.encode(); 7 | }, 8 | 9 | add: function(word) { 10 | if (!this.has(word)) this.base(word); 11 | word = this.get(word); 12 | word.count++; 13 | return word; 14 | }, 15 | 16 | encode: function() { 17 | // sort by frequency 18 | this.sort(function(word1, word2) { 19 | return word2.count - word1.count; 20 | }); 21 | 22 | eval("var a=62,e=" + Packer.ENCODE62); 23 | var encode = e; 24 | var encoded = new Collection; // a dictionary of base62 -> base10 25 | var count = this.size(); 26 | for (var i = 0; i < count; i++) { 27 | encoded.put(encode(i), i); 28 | } 29 | 30 | var empty = function() {return ""}; 31 | var index = 0; 32 | forEach (this, function(word) { 33 | if (encoded.has(word)) { 34 | word.index = encoded.get(word); 35 | word.toString = empty; 36 | } else { 37 | while (this.has(encode(index))) index++; 38 | word.index = index++; 39 | } 40 | word.encoded = encode(word.index); 41 | }, this); 42 | 43 | // sort by encoding 44 | this.sort(function(word1, word2) { 45 | return word1.index - word2.index; 46 | }); 47 | }, 48 | 49 | toString: function() { 50 | return this.getValues().join("|"); 51 | } 52 | }, { 53 | Item: { 54 | constructor: function(word) { 55 | this.toString = function() {return word}; 56 | }, 57 | 58 | count: 0, 59 | encoded: "", 60 | index: -1 61 | } 62 | }); 63 | -------------------------------------------------------------------------------- /_includes/api/1.0.0/responsive.html: -------------------------------------------------------------------------------- 1 |

Achieve responsive design with CSS that targets different screen resolutions, paths, states and browsers

2 |
3 | HeadJS will detect screen resolutions, features, browsers and automatically generate dynamic css/javascript classes that you can then target. 4 |
5 |
6 |

Often you will need to adapt your design or code logic depending on resolution, where the user is, or what browser he is using.

7 | 8 | {% highlight css %} 9 | /* Only apply margin to IE < 6 */ 10 | .ie-lt6 { 11 | margin: 10px; 12 | } 13 | 14 | /* Resize elements based on resolution */ 15 | .lt-800 .container { 16 | width: 600px; 17 | } 18 | .gt-1024 .container { 19 | width: 1000px; 20 | } 21 | 22 | /* Change style based on feature support */ 23 | .no-border-radius table { 24 | border: 1px dashed black; 25 | } 26 | 27 | /* Change elements on individual pages thank's to the CSS Router */ 28 | .index-page .ads { 29 | display: none; 30 | } 31 | 32 | /* Do something if the user is on a mobile device */ 33 | if (head.mobile) { 34 | head.load("iscroll.js"); 35 | } 36 | {% endhighlight %} 37 | 38 |

39 | All feature detections are both accessible via css classes, and javascript properties. 40 |

41 | 42 |
43 |
44 |

Show Comments

45 |
46 |
47 |
-------------------------------------------------------------------------------- /_includes/api/2.0.0/responsive.html: -------------------------------------------------------------------------------- 1 |

Achieve responsive design with CSS that targets different screen resolutions, paths, states and browsers

2 |
3 | HeadJS will detect screen resolutions, features, browsers and automatically generate dynamic css/javascript classes that you can then target. 4 |
5 |
6 |

Often you will need to adapt your design or code logic depending on resolution, where the user is, or what browser he is using.

7 | 8 | {% highlight css %} 9 | /* Only apply margin to IE < 6 */ 10 | .ie-lt6 { 11 | margin: 10px; 12 | } 13 | 14 | /* Resize elements based on resolution */ 15 | .lt-800 .container { 16 | width: 600px; 17 | } 18 | .gt-1024 .container { 19 | width: 1000px; 20 | } 21 | 22 | /* Change style based on feature support */ 23 | .no-border-radius table { 24 | border: 1px dashed black; 25 | } 26 | 27 | /* Change elements on individual pages thank's to the CSS Router */ 28 | .index-page .ads { 29 | display: none; 30 | } 31 | 32 | /* Do something if the user is on a mobile device */ 33 | if (head.mobile) { 34 | head.load("iscroll.js"); 35 | } 36 | {% endhighlight %} 37 | 38 |

39 | All feature detections are both accessible via css classes, and javascript properties. 40 |

41 | 42 |
43 |
44 |

Show Comments

45 |
46 |
47 |
-------------------------------------------------------------------------------- /test/style.css: -------------------------------------------------------------------------------- 1 | html { 2 | background-color: #f9f9f9; 3 | } 4 | body { 5 | color: #333; 6 | font: 13px sans-serif; 7 | } 8 | #wrap { 9 | margin: 20px auto; 10 | width: 800px; 11 | } 12 | #nav { 13 | padding-left: 30px; 14 | } 15 | #nav a { 16 | float: left; 17 | margin-right: 30px; 18 | color: #666; 19 | text-decoration: none; 20 | font-weight: bold; 21 | } 22 | #nav em { 23 | display: block; 24 | font-style: normal; 25 | font-weight: normal; 26 | color: #999; 27 | } 28 | #content { 29 | margin-top: 10px; 30 | background-color: #fff; 31 | padding: 30px; 32 | -webkit-border-radius: 5px; 33 | -moz-border-radius: 5px; 34 | border-radius: 5px; 35 | -moz-box-shadow: 0 0 5px #000000; 36 | -moz-box-shadow: 0 0 5px rgba(0,0,0,.2); 37 | -webkit-box-shadow: 0 0 5px #000000; 38 | -webkit-box-shadow: 0 0 5px rgba(0,0,0,.2); 39 | } 40 | 41 | h1 { 42 | color: #777; 43 | font-size: 40px; 44 | margin: 0; 45 | margin-bottom: -10px; 46 | } 47 | h1 em { 48 | font-weight: normal; 49 | font-style: normal; 50 | color: #999; 51 | } 52 | #time { 53 | font-size: 150px; 54 | color: #888; 55 | } 56 | #ms { 57 | font-weight: bold; 58 | color: #222; 59 | } 60 | #content p { 61 | font-size: 18px; 62 | margin: 5px 0; 63 | color: #777; 64 | } 65 | #content strong { 66 | color: #222; 67 | } 68 | .details { 69 | padding: 10px 0 0 0; 70 | font-style: italic; 71 | } 72 | #footer { 73 | margin: 5px 15px; 74 | } 75 | #footer a { 76 | text-decoration: none; 77 | color: #666; 78 | font-size: 11px; 79 | } 80 | /* clearfix */ 81 | .clear, .clearfix { 82 | zoom: 1; 83 | } 84 | .clear:after, .clearfix:after { 85 | content: " "; 86 | display: block; 87 | height: 0; 88 | clear: both; 89 | visibility: hidden; 90 | } 91 | -------------------------------------------------------------------------------- /_includes/api/1.0.0/router.html: -------------------------------------------------------------------------------- 1 |

CSS Router

2 |
3 | Know which page & section the user is currently on and react accordingly 4 |
5 |
6 |

Ever need to highlight or change certain features depending on where the user is ? HeadJS will detect the current page, and what section (subfolder/path) the user is on, and generate CSS classes that you can then easily target.

7 | 8 | 18 | 19 | {% highlight css %} 20 | /* user is on any page that ends with /index.* or on the root path / or */ 21 | #index-page .main-menu { 22 | background-color: gray; 23 | } 24 | 25 | /* user is on a path containing /api/ */ 26 | .api-section .top-menu { 27 | display: none; 28 | } 29 | 30 | /* mix & match */ 31 | 32 | /* for example the user is on /api/test.html */ 33 | #test-page.api-section .top-menu { 34 | display: block; 35 | } 36 | {% endhighlight %} 37 | 38 |

If the user is on page « /home/api/test.html » HeadJS will generate the following CSS classes for you: #test-page, .home-section, .api-section

39 | 40 |

You can choose how these variables are named in the configuration section.

41 | 42 |
43 |
44 |

Show Comments

45 |
46 |
47 |
-------------------------------------------------------------------------------- /_includes/api/2.0.0/router.html: -------------------------------------------------------------------------------- 1 |

CSS Router

2 |
3 | Know which page & section the user is currently on and react accordingly 4 |
5 |
6 |

Ever need to highlight or change certain features depending on where the user is ? HeadJS will detect the current page, and what section (subfolder/path) the user is on, and generate CSS classes that you can then easily target.

7 | 8 | 18 | 19 | {% highlight css %} 20 | /* user is on any page that ends with /index.* or on the root path / or */ 21 | #index-page .main-menu { 22 | background-color: gray; 23 | } 24 | 25 | /* user is on a path containing /api/ */ 26 | .api-section .top-menu { 27 | display: none; 28 | } 29 | 30 | /* mix & match */ 31 | 32 | /* for example the user is on /api/test.html */ 33 | #test-page.api-section .top-menu { 34 | display: block; 35 | } 36 | {% endhighlight %} 37 | 38 |

If the user is on page « /home/api/test.html » HeadJS will generate the following CSS classes for you: #test-page, .home-section, .api-section

39 | 40 |

You can choose how these variables are named in the configuration section.

41 | 42 |
43 |
44 |

Show Comments

45 |
46 |
47 |
-------------------------------------------------------------------------------- /site/assets/libs/builder/builder.min.js: -------------------------------------------------------------------------------- 1 | function xhr(n,t){t=t||!0;var i;try{i=new window.ActiveXObject("Microsoft.XMLHTTP")}catch(r){i=new window.XMLHttpRequest}i.open("GET",n,t),i.onreadystatechange=function(){i.readyState==4&&alert(i.responseText)},i.send(null)}function GetFeatures(){$.getJSON("/src/features/inventory.json",function(n){$(n).each(function(n,t){var i="";i+="
  • "; 30 | 31 | $("#" + item.category).append(html); 32 | }); 33 | }); 34 | } 35 | 36 | function generate() { 37 | var result = []; 38 | document.getElementById("out").value = ""; 39 | $("[data-package]:checked").each(function () { 40 | $.ajax({ 41 | type: "GET", 42 | url: "/src/" + $(this).data("package"), 43 | dataType: "text", 44 | async: false 45 | }) 46 | .done(function (data) { 47 | result.push(data); 48 | }); 49 | }); 50 | 51 | var content = new Packer().pack("var tests = [" + result + "];", $("#pack").is(":checked"), $("#minify").is(":checked")); 52 | document.getElementById("out").value = content; 53 | $("#size").html((content.length / 1024).toFixed(2) + "K"); 54 | } 55 | 56 | function getDownload() { 57 | var contents = document.getElementById("out").value; 58 | var filename = "head.custom.js"; 59 | 60 | if (head.browser.ie) { 61 | SaveIE(contents, filename); 62 | } else if (head.browser.chrome || head.browser.ff) { 63 | Download.save(contents, filename); 64 | } 65 | } 66 | 67 | /* IE Magic 68 | * http://stackoverflow.com/questions/4458119/display-save-as-dialog-and-save-contents-of-a-selected-text-inside-textarea-to 69 | ****************************************************************************************************************************/ 70 | function SaveIE(content, filename) { 71 | if (document.execCommand) { 72 | var oWin = window.open("about:blank", "_blank"); 73 | 74 | oWin.document.write(content); 75 | oWin.document.close(); 76 | 77 | var success = oWin.document.execCommand('SaveAs', true, filename); 78 | oWin.close(); 79 | } 80 | } 81 | 82 | /* Chrome & Firefox Magic 83 | * http://stackoverflow.com/questions/12718210/how-to-save-file-from-textarea-in-javascript-with-a-name 84 | ******************************************************************************************************/ 85 | var Download = { 86 | click: function (node) { 87 | var ev = document.createEvent("MouseEvents"); 88 | 89 | ev.initMouseEvent("click", true, false, self, 0, 0, 0, 0, 0, false, false, false, false, 0, null); 90 | return node.dispatchEvent(ev); 91 | }, 92 | encode: function (data) { 93 | return 'data:application/octet-stream;base64,' + btoa(data); 94 | }, 95 | link: function (data, name) { 96 | var a = document.createElement('a'); 97 | 98 | a.download = name || self.location.pathname.slice(self.location.pathname.lastIndexOf('/') + 1); 99 | a.href = data || self.location.href; 100 | 101 | return a; 102 | } 103 | }; 104 | Download.save = function (data, name) { 105 | this.click( 106 | this.link( 107 | this.encode(data), 108 | name 109 | ) 110 | ); 111 | }; --------------------------------------------------------------------------------