]> _ Git - cubedesigners-v7.git/commitdiff
WIP #2033 @7.5
authorstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 7 Jan 2019 16:48:00 +0000 (16:48 +0000)
committerstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 7 Jan 2019 16:48:00 +0000 (16:48 +0000)
16 files changed:
framework/application/layouts/scripts/layout.phtml
framework/application/views/helpers/FooterActualites.php
framework/application/views/helpers/FooterContact.php
framework/application/views/helpers/InlineSVG.php [new file with mode: 0644]
framework/application/views/helpers/LinkArrow.php [new file with mode: 0644]
framework/application/views/scripts/common/footer.phtml
framework/application/views/scripts/common/header.phtml
images/link-arrow.svg [new file with mode: 0644]
images/logo/Cube.svg
images/logo/Typo.svg
js/header.js
less/00-constants.less
less/01-mixins.less
less/common.less
less/footer.less
less/header.less

index 5297b16edc9df5f461d66383f5e823551dad7ca1..7b972cfa0933609aeb0602007c24565e3bd3ce1c 100644 (file)
@@ -1,7 +1,13 @@
 <?php
 
-$fonts = array('google' => array('families' => array('Roboto+Condensed:400,300,700:latin')),
-               'custom' => array('families' => array('Klavika'), 'urls' => array('/css/fonts/Klavika/Klavika.css')));
+$fonts = [
+            'google' => [
+                'families' => [
+                    'Rubik:300,300i,400'
+                ]
+            ],
+            //'custom' => array('families' => array('Klavika'), 'urls' => array('/css/fonts/Klavika/Klavika.css'))
+        ];
 // Locally hosted version of the fonts - this was so fonts would work for Windows Phones and IE but there were too many issues
 // The robotocondensed.css refers to a custom webfont kit from Font Squirrel. It doesn't display as well as the Google Fonts version
 // To make this display properly, we need type hinting and lots of testing and tweaking. End result: not worth it currently...
index 1ccfe469f9b0e7de37b9a24df0a8b9e0a7c44f62..1339080ad252af213da2585fb6707f37c816e766 100644 (file)
@@ -25,10 +25,10 @@ class Cubedesigners_View_Helper_FooterActualites extends CubeIT_View_Helper_Abst
             $res .= '</article>';
         }
 
-               $res .= $this->linkInternal(__('Plus d\'actualités'), 'news', array('class' => 'but'));
+               $res .= $this->linkInternal(__('Voir plus d\'actualité') . $this->view->linkArrow(), 'news', array('class' => 'arrow-link'));
 
                $res .= '</section>';
 
                return $res;
        }
-}
\ No newline at end of file
+}
index e56fa69fca05b1e4b8c9d024372b280dcb13a7aa..be85f375485b8a9c8f76dbf8ee10853308aa034e 100644 (file)
@@ -14,7 +14,7 @@ class Cubedesigners_View_Helper_FooterContact extends Zend_View_Helper_Abstract
 
                        $res .= '<div class="bureau" itemscope itemtype="http://schema.org/LocalBusiness">';
 
-                       $res .= '<p class="titre" itemprop="name">' . $bureau['coordonnees']['nom'] . '<p>';
+                       $res .= '<p class="titre" itemprop="name">' . sprintf(__('Bureaux de %s'), $bureau['coordonnees']['nom']) . '<p>';
 
                        $res .= '<div class="numeros">';
                        $event = array('category' => 'phone', 'action' => 'call', 'label' => $bureau['coordonnees']['tel']);
@@ -33,7 +33,7 @@ class Cubedesigners_View_Helper_FooterContact extends Zend_View_Helper_Abstract
 
                        $res .= '<div class="geoloc">';
                        $event = array('category' => 'map', 'action' => 'click', 'label' => $bureau['coordonnees']['ville']);
