]> _ Git - cubedesigners-v7.git/commitdiff
Update home slideshow to be 100% height and add animated arrow to scroll. Update...
authorstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 28 Aug 2015 16:47:29 +0000 (16:47 +0000)
committerstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 28 Aug 2015 16:47:29 +0000 (16:47 +0000)
framework/application/views/helpers/ContactInfos.php
framework/application/views/helpers/HomeSlideshow.php
js/slideshow.js
less/common.less
less/contact.less
less/home.less

index 3e9b09bb280f28242d26152665dc322552f224c7..2ff8d08d88f15349b5a5e110f858dfd35320f472 100644 (file)
@@ -27,8 +27,8 @@ class Cubedesigners_View_Helper_ContactInfos extends Zend_View_Helper_Abstract {
             $res.='</div>';\r
 \r
             $res.='<div class="numeros">';\r
-            $res.='<p itemprop="telephone">' . __('Tel') . ' ' . $bureau['coordonnees']['tel'] . '</p>';\r
-            $res.='<p itemprop="faxNumber">' . __('Fax') . ' ' . $bureau['coordonnees']['fax'] . '</p>';\r
+            $res.='<p itemprop="telephone">' . __('Tel') . ' ' . $this->view->linkPhone($bureau['coordonnees']['tel']) . '</p>';\r
+            //$res.='<p itemprop="faxNumber">' . __('Fax') . ' ' . $bureau['coordonnees']['fax'] . '</p>';\r
             $res.='</div>';\r
 \r
             $res.='</div>'; // .inner\r
index dcfe2c78f2fe492d4d7a9e897e9ad4a90427f91f..862e71b521469008a6844eb0af61c3f3422422fe 100644 (file)
@@ -5,6 +5,7 @@ class Cubedesigners_View_Helper_HomeSlideshow extends CubeIT_View_Helper_Abstrac
        public function homeSlideshow($slides) {
                $this->headScript()->addSlideshow();
                $this->headScript()->addGSAP();
+        $this->headScript()->addJQueryLocalScroll();
                $this->addScriptAndStyle('carrousel');
 
                $slides = $slides['slides'];
@@ -23,18 +24,26 @@ class Cubedesigners_View_Helper_HomeSlideshow extends CubeIT_View_Helper_Abstrac
                                $time = $slide['time'] * 1000;
                        }
 
-                       $attributes['style'] = 'background-image:url("' . CubeIT_View_Helper_ImageCms::getPath($slide['image']) . '");';
-                       $attributes['data-time'] = $time;
-                       $attributes['class'] = 'slide';
-                       $link = $slide['lien'];
-                       $link['label'] = $this->markupDotclear($slide['legende']);
-                       $s .= $this->view->htmlElement($this->view->linkCMS($link), 'div', $attributes);
+            // Slide image is in a separate absolutely positioned div to allow it to be animated with the scale function
+            $image_attributes['style'] = 'background-image:url("' . CubeIT_View_Helper_ImageCms::getPath($slide['image']) . '");';
+            $image_attributes['class'] = 'slide-bg';
+            $slide_image = $this->view->htmlElement('', 'span', $image_attributes); // making it a span because of existing CSS that affects all divs in this context
+
+            $slide_attributes['data-time'] = $time;
+            $slide_attributes['class'] = 'slide';
+            $link = $slide['lien'];
+
+                       $link['label'] = $slide_image . $this->markupDotclear($slide['legende']);
+                       $s .= $this->view->htmlElement($this->view->linkCMS($link), 'div', $slide_attributes);
                }
 
                $options = array('arrows' => false, 'arrowspermanent' => false, 'autoMode' => true, 'transitionType' => 'slide', 'baseHeight' => 836, 'responsive' => true);
                $res .= $this->htmlElement($s, 'div', array('class' => 'slides slideshow', 'data-options' => $options));
 
                $res .= '</div>';
+
+        $res .= '<div class="scrollarrow"><a href="#agency"></a></div>';
+
                $res .= '</div>';
                $res .= '</section>';
 
