]> _ Git - cubedesigners-v7.git/commitdiff
hide admin bar on small resolutions
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 8 Jan 2015 15:11:35 +0000 (15:11 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 8 Jan 2015 15:11:35 +0000 (15:11 +0000)
updated the slideshow (continuous) to make is responsive

js/slideshow.js
less/admin.less
less/mixins.less

index 99d99c558a46bfb5dabc852fe4505e0b9f4d13fd..a22d4c7c60dd65b53b05d78e0ada34379c45525f 100644 (file)
@@ -1,13 +1,24 @@
 registerLoader(loadCarrousel);
 
 function loadCarrousel() {
-       $(window).on('cubeitresize', function () {
-               var s = $(".slideshow,.slideshowcontinuous");
-               var ww = $(window).width();
-               var m = (ww - 1600) / 2;
-               $(s).find(".imgholder").css({marginLeft: m});
-               $(s).find(".arrows").css({left: 960 + ((ww - 960) / 2) - 77 - 10 - 30});
-       });
+    $(window).on('cubeitresize', function () {
+        var s = $(".slideshow,.slideshowcontinuous");
+        var ww = $(window).width();
+        var cw = Math.min(960, ww - 70);
+        var m = (ww - 1600) / 2;
+        $(s).find(".imgholder").css({marginLeft: m});
+        $(s).find(".arrows").css({left: cw + ((ww - cw) / 2) - 77 - 10 - 30});
+
+        if (ww < 1024) {
+            var ratio = 1024 / 650;
+            var h = ww / ratio;
+            try {
+                $(".slideshowcontinuous").data('slideshowContinuous').setHeight(h);
+            } catch (err) {
+
+            }
+        }
+    });
 
 }
 
index ed35cff5fa285319850afcf946030be85677fede..301c58cba7fdc3d00627ff459334b65b56753d04 100644 (file)
@@ -1,27 +1,31 @@
-#adminBar{
-       background:#84AE1E;
-       padding:3px 0 3px;
+@import "mixins";
 
+#adminBar {
+       @media @small{
+               display: none;
+       }
+
+       background: #84AE1E;
+       padding: 3px 0 3px;
 
-       .bar{
-               color:#fff;
-               font-size:11px;
+       .bar {
+               color: #fff;
+               font-size: 11px;
                line-height: 8px;
                font-weight: 400;
-               height:auto;
-               #adminBar a{
-                       color:#fff;
-                       margin:0 5px;
+               height: auto;
+               #adminBar a {
+                       color: #fff;
+                       margin: 0 5px;
                }
-               &.right{
-                       .right{
-                               float:right;
+               &.right {
+                       .right {
+                               float: right;
                        }
                }
        }
 }
 
-
 #tags_secondaires-element select,
 #technologies-element select {
        height: 200px;
index 058487a32905b883e720b9ac085968392b911b07..109edee2ea444ea79d3c3685b2345d902b268ad7 100644 (file)
@@ -1,3 +1,5 @@
+@small : ~"screen and (max-width: 1024px)";\r
+\r
 /*\r
 \r
 REMOVED FOR NOW - too much refactoring required to apply this neatly...\r
@@ -27,14 +29,14 @@ REMOVED FOR NOW - too much refactoring required to apply this neatly...
 // PLAN B:\r
 \r
 .media {\r
-  overflow: hidden;\r
+       overflow: hidden;\r
 }\r
 \r
 .media--item {\r
-  float: left;\r
-  margin-right: 25px;\r
+       float: left;\r
+       margin-right: 25px;\r
 }\r
 \r
 .media--body {\r
-  overflow: hidden;\r
+       overflow: hidden;\r
 }
\ No newline at end of file