-                       $res .= $this->view->linkGeo(__("Plan d'accès"), $bureau['coordonnees']['adresse'] . ',' . $bureau['coordonnees']['ville'] . ',' . Zend_Locale::getTranslation($bureau['coordonnees']['pays'], 'territory'), array('class' => 'but', 'data-event' => $event));
+                       $res .= $this->view->linkGeo(__("Voir le plan") . $this->view->linkArrow(), $bureau['coordonnees']['adresse'] . ',' . $bureau['coordonnees']['ville'] . ',' . Zend_Locale::getTranslation($bureau['coordonnees']['pays'], 'territory'), array('class' => 'arrow-link', 'data-event' => $event));
                        $res .= '</div>';
 
                        $res .= '</div>';
diff --git a/framework/application/views/helpers/InlineSVG.php b/framework/application/views/helpers/InlineSVG.php
new file mode 100644 (file)
index 0000000..c88af3b
--- /dev/null
@@ -0,0 +1,25 @@
+<?php
+
+class Cubedesigners_View_Helper_InlineSVG extends CubeIT_View_Helper_Abstract {
+
+    public function inlineSVG($src, $wrap = false, $class = 'svg') {
+
+        if (file_exists($src)) {
+            $path = $src;
+        } else {
+            $path = PUBLIC_PATH . $src;
+        }
+
+        if (!file_exists($path)) {
+            return false;
+        }
+
+        $svg = file_get_contents($path);
+
+        if ($wrap) {
+            $svg = $this->view->htmlElement($svg, 'div', ['class' => $class]);
+        }
+
+        return $svg;
+    }
+}
diff --git a/framework/application/views/helpers/LinkArrow.php b/framework/application/views/helpers/LinkArrow.php
new file mode 100644 (file)
index 0000000..42724ef
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+
+class Cubedesigners_View_Helper_LinkArrow extends CubeIT_View_Helper_Abstract {
+
+    public function linkArrow() {
+
+        return '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+             viewBox="0 0 25 10.6" style="enable-background:new 0 0 25 10.6;" xml:space="preserve">
+        <path d="M25,5.5C25,5.4,25,5.2,25,5.1c0-0.1-0.1-0.1-0.1-0.2l-4.8-4.8c-0.2-0.2-0.5-0.2-0.7,0s-0.2,0.5,0,0.7l3.9,3.9H0.5
+            C0.2,4.8,0,5,0,5.3s0.2,0.5,0.5,0.5h22.8l-3.9,3.9c-0.2,0.2-0.2,0.5,0,0.7c0.1,0.1,0.2,0.1,0.4,0.1s0.3,0,0.4-0.1l4.8-4.8
+            C24.9,5.6,24.9,5.6,25,5.5z"/>
+        </svg>';
+    }
+}
index 8b18b320abaef8adeb9133d3fe0ea92de474d8f1..c12457df1b1a98cb1448342371db337457c813b2 100644 (file)
@@ -19,9 +19,9 @@ echo $this->clear();
 
                                <div class="bloc">
                                        <?php echo $this->footerActualites(); ?>
-                                       <div class="social">
-                                               <?php echo $this->footerSocials($this->option('followus')); ?>
-                                       </div>
+                               <!--<div class="social">
+                        <?php //echo $this->footerSocials($this->option('followus')); ?>
+                               </div>-->
                                </div>
                        </div>
                </div>
@@ -57,4 +57,4 @@ echo $this->clear();
                        </div>
                </div>
        </div>