index bf3254c386e5f290d93612622ae8059b4f930030..76940366cd38c5930c49aca834b04be7afb221fe 100644 (file)
@@ -11,7 +11,8 @@ function loadCarrousel() {
         var slideshowBaseWidth = 1024;
         var sw = Math.min(ww, slideshowBaseWidth);
 
-        $(".slideshowcontinuous,.slideshow").each(function () {
+        // Agency page slideshow
+        $(".slideshowcontinuous").each(function () {
             var baseHeight = parseInt($(this).data('options').baseHeight);
             var ratio = slideshowBaseWidth / baseHeight;
             var h = sw / ratio;
@@ -20,24 +21,24 @@ function loadCarrousel() {
 
             try {
                 $(this).data('slideshow').setHeight(h);
+            } catch (err) {
+
+            }
+        });
 
-                if ($(this).parents('#home-slideshow').length == 1) {
-                    $(this).find('.slide').each(function () {
-                        var masque = $(this).find('.masque');
-                        var overlap = parseInt($(masque).data('overlap'));
+        // Homepage slideshow
+        $(".slideshow").each(function () {
+            var baseHeight = parseInt($(this).data('options').baseHeight);
+            var ratio = slideshowBaseWidth / baseHeight;
+            var h = sw / ratio;
+            var scale = h / baseHeight;
 
-                        var ih = (baseHeight + overlap) * scale;
-                        $(this).find(".masque").css({
-                            height: ih,
-                            top: -1 * overlap * scale
-                        });
+            var windowHeight = $(window).height();
+            var newH = Math.round(windowHeight * 1); // could be 0.8 for 80%...
 
-                        var ml = (ww - 1600 * scale) / 2;
 
-                        $(this).find('.masque .imgholder').css('marginLeft', ml);
-                        $(this).find(".masque .imgholder img").css({height: ih, width: 'auto'});
-                    });
-                }
+            try {
+                $(this).data('slideshow').setHeight(newH);
             } catch (err) {
 
             }
@@ -45,5 +46,16 @@ function loadCarrousel() {
 
     });
 
+    var e = $(".scrollarrow a");
+    var tl = new TimelineMax({repeat: -1, repeatDelay: 1});
+    tl.add(TweenMax.to(e, 1, {ease: Strong.easeOut, backgroundPosition: "50% 35px", opacity: 1}));
+    tl.add(TweenMax.to(e, 1, {ease: Strong.easeIn, backgroundPosition: "50% 70px", opacity: 0, delay: 1}));
+
+    $(document).localScroll({
+        axis: 'y',
+        duration: 500,
+        hash: false
+    });
+
 }
 
index b44d3c180f231f05388f0f7ac6fb8bcc1ec305c8..c54c5c080d0c42eefe2225d061ac482883d54fea 100644 (file)
@@ -125,7 +125,7 @@ a {
 
 .dotclear {
     a {
-      color: #1b1b1b;
+      //color: #1b1b1b;
       text-decoration: underline;
     }
 
index 423722aac26fcf762bc24285d724800527129c5f..e204586572d89c05762b630cd783a51fe9850524 100644 (file)
@@ -78,7 +78,7 @@
        }
 
        .titre {
-               padding-bottom: 20px;
+               padding-bottom: 25px;
                font-size: 32px;
        }
 
@@ -87,7 +87,7 @@
                background-repeat: no-repeat;
                background-position: 0px 0px;
                padding-left: 60px;
-               padding-bottom: 50px;
+               padding-bottom: 15px;
        }
 
        .numeros {
                background-position: 0px 0px;
                padding-left: 60px;
                padding-bottom: 50px;
+
+        p {
+          line-height: 49px; // Height of the icon
+        }
        }
 }
 
index fc83aceeb720ab17ad6177c4908bef01390ef6af..7915f54a0bed4ef133894ac1f732c72c5743c195 100644 (file)
@@ -26,6 +26,30 @@ nav.active[role="navigation"] {
 }
 
 /* Home Slideshow */
+
+//@keyframes bg-anim {
+//  0% {
+//    -moz-transform: scale(1);
+//    -webkit-transform: scale(1);
+//    transform: scale(1);
+//  }
+//  50% {
+//    -moz-transform: scale(1.2);
+//    -webkit-transform: scale(1.2);
+//    transform: scale(1.2);
+//  }
+//}
+//@-webkit-keyframes bg-anim {
+//  0% {
+//    -webkit-transform: scale(1);
+//    transform: scale(1);
+//  }
+//  50% {
+//    -webkit-transform: scale(1.2);
+//    transform: scale(1.2);
+//  }
+//}
+
 #home-slideshow {
        overflow: visible;
        //margin-top: -130px;
@@ -34,10 +58,24 @@ nav.active[role="navigation"] {
                .slides {
                        .slideshowmixin();
                        .slide {
-                               background-repeat: no-repeat;
-                               background-size: cover;
-                               background-position: 50% 0;
 //                             background-blend-mode: multiply;
+                overflow: hidden;
+                .slide-bg {
+                  position: absolute;
+                  top: 0;
+                  left: 0;
+                  width: 100%;
+                  height: 100%;
+                  background-size: cover;
+                  background-repeat: no-repeat;
+                  background-position: 50% 0;
+//                  -moz-animation: bg-anim 15s linear 1s infinite;
+//                  -webkit-animation: bg-anim 15s linear 1s infinite;
+//                  transform: scale(1);
+                  display: block;
+                  z-index: -2;
+                }
+
                                > div {
 
                                        text-align: center;
@@ -78,6 +116,25 @@ nav.active[role="navigation"] {
                        }
                }
        }
+
+  .scrollarrow {
+    position: absolute;
+    bottom: 10px;
+    left: 0;
+    width: 100%;
+    height: 105px;
+    margin: 5px 0 0 0;
+    z-index: 11;
+
+    a {
+      display: block;
+      height: 105px;
+      background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0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