]> _ Git - eif-extranet.git/commitdiff
wip #5496 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 29 Sep 2022 12:36:22 +0000 (14:36 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 29 Sep 2022 12:36:22 +0000 (14:36 +0200)
inc/scripts.php
js/modernizr.js [new file with mode: 0644]
js/script.js
style/inc/common.sass [new file with mode: 0644]
style/inc/menu.sass
style/style.sass

index 9382815e2826ec06c033fa4d4b69ef166f2efda2..5a370e25222bffcfd1b820cdac54609183209556 100644 (file)
@@ -1,3 +1,5 @@
+<!-- Modernizr tests  -->
+<script src="js/modernizr.js"></script>
 <!-- Cash : Alternative plus légère de JQuery -->
 <script src="https://cdnjs.cloudflare.com/ajax/libs/cash/8.1.1/cash.min.js" integrity="sha512-X+cPfvYTMQ4sCK62U3QG9rdhziHcvR48TwiEJmlaXOpQH/aSaarxkL+zahylcvcZLDkGujg4o/ORdjSeBsRlMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
 <!-- Support des infobulles -->
diff --git a/js/modernizr.js b/js/modernizr.js
new file mode 100644 (file)
index 0000000..c3c7648
--- /dev/null
@@ -0,0 +1,6 @@
+/*! modernizr 3.6.0 (Custom Build) | MIT *
+ * https://modernizr.com/download/?-cssgrid_cssgridlegacy-addtest-setclasses !*/
+!function(e,n,t){function r(e,n){return typeof e===n}function o(){var e,n,t,o,i,s,l;for(var a in w)if(w.hasOwnProperty(a)){if(e=[],n=w[a],n.name&&(e.push(n.name.toLowerCase()),n.options&&n.options.aliases&&n.options.aliases.length))for(t=0;t<n.options.aliases.length;t++)e.push(n.options.aliases[t].toLowerCase());for(o=r(n.fn,"function")?n.fn():n.fn,i=0;i<e.length;i++)s=e[i],l=s.split("."),1===l.length?Modernizr[l[0]]=o:(!Modernizr[l[0]]||Modernizr[l[0]]instanceof Boolean||(Modernizr[l[0]]=new Boolean(Modernizr[l[0]])),Modernizr[l[0]][l[1]]=o),C.push((o?"":"no-")+l.join("-"))}}function i(e){var n=b.className,t=Modernizr._config.classPrefix||"";if(P&&(n=n.baseVal),Modernizr._config.enableJSClass){var r=new RegExp("(^|\\s)"+t+"no-js(\\s|$)");n=n.replace(r,"$1"+t+"js$2")}Modernizr._config.enableClasses&&(n+=" "+t+e.join(" "+t),P?b.className.baseVal=n:b.className=n)}function s(e,n){if("object"==typeof e)for(var t in e)x(e,t)&&s(t,e[t]);else{e=e.toLowerCase();var r=e.split("."),o=Modernizr[r[0]];if(2==r.length&&(o=o[r[1]]),"undefined"!=typeof o)return Modernizr;n="function"==typeof n?n():n,1==r.length?Modernizr[r[0]]=n:(!Modernizr[r[0]]||Modernizr[r[0]]instanceof Boolean||(Modernizr[r[0]]=new Boolean(Modernizr[r[0]])),Modernizr[r[0]][r[1]]=n),i([(n&&0!=n?"":"no-")+r.join("-")]),Modernizr._trigger(e,n)}return Modernizr}function l(e,n){return!!~(""+e).indexOf(n)}function a(){return"function"!=typeof n.createElement?n.createElement(arguments[0]):P?n.createElementNS.call(n,"http://www.w3.org/2000/svg",arguments[0]):n.createElement.apply(n,arguments)}function u(e){return e.replace(/([a-z])-([a-z])/g,function(e,n,t){return n+t.toUpperCase()}).replace(/^-/,"")}function f(e,n){return function(){return e.apply(n,arguments)}}function c(e,n,t){var o;for(var i in e)if(e[i]in n)return t===!1?e[i]:(o=n[e[i]],r(o,"function")?f(o,t||n):o);return!1}function d(e){return e.replace(/([A-Z])/g,function(e,n){return"-"+n.toLowerCase()}).replace(/^ms-/,"-ms-")}function p(n,t,r){var o;if("getComputedStyle"in e){o=getComputedStyle.call(e,n,t);var i=e.console;if(null!==o)r&&(o=o.getPropertyValue(r));else if(i){var s=i.error?"error":"log";i[s].call(i,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}}else o=!t&&n.currentStyle&&n.currentStyle[r];return o}function m(){var e=n.body;return e||(e=a(P?"svg":"body"),e.fake=!0),e}function g(e,t,r,o){var i,s,l,u,f="modernizr",c=a("div"),d=m();if(parseInt(r,10))for(;r--;)l=a("div"),l.id=o?o[r]:f+(r+1),c.appendChild(l);return i=a("style"),i.type="text/css",i.id="s"+f,(d.fake?d:c).appendChild(i),d.appendChild(c),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(n.createTextNode(e)),c.id=f,d.fake&&(d.style.background="",d.style.overflow="hidden",u=b.style.overflow,b.style.overflow="hidden",b.appendChild(d)),s=t(c,e),d.fake?(d.parentNode.removeChild(d),b.style.overflow=u,b.offsetHeight):c.parentNode.removeChild(c),!!s}function h(n,r){var o=n.length;if("CSS"in e&&"supports"in e.CSS){for(;o--;)if(e.CSS.supports(d(n[o]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var i=[];o--;)i.push("("+d(n[o])+":"+r+")");return i=i.join(" or "),g("@supports ("+i+") { #modernizr { position: absolute; } }",function(e){return"absolute"==p(e,null,"position")})}return t}function y(e,n,o,i){function s(){c&&(delete N.style,delete N.modElem)}if(i=r(i,"undefined")?!1:i,!r(o,"undefined")){var f=h(e,o);if(!r(f,"undefined"))return f}for(var c,d,p,m,g,y=["modernizr","tspan","samp"];!N.style&&y.length;)c=!0,N.modElem=a(y.shift()),N.style=N.modElem.style;for(p=e.length,d=0;p>d;d++)if(m=e[d],g=N.style[m],l(m,"-")&&(m=u(m)),N.style[m]!==t){if(i||r(o,"undefined"))return s(),"pfx"==n?m:!0;try{N.style[m]=o}catch(v){}if(N.style[m]!=g)return s(),"pfx"==n?m:!0}return s(),!1}function v(e,n,t,o,i){var s=e.charAt(0).toUpperCase()+e.slice(1),l=(e+" "+z.join(s+" ")+s).split(" ");return r(n,"string")||r(n,"undefined")?y(l,n,o,i):(l=(e+" "+E.join(s+" ")+s).split(" "),c(l,n,t))}function _(e,n,r){return v(e,t,t,n,r)}var C=[],w=[],S={_version:"3.6.0",_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){w.push({name:e,fn:n,options:t})},addAsyncTest:function(e){w.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=S,Modernizr=new Modernizr;var x,b=n.documentElement,P="svg"===b.nodeName.toLowerCase();!function(){var e={}.hasOwnProperty;x=r(e,"undefined")||r(e.call,"undefined")?function(e,n){return n in e&&r(e.constructor.prototype[n],"undefined")}:function(n,t){return e.call(n,t)}}(),S._l={},S.on=function(e,n){this._l[e]||(this._l[e]=[]),this._l[e].push(n),Modernizr.hasOwnProperty(e)&&setTimeout(function(){Modernizr._trigger(e,Modernizr[e])},0)},S._trigger=function(e,n){if(this._l[e]){var t=this._l[e];setTimeout(function(){var e,r;for(e=0;e<t.length;e++)(r=t[e])(n)},0),delete this._l[e]}},Modernizr._q.push(function(){S.addTest=s});var T="Moz O ms Webkit",z=S._config.usePrefixes?T.split(" "):[];S._cssomPrefixes=z;var E=S._config.usePrefixes?T.toLowerCase().split(" "):[];S._domPrefixes=E;var j={elem:a("modernizr")};Modernizr._q.push(function(){delete j.elem});var N={style:j.elem.style};Modernizr._q.unshift(function(){delete N.style}),S.testAllProps=v,S.testAllProps=_,Modernizr.addTest("cssgridlegacy",_("grid-columns","10px",!0)),Modernizr.addTest("cssgrid",_("grid-template-rows","none",!0)),o(),i(C),delete S.addTest,delete S.addAsyncTest;for(var k=0;k<Modernizr._q.length;k++)Modernizr._q[k]();e.Modernizr=Modernizr}(window,document);
+Modernizr.addTest('msie', function () {
+    return !!navigator.userAgent.match(/trident/i);
+});
\ No newline at end of file
index 16010f018f52c7af1eac6823d1725273bde1b119..795f5ff733ffbec43e541b65e550c07857a9967b 100644 (file)
@@ -113,7 +113,7 @@ function resize() {
 }
 
 //
-function getSpriteIcon(icon, attrs, dimensions) {
+function getSpriteIcon(icon, attrs) {
     var a = [];
     var iconSymbol = $('svg symbol[id="' + icon + '"]');
     if (iconSymbol.length > 1) {
@@ -131,13 +131,11 @@ function getSpriteIcon(icon, attrs, dimensions) {
     if (attrs.viewBox == null) {
         attrs.viewBox = iconSymbol.get(0).attributes.viewBox.value;
     }
-    if (dimensions === true) {
-        var vb = attrs.viewBox.split(' ');
-        attrs.x = vb[0];
-        attrs.y = vb[1];
-        attrs.width = vb[2];
-        attrs.height = vb[3];
-    }
+
+    var vb = attrs.viewBox.split(' ');
+    attrs.width = vb[2];
+    attrs.height = vb[3];
+
     if (attrs.class == null) {
         attrs.class = icon;
     } else {
diff --git a/style/inc/common.sass b/style/inc/common.sass
new file mode 100644 (file)
index 0000000..1a42ce6
--- /dev/null
@@ -0,0 +1,28 @@
+html, body, main
+  min-height: 100%
+
+body
+  background-color: $background-color
+  font-family: $font
+
+.button
+  border-radius: 6px
+  display: inline-block
+  padding: 12px 50px 8px 20px
+  color: #fff
+  background-color: $button-color
+  height: 40px
+  position: relative
+  font-weight: bold
+  line-height: 0.9em
+
+  svg
+    height: 30px
+    position: absolute
+    top: 5px
+    right: 13px
+
+svg
+  .no-msie
+    width: auto
+    height: auto
\ No newline at end of file
index 44c80663b8c26b1fd51376ac5786381dee7ffd9c..11d6886fd8389a74cab3144a5a1d06723bfbdf15 100644 (file)
@@ -53,7 +53,6 @@
 
       svg
         width: 40px
-        height: auto
 
       span
         display: block
 
     svg
       width: 20px
-      height: auto
       transform-origin: 50% 50%
       transform: scale(-1, 1)
 
index 1e09528a939f1698188664f005cb7d646508688f..e3b8ff59552d43422edd305cce995ca43b6cbefd 100644 (file)
@@ -1,31 +1,7 @@
 @import "inc/variables"
 @import "inc/reset"
 @import "inc/mixins"
-
-html, body, main
-  min-height: 100%
-
-body
-  background-color: $background-color
-  font-family: $font
-
-.button
-  border-radius: 6px
-  display: inline-block
-  padding: 12px 50px 8px 20px
-  color: #fff
-  background-color: $button-color
-  height: 40px
-  position: relative
-  font-weight: bold
-  line-height: 0.9em
-
-  svg
-    height: 30px
-    position: absolute
-    top: 5px
-    right: 13px
-
+@import "inc/common"
 
 main
   min-width: 1700px
@@ -119,8 +95,6 @@ main
           top: 15px
           left: 15px
           height: 70px
-          width: auto
-
 
     &.charts
       article
@@ -157,7 +131,6 @@ main
 
               svg
                 height: 30px
-                width: auto
 
         &:hover
           .chart-menu