-</footer>
\ No newline at end of file
+</footer>
index 24223b3a2d91577e186649ed43d14fef259ed35e..fd6614d5f8306d9795da3e6894250495eca6a567 100644 (file)
@@ -15,10 +15,10 @@ if (!is_null($homepage)) {
                <?php
                /* LOGO */
 
-               $logos = $this->image('/images/logo/Cube.svg', "Cubedesigners Logo", -1, -1, array('class' => 'cube'));
-               $logos .= $this->image('/images/logo/Typo.svg', 'Cubedesigners', -1, -1, array('class' => 'typo'));
+               $logo['symbol'] = $this->inlineSVG('images/logo/Cube.svg', true, 'logo-symbol');
+               $logo['text'] = $this->inlineSVG('images/logo/Typo.svg', true, 'logo-text');
 
-               echo $this->link($logos, $home, array('class' => 'logo'));
+               echo $this->link($logo['symbol'] . $logo['text'], $home, array('class' => 'logo'));
                if ($this->currentPage && $this->currentPage->getTemplate() == 'home') {
                        echo '<div class="sublogo"><h1>' . $this->cmsValue('logoTitle') . '</h1><h2>' . $this->cmsValue('baseline') . '</h2></div>';
                } else {
@@ -33,4 +33,4 @@ if (!is_null($homepage)) {
                echo '</nav>';
                ?>
        </div>
-</header>
\ No newline at end of file
+</header>
diff --git a/images/link-arrow.svg b/images/link-arrow.svg
new file mode 100644 (file)
index 0000000..4a874a1
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+        viewBox="0 0 25 10.6" style="enable-background:new 0 0 25 10.6;" xml:space="preserve">
+<path d="M25,5.5C25,5.4,25,5.2,25,5.1c0-0.1-0.1-0.1-0.1-0.2l-4.8-4.8c-0.2-0.2-0.5-0.2-0.7,0s-0.2,0.5,0,0.7l3.9,3.9H0.5
+       C0.2,4.8,0,5,0,5.3s0.2,0.5,0.5,0.5h22.8l-3.9,3.9c-0.2,0.2-0.2,0.5,0,0.7c0.1,0.1,0.2,0.1,0.4,0.1s0.3,0,0.4-0.1l4.8-4.8
+       C24.9,5.6,24.9,5.6,25,5.5z"/>
+</svg>
index e2ef3bf6ee84cf225b9b18d57274242075d38fd3..77c3fe508cd43ed03dc31c170f267e4b0db19414 100644 (file)
@@ -1,10 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<!-- Generator: Adobe Illustrator 19.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
-<svg version="1.0" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\r
+<svg version="1.0" id="cubeSymbol" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\r
         viewBox="0 0 57.8 60.6" style="enable-background:new 0 0 57.8 60.6;" xml:space="preserve">\r
-<style type="text/css">\r
-       .st0{fill:#FFFFFF;stroke:#FFFFFF;stroke-width:0.5;stroke-miterlimit:10;}\r
-</style>\r
 <g>\r
        <path class="st0" d="M24.3,0.6c-1.2,0.6-19.6,11-22.5,12.7c-1.4,0.7-1.6,1.8-1.6,3.3c0,1,0,24.8,0,27.9c0,1.8,0.9,2.2,1.6,2.7\r
                c4.6,2.9,18.5,11.4,20.7,12.6c2.6,1.6,5.5-0.5,4-3.1C25.1,54,16.5,37.6,16.5,37.6c4.1-2.4,8-4.7,9.1-5.5c2.3-1.4,2.5-1.5,2.5-4.6\r
index eb299edb8fe84af4a1006164a93e4a40832631ff..e856efa4a66969562fec69d4a8abb841189bec3c 100644 (file)
@@ -1,10 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<!-- Generator: Adobe Illustrator 19.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
-<svg version="1.0" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\r
+<svg version="1.0" id="cubeText" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\r
         viewBox="0 0 206.7 61" style="enable-background:new 0 0 206.7 61;" xml:space="preserve">\r
-<style type="text/css">\r
-       .st0{fill:#FFFFFF;}\r
-</style>\r
 <g>\r
        <g>\r
                <g>\r
index b60ffd8cfbcc991b9d0ede506ed2258538fc3717..ae7e07429dcc28c99cc1b12249c585261f701723 100644 (file)
@@ -8,15 +8,14 @@ var headerPos = 0;
 \r
 function load_header() {\r
 \r
-    // If we are on home, background is transparent\r
-    var hbg = 1;\r
-    if ($("#home-slideshow").length == 1) {\r
-        hbg = 0;\r
-    }\r
+    // Todo: Implement way of setting if header is light or dark (maybe from body class or class on header element?) and use that to set header text color (white/black) in order to color logo and links for starting point. Home page will be light along with selected case study pages and possibly others...\r
+    var headerColor = ($("#home-slideshow").length == 1) ? '#fff' : '#000'; // ## TEMPORARY\r
+\r
+\r
     var h = $('header');\r
-    // Background-color & height\r
-    htl.add(TweenMax.fromTo(h, 1, {backgroundColor: 'rgba(34,36,40,' + hbg + ')', height: 130},\r
-        {backgroundColor: 'rgba(34,36,40,1)', height: 68}), 0);\r
+    // Background-color & height - starts transparent and then fades in\r
+    htl.add(TweenMax.fromTo(h, 1, {color: headerColor, backgroundColor: 'rgba(255,255,255,0)', height: 130},\r
+        {color: '#000', backgroundColor: 'rgba(255,255,255,1)', height: 68}), 0);\r
     // Navigation\r
     var nav = $(h).find('.navigation');\r
     htl.add(TweenMax.fromTo(nav, 1, {marginTop: 59}, {marginTop: 24}), 0);\r
@@ -24,10 +23,10 @@ function load_header() {
     var logo = $(h).find('.logo');\r
     htl.add(TweenMax.fromTo(logo, 1, {top: 36, maxWidth: 263}, {top: 14, maxWidth: 57}), 0);\r
     // Resize cube logo (two parts)\r
-    var img = $(logo).find('img');\r
-    htl.add(TweenMax.fromTo(img, 1, {height: 60}, {height: 40}), 0);\r
+    //var img = $(logo).find('img');\r
+    htl.add(TweenMax.fromTo(logo, 1, {height: 48}, {height: 40}), 0);\r
     // Typo logo\r
-    var typo = $(logo).find('img.typo');\r
+    var typo = $(logo).find('.logo-text');\r
     htl.add(TweenMax.fromTo(typo, 1, {opacity: 1}, {opacity: 0}), 1);\r
     // Hamburger\r
     var hamburger = $(h).find('.nav-icon');\r
@@ -84,4 +83,4 @@ function headerScroll() {
     // Update\r
     formerScroll = s;\r
     scrollUp = goingUp;\r
-}
\ No newline at end of file
+}\r
index a0b5811834e9ec1a52926a008e28802509d3999b..1ff4f8055dead053ef935938cd2c0762165f52d2 100644 (file)
@@ -1,8 +1,10 @@
+@content-max-width: 1920px;\r
 @small : ~"screen and (max-width: 1024px)";\r
 \r
-@roboto: 'Roboto Condensed', sans-serif;\r
-@Klavika: 'Klavika', sans-serif;\r
+// Todo: replace variables properly\r
+@roboto: 'Rubik', sans-serif;\r
+@Klavika: 'Rubik', sans-serif;\r
 \r
 @yellow: #f6ae01;\r
 \r
-@import "01-mixins";
\ No newline at end of file
+@import "01-mixins";\r
index 474965b368058eecd55ff2f4b6f90904e1f1fc37..2c87cb9e7122dddfb380dddc622112ccf0176902 100644 (file)
 }\r
 \r
 .content-center() {\r
-       max-width: 1048px; // = 980+(34*2) - Allow room for the 34px padding on each side\r
+       max-width: @content-max-width;\r
        min-width: 530px; // Be careful of this setting and affecting the viewport initial-scale\r
-       padding-right: 34px;\r
-       padding-left: 34px;\r
+       padding-right: 5vw;\r
+       padding-left: 5vw;\r
        margin: 0 auto;\r
+\r
+       // Above max content width, fix padding so it doesn't scale too much\r
+       @media (min-width: @content-max-width) {\r
+               padding-right: 0.05 * @content-max-width;\r
+               padding-left: 0.05 * @content-max-width;\r
+       }\r
 }\r
 \r
 .slideshowmixin() {\r
     display: inline-block;\r
     width: 100%;\r
   }\r
-}
\ No newline at end of file
+}\r
index af16f2f5f94b6ea6170de47179d61b63a8a298f4..a18f59480747e4596780eaaab2c99f75dabafc7b 100644 (file)
@@ -22,6 +22,7 @@ img.responsive {
 }
 
 body {
+       background-color: #e4e5ec;
        font-family: @roboto;
        font-size: 18px;
        font-weight: 300;
@@ -31,9 +32,11 @@ body {
 }
 
 #wrapper {
+       background-color: #fff;
        overflow: hidden;
-       max-width: 100%;
+       max-width: @content-max-width;
        min-width: 640px;
+       margin: 0 auto;
 }
 
 .wf-active body {
@@ -67,6 +70,36 @@ a {
                color: @yellow;
        }
 
+       &.inverted {
+               color: @yellow;
+
+               &:hover, &:active {
+                       color: #222428;
+               }
+       }
+
+       &.arrow-link {
+               .link(#222428, @yellow);
+               display: inline-block;
+               vertical-align: middle;
+
+               &:hover {
+                       svg {
+                               transform: translateX(0.25em);
+                       }
+               }
+
+               svg {
+                       fill: currentColor;
+                       display: inline-block;
+                       vertical-align: middle;
+                       height: 0.5em;
+                       width: auto;
+                       margin-left: 1em;
+                       transition: transform 0.15s ease-out;
+               }
+       }
+
        &.but {
                display: inline-block;
                clear: both;
@@ -154,4 +187,4 @@ a {
                }
        }
 
-}
\ No newline at end of file
+}
index 60e0b74043b75072a534335c9ceb5db3ee2a4270..14c1393e911d615699fbc1c643dfc4862079762c 100644 (file)
@@ -1,19 +1,29 @@
 @import "00-constants";
 
 #footer {
+       p {
+               line-height: 1.4;
+       }
+
        a {
-               .link(#fff; @yellow);
+               //.link(@yellow, #000);
         text-decoration: none;
                &.but {
-                       .button(#fff, #212327);
+                       .button(#000, transparent);
             border: 0;
             padding: 15px;
                }
        }
 
+       .dotclear {
+               a {
+                       .link(@yellow, #000);
+               }
+       }
+
        .footer-top {
                padding: 50px 0 0 0;
-               background-color: #2d3035;
+               background-color: #F5F5F5;
                .footer-top-content {
 
                        overflow: hidden;
@@ -41,7 +51,7 @@
                                }
 
                                h2 {
-                                       color: #fff;
+                                       color: #000;
                                        padding-bottom: 36px;
                                        font-size: 40px;
 
@@ -64,7 +74,7 @@
                                        }
 
                                        .actu {
-                                               color: #fff;
+                                               color: #000;
                                                padding-bottom: 20px;
 
                                                &:last-child {
@@ -72,7 +82,7 @@
                                                }
 
                                                a {
-                                                       color: #fff;
+                                                       color: #000;
                                                }
 
                                                h3 {
@@ -82,7 +92,7 @@
                                                }
 
                                                .date {
-                                                       font-size: 12px;
+                                                       line-height: 1.7;
                                                }
                                        }
                                }
        }
 
        .contact-texte {
-               background-image: url('/images/picto_footer_mail.svg');
-               background-repeat: no-repeat;
-               background-position: 0px 10px;
-               color: #fff;
-               padding-left: 70px;
+               color: #000;
                padding-bottom: 50px;
        }
        .bureau {
                float: left;
                width: 50%;
                vertical-align: top;
-               color: #fff;
+               color: #000;
                padding-right: 21px;
 
                &:last-child {
                }
        }
        .footer-bottom {
-               background-color: #212327;
+               background-color: #F5F5F5;
                height: 46px;
-               color: #6c6c6c;
+               //color: #6c6c6c;
                text-align: left;
                font-size: 12px;
                line-height: 46px;
                .copyright {
                        display: inline-block;
                        float: left;
+
+                       a {
+                               .link(#222428, @yellow);
+                       }
                }
 
                .locale {
                        float: right;
                        a {
                                display: inline-block;
-                               line-height: 30px;
+                               line-height: 1;
                                text-transform: uppercase;
-                               height: 30px;
-                               width: 30px;
-                               border-radius: 30px;
-                               background-color: #393c42;
-                               text-align: center;
                                margin: 0 0 0 10px;
+                               .link(#000, @yellow);
 
                                &.active, &:hover {
-                                       background-color: @yellow;
-                                       color: #fff;
+                                       color: @yellow;
                                }
                        }
                }
index af3dfbd6c8ae3cc9873267b2912cf730e9fd3a9f..38b573cae31d18359efd8abee8f6baaac100a8fe 100644 (file)
@@ -4,44 +4,62 @@
 
 header {
        height: 130px;
-       background-color: #222428;
+       color: #222428;
        z-index: 100; // Some elements on case studies page have a higher z-index so make sure we are above that
        position: fixed;
-       top: 0px;
+       top: 0;
+       left: 50%;
+       transform: translateX(-50%);
        width: 100%;
+       max-width: @content-max-width;
+
+       a {
+               color: currentColor; // Pass colour down so SVG can use currentColor
+       }
+
+       svg {
+               fill: currentColor;
+       }
 
        ul {
-               text-transform: uppercase;
                font-family: @Klavika;
-               font-weight: 400;
+               font-weight: 300;
                font-size: 16px;
                list-style: none;
 
                li {
                        float: left;
 
-                       &:last-child {
-                               a {
-                                       border: 1px solid #fff;
-                                       border-radius: 2px;
-                                       &:hover {
-                                               border-color: @yellow;
-                                       }
-                               }
-                               &.active {
-                                       a {
-                                               border-color: @yellow;
-                                       }
-                               }
-                       }
+                       //&:last-child {
+                       //      a {
+                       //              border: 1px solid #fff;
+                       //              border-radius: 2px;
+                       //              &:hover {
+                       //                      border-color: @yellow;
+                       //              }
+                       //      }
+                       //      &.active {
+                       //              a {
+                       //                      border-color: @yellow;
+                       //              }
+                       //      }
+                       //}
 
                        a {
-                               .link(#fff, @yellow);
-                               padding: 5px 10px;
+                               padding: 10px 0;
+                               position: relative;
                        }
 
                        &.active a {
-                               color: @yellow;
+                               &:after {
+                                       content: '';
+                                       width: 36px;
+                                       height: 1px;
+                                       background-color: currentColor;
+                                       position: absolute;
+                                       left: 0;
+                                       top: 100%;
+                               }
                        }
                }
 
@@ -52,9 +70,23 @@ header {
                top: 36px;
                white-space: nowrap;
                max-width: 263px;
+
+               &:hover {
+                       color: currentColor; // Don't change colour like other links
+               }
+
+
                img {
                        width: auto;
                }
+
+               &-symbol, &-text {
+                       display: inline-block;
+                       svg {
+                               height: 48px;
+                               width: auto;
+                       }
+               }
        }
 
        .sublogo {
@@ -65,9 +97,8 @@ header {
                margin: 59px 0 0;
                float: right;
                li {
-                       margin: 0 20px 0 0;
-                       &:last-child {
-                               margin-right: 0;
+                       &:not(:last-child) {
+                               margin-right: 40px;
                        }
                }
        }