diff --git a/themes/default/index.twig b/themes/default/index.twig index 75a1007..7a8b8c6 100644 --- a/themes/default/index.twig +++ b/themes/default/index.twig @@ -17,16 +17,16 @@ -
+ -
+ -
+
{{ content }}
-
+ - + diff --git a/themes/default/js/modernizr-3.3.1-custom.min.js b/themes/default/js/modernizr-3.3.1-custom.min.js index 1454151..33ad568 100644 --- a/themes/default/js/modernizr-3.3.1-custom.min.js +++ b/themes/default/js/modernizr-3.3.1-custom.min.js @@ -1,3 +1,3 @@ /*! modernizr 3.3.1 (Custom Build) | MIT * - * https://modernizr.com/download/?-classlist-csstransitions-dataset-requestanimationframe !*/ -!function(e,n,t){function r(e,n){return typeof e===n}function i(){var e,n,t,i,o,s,a;for(var f in y)if(y.hasOwnProperty(f)){if(e=[],n=y[f],n.name&&(e.push(n.name.toLowerCase()),n.options&&n.options.aliases&&n.options.aliases.length))for(t=0;tp;p++)if(v=e[p],h=E.style[v],s(v,"-")&&(v=a(v)),E.style[v]!==t){if(f||r(i,"undefined"))return u(),"pfx"==n?v:!0;try{E.style[v]=i}catch(g){}if(E.style[v]!=h)return u(),"pfx"==n?v:!0}return u(),!1}function v(e,n,t,i,o){var s=e.charAt(0).toUpperCase()+e.slice(1),a=(e+" "+S.join(s+" ")+s).split(" ");return r(n,"string")||r(n,"undefined")?m(a,n,i,o):(a=(e+" "+T.join(s+" ")+s).split(" "),u(a,n,t))}function h(e,n,r){return v(e,t,t,n,r)}var y=[],g={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,n){var t=this;setTimeout(function(){n(t[e])},0)},addTest:function(e,n,t){y.push({name:e,fn:n,options:t})},addAsyncTest:function(e){y.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=g,Modernizr=new Modernizr;var C=[],w=n.documentElement;Modernizr.addTest("classlist","classList"in w);var x="svg"===w.nodeName.toLowerCase();Modernizr.addTest("dataset",function(){var e=o("div");return e.setAttribute("data-a-b","c"),!(!e.dataset||"c"!==e.dataset.aB)});var _="Moz O ms Webkit",S=g._config.usePrefixes?_.split(" "):[];g._cssomPrefixes=S;var T=g._config.usePrefixes?_.toLowerCase().split(" "):[];g._domPrefixes=T;var b={elem:o("modernizr")};Modernizr._q.push(function(){delete b.elem});var E={style:b.elem.style};Modernizr._q.unshift(function(){delete E.style}),g.testAllProps=v,g.testAllProps=h,Modernizr.addTest("csstransitions",h("transition","all",!0));var z=function(n){var r,i=prefixes.length,o=e.CSSRule;if("undefined"==typeof o)return t;if(!n)return!1;if(n=n.replace(/^@/,""),r=n.replace(/-/g,"_").toUpperCase()+"_RULE",r in o)return"@"+n;for(var s=0;i>s;s++){var a=prefixes[s],f=a.toUpperCase()+"_"+r;if(f in o)return"@-"+a.toLowerCase()+"-"+n}return!1};g.atRule=z;var P=g.prefixed=function(e,n,t){return 0===e.indexOf("@")?z(e):(-1!=e.indexOf("-")&&(e=a(e)),n?v(e,n,t):v(e,"pfx"))};Modernizr.addTest("requestanimationframe",!!P("requestAnimationFrame",e),{aliases:["raf"]}),i(),delete g.addTest,delete g.addAsyncTest;for(var A=0;Ap;p++)if(v=e[p],h=P.style[v],s(v,"-")&&(v=o(v)),P.style[v]!==t){if(a||r(i,"undefined"))return f(),"pfx"==n?v:!0;try{P.style[v]=i}catch(g){}if(P.style[v]!=h)return f(),"pfx"==n?v:!0}return f(),!1}function v(e,n,t,i,o){var s=e.charAt(0).toUpperCase()+e.slice(1),a=(e+" "+_.join(s+" ")+s).split(" ");return r(n,"string")||r(n,"undefined")?m(a,n,i,o):(a=(e+" "+E.join(s+" ")+s).split(" "),f(a,n,t))}function h(e,n,r){return v(e,t,t,n,r)}var y=[],g={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,n){var t=this;setTimeout(function(){n(t[e])},0)},addTest:function(e,n,t){y.push({name:e,fn:n,options:t})},addAsyncTest:function(e){y.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=g,Modernizr=new Modernizr;var C=[],w=n.documentElement;Modernizr.addTest("classlist","classList"in w);var x="Moz O ms Webkit",_=g._config.usePrefixes?x.split(" "):[];g._cssomPrefixes=_;var S=function(n){var r,i=prefixes.length,o=e.CSSRule;if("undefined"==typeof o)return t;if(!n)return!1;if(n=n.replace(/^@/,""),r=n.replace(/-/g,"_").toUpperCase()+"_RULE",r in o)return"@"+n;for(var s=0;i>s;s++){var a=prefixes[s],f=a.toUpperCase()+"_"+r;if(f in o)return"@-"+a.toLowerCase()+"-"+n}return!1};g.atRule=S;var E=g._config.usePrefixes?x.toLowerCase().split(" "):[];g._domPrefixes=E;var T="svg"===w.nodeName.toLowerCase(),z={elem:l("modernizr")};Modernizr._q.push(function(){delete z.elem});var P={style:z.elem.style};Modernizr._q.unshift(function(){delete P.style}),g.testAllProps=v;var b=g.prefixed=function(e,n,t){return 0===e.indexOf("@")?S(e):(-1!=e.indexOf("-")&&(e=o(e)),n?v(e,n,t):v(e,"pfx"))};Modernizr.addTest("requestanimationframe",!!b("requestAnimationFrame",e),{aliases:["raf"]}),g.testAllProps=h,Modernizr.addTest("csstransitions",h("transition","all",!0)),i(),delete g.addTest,delete g.addAsyncTest;for(var L=0;L .container > table'); + for (var i = 0; i < tables.length; i++) { + if (!/\btable-responsive\b/.test(tables[i].parentElement.className)) { var tableWrapper = document.createElement('div'); tableWrapper.className = 'table-responsive'; - table.parentElement.insertBefore(tableWrapper, table); - tableWrapper.appendChild(table); + tables[i].parentElement.insertBefore(tableWrapper, tables[i]); + tableWrapper.appendChild(tables[i]); } - }); + } // responsive menu - var menu = document.getElementById('page-menu'), - menuToggle = document.getElementById('page-menu-toggle'), + var menu = document.getElementById('nav'), + menuToggle = document.getElementById('nav-toggle'), toggleMenuEvent = function (event) { if (event.type === 'keydown') { if ((event.keyCode != 13) && (event.keyCode != 32)) { diff --git a/themes/default/js/utils.js b/themes/default/js/utils.js index a67ea27..f8755d8 100644 --- a/themes/default/js/utils.js +++ b/themes/default/js/utils.js @@ -11,27 +11,6 @@ utils = {}; -/** - * Iterates through an iterable object (e.g. plain objects, arrays, NodeList) - * - * @param object object the object to iterate through - * @param function callback function to call on every item; the key is passed - * as first, the value as second parameter; the callback may return FALSE - * to stop the iteration - * @return void - */ -utils.forEach = function (object, callback) -{ - var i = 0, - keys = Object.keys(object), - length = keys.length; - for (; i < length; i++) { - if (callback(keys[i], object[keys[i]]) === false) { - return; - } - } -}; - /** * Checks whether the client's browser is able to slide elements or not * diff --git a/themes/default/style.css b/themes/default/style.css index af7654f..8477e2f 100644 --- a/themes/default/style.css +++ b/themes/default/style.css @@ -21,10 +21,6 @@ padding: 0; } -article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section { - display:block -} - .hidden { display: none !important; } .sr-only { position: absolute; @@ -48,10 +44,10 @@ article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, s html, body { height: 100%; } body { display: flex; flex-direction: column; } -main { flex: 1 0 auto; } -header, footer { flex: 0 0 auto; } +#main { flex: 1 0 auto; } +#header, #footer { flex: 0 0 auto; } -main { +#main { padding: 5em 0 4em; } @@ -63,93 +59,98 @@ main { .widescreen .container { max-width: 72em; } -main .container { - /* very ugly, avoid this whenever possible! */ - overflow-x: auto; -} +/* very ugly overflow fix, avoid this whenever possible! */ +#main .container { overflow-x: auto; } /*** BASIC LAYOUT: HEADER ***/ -header { background: #2EAE9B; } +#header { background: #2EAE9B; } -header h1 { +#header h1 { float: left; font-size: 2rem; margin: 0; padding: 1.5em 1em 1.5em 0; } -header h1 a, header h1 a:hover { color: #fff; } +#header h1 a, #header h1 a:hover { color: #fff; } -header nav { +#nav { text-align: right; padding: 3em 0; } -header nav ul { +#nav ul { list-style: none; margin: 0; padding: 0; } -header nav ul li { +#nav ul li { display: inline-block; margin-left: 1em; padding: 0; font-weight: bold; } -header nav a, #page-menu-toggle { color: #afe1da; } -header nav .active a, header nav a:hover, #page-menu-toggle:hover { color: #fff; } +#nav a, #nav-toggle { color: #afe1da; } +#nav .active a, #nav a:hover, #nav-toggle:hover { color: #fff; } -#page-menu-toggle { display: none; } +#nav-toggle { display: none; } + +/* IE8 + IE9 clearfix */ +#header > .container:after { + content: ''; + display: block; + clear: both; +} /*** BASIC LAYOUT: FOOTER ***/ -footer { +#footer { background: #707070; color: #C0C0C0; } -footer a { color: #ddd; } -footer a:hover { color: #fff; } +#footer a { color: #ddd; } +#footer a:hover { color: #fff; } -footer p { +#footer p { margin: 0; padding: 3em 0; } -footer .social { +#footer .social { float: right; - padding: 1.5em 0 0.5em 1em; + padding: 1.5em 0 1.5em 1em; font-size: 2rem; } /*** BASIC LAYOUT: EXTRA SMALL DEVICES ***/ @media (max-width: 767px) { - main { padding: 2em 0 1em; } + #main { padding: 2em 0 1em; } - header h1 { + #header h1 { float: none; padding: 0.5em 0; } - header nav { + #nav { clear: right; padding: 0; } - header nav ul { + #nav ul { padding-bottom: 1em; } - header nav ul li { + #nav ul li { display: block; margin-left: 0; text-align: center; } - header nav ul li a { + #nav ul li a { display: block; padding: 0.5em 0; } - .js #page-menu-toggle { + .js #nav-toggle { display: block; float: right; width: 2em; @@ -159,13 +160,13 @@ footer .social { text-align: center; cursor: pointer; } - .js #page-menu-toggle > * { vertical-align: middle; } + .js #nav-toggle > * { vertical-align: middle; } - footer p { padding: 1em 0; } - footer .social { padding: 0.5em 0 0.5em 1em; } + #footer p { padding: 1em 0; } + #footer .social { padding: 0.5em 0 0.5em 1em; } } -/*** TEXT ***/ +/*** TYPOGRAPHY ***/ html { font-size: 16px; } @@ -245,6 +246,7 @@ tbody tr:last-child td:last-child { border-bottom-rig table thead + tbody tr:first-child td { border-radius: 0 !important; } .table-responsive { overflow-x: auto; } +.table-responsive > table { margin-bottom: 0; } /*** LISTS ***/ @@ -299,11 +301,6 @@ blockquote { label, fieldset legend { font-weight: bold; } -input::-moz-focus-inner, button::-moz-focus-inner { - border: 0; - padding: 0; -} - input:not([type="checkbox"]):not([type="radio"]), button, select, textarea, fieldset, fieldset legend { border: solid 1px #ccc; border-radius: 0.3em; @@ -352,3 +349,9 @@ fieldset label:last-child, fieldset input:last-child, fieldset button:last-child fieldset select:last-child, fieldset textarea:last-child { margin-right: 0; } + +/* Firefox input size fix */ +input::-moz-focus-inner, button::-moz-focus-inner { + border: 0; + padding: 0; +}