]> _ Git - cubedesigners-v7.git/commitdiff
Allow related case studies to be picked manually for expertise and client pages.
authorstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 2 Sep 2015 15:15:49 +0000 (15:15 +0000)
committerstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 2 Sep 2015 15:15:49 +0000 (15:15 +0000)
Add animated down arrow to home slideshow.
Multiple styling fixes, including a hack-fix for bad Klavika font rendering on Windows + Chrome (see common.less).

18 files changed:
framework/application/forms/CMS/Expertise.php
framework/application/forms/CMS/Sub/ExpertiseCategories.php [deleted file]
framework/application/forms/CMS/Sub/Home/Expertises.php
framework/application/forms/CMS/Sub/RelatedCaseStudies.php [new file with mode: 0644]
framework/application/forms/Element/CaseStudiesCheckboxes.php [new file with mode: 0644]
framework/application/views/helpers/CasestudiesList.php
framework/application/views/scripts/studies/index.phtml
framework/application/views/scripts/templates/contact.phtml
framework/application/views/scripts/templates/expertise.phtml
js/home.js
js/slideshow.js
less/admin.less
less/casestudies_detail.less
less/common.less
less/contact.less
less/footer.less
less/header.less
less/list.less

index a8e5b19711d0d06ed427944ce3899fc5e8299b08..c625b1e874e84a5c03e4911e4228aced84307e28 100644 (file)
@@ -4,6 +4,10 @@ class Cubedesigners_Form_CMS_Expertise extends Cubedesigners_Form_CMS_Expertises
 
        public function init() {
                parent::init();
+
+        $related_casestudies = new Cubedesigners_Form_CMS_Sub_RelatedCaseStudies();
+        $related_casestudies->setLegend('Related Case Studies');
+        $this->addSubForm($related_casestudies, 'related_casestudies');
        }
 
 }
diff --git a/framework/application/forms/CMS/Sub/ExpertiseCategories.php b/framework/application/forms/CMS/Sub/ExpertiseCategories.php
deleted file mode 100644 (file)
index 183358f..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-class Cubedesigners_Form_CMS_Sub_ExpertiseCategories extends CubeIT_Form_SubForm
-{
-    public function init() {
-        parent::init();
-
-        $titre = new Zend_Form_Element_Text('title');
-        $titre->setLabel('Case Studies sous-titre');
-        $this->addElementLocalized($titre);
-
-        $categories = new Cubedesigners_Form_Element_CategoriesCheckboxes('categories');
-        $categories->setLabel('Categories');
-        $this->addElement($categories);
-    }
-}
\ No newline at end of file
index 4fb7b403eba27f67f4f8e81dd7cf1dbc4c4a9f2b..fea8749fd8a4f7c244c6a4ca4c6e6ffd4e989a3c 100644 (file)
@@ -17,10 +17,6 @@ class Cubedesigners_Form_CMS_Sub_Home_Expertises extends CubeIT_Form_SubForm {
                $lien->urlEnabled(false)->fileEnabled(false);
                $lien->setLegend('Bouton');
                $this->addSubForm($lien, 'button');
-
-        $related_categories = new Cubedesigners_Form_CMS_Sub_ExpertiseCategories();
-        $related_categories->setLegend('Related Categories (for Case Studies)');
-        $this->addSubForm($related_categories, 'related_categories');
        }
 
 }
diff --git a/framework/application/forms/CMS/Sub/RelatedCaseStudies.php b/framework/application/forms/CMS/Sub/RelatedCaseStudies.php
new file mode 100644 (file)
index 0000000..f34132a
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+
+class Cubedesigners_Form_CMS_Sub_RelatedCaseStudies extends CubeIT_Form_SubForm
+{
+    public function init() {
+        parent::init();
+
+        $titre = new Zend_Form_Element_Text('title');
+        $titre->setLabel('Related Case Studies sous-titre');
+        $this->addElementLocalized($titre);
+
+        $casestudies = new Cubedesigners_Form_Element_CaseStudiesCheckboxes('casestudies');
+        $casestudies->setLabel('Case Studies');
+        $this->addElement($casestudies);
+    }
+}
\ No newline at end of file
diff --git a/framework/application/forms/Element/CaseStudiesCheckboxes.php b/framework/application/forms/Element/CaseStudiesCheckboxes.php
new file mode 100644 (file)
index 0000000..d8cf002
--- /dev/null
@@ -0,0 +1,9 @@
+<?php\r
+\r
+class Cubedesigners_Form_Element_CaseStudiesCheckboxes extends CubeIT_Form_Element_MultiCheckboxList {\r
+\r
+       public function init() {\r
+               $this->setBaseForm('Cubedesigners_Form_CMS_Sub_Casestudies_Studies');\r
+       }\r
+\r
+}
\ No newline at end of file
index 35a93c48710900ca14d4a9c84b55116dde3ea159..24bb5fc04912689137802617f55c28d62ca1f1a5 100644 (file)
@@ -4,7 +4,7 @@ class Cubedesigners_View_Helper_CasestudiesList extends CubeIT_View_Helper_Abstr
 
        protected $_datas;
 
-       public function CasestudiesList($datas, $currentStudie = null, $categories = null, $limit = null) {
+       public function CasestudiesList($datas, $currentStudie = null, $categories = null, $limit = null, $IDs = null) {
 
                $this->addScriptAndStyle('casestudies');
                $this->_datas = $datas;
@@ -30,6 +30,11 @@ class Cubedesigners_View_Helper_CasestudiesList extends CubeIT_View_Helper_Abstr
             $s->where('categories IN (?)', $categories);
         }
 
+        // Fetch specific case study IDs
+        if(is_array($IDs)) {
+            $s->where('id IN (?)', $IDs);
+        }
+
         if($limit) {
             $s->limit($limit);
         }
index 7af939a7424c5e5d603878aeaa81561a8f074c09..9d00408b33903de6b9be6cdfc79a6c1617a52c6e 100644 (file)
@@ -6,7 +6,7 @@ $this->headScript()->addScriptAndStyle('casestudies_detail');
 
 echo $this->CasestudiesDetail($this->studie);
 ?>
-<div class="casestudies-list related content">
+<div class="casestudies-list related content jgroup">
     <div class="title">
         <?php echo $this->markupDotclear($this->casestudies_titre); ?>
     </div>
index 8e55d97ca2505560da735081acdc3b02d4112776..cdf0ec1e527d9e174cb7fc3ca568783e78478e22 100644 (file)
@@ -12,7 +12,7 @@ foreach ($bureaux as $bureau) {
 }
 ?>
 
-<div class="contact-title content"><?php echo $this->markupDotclear($this->titre); ?></div>
+<div class="title content"><?php echo $this->markupDotclear($this->titre); ?></div>
 
 <div class="contact-informations">
     <?php echo $this->contactInfos($this->option('contact')['bloc'], $bureaux); ?>
index 6a6aaff3643eb15222d31ccb8d3dce824859b4a5..acdb854261ff4f1771054d8db27a056bfac344d9 100644 (file)
@@ -13,14 +13,14 @@ echo $this->liste($this->expertises, true, array('id' => 'expertises'), 1);
 
 $casestudy_page_data = Bootstrap::getInstance()->getCMSDatasOfPage(4); // Fetch page details - needed for the SEO URL to build links
 
-$expertise = CubeIT_Util_Cms::unserialize($this->expertises);
+$related_casestudies = CubeIT_Util_Cms::unserialize($this->related_casestudies);
 
 echo '<div class="casestudies-list related content jgroup">';
 echo '<div class="title">';
 echo '<h1>'. __('Case Studies') .'</h1>';
-echo '<h2>'. $expertise['related_categories']['title'] .'</h2>';
+echo '<h2>'. $related_casestudies['title'] .'</h2>';
 echo '</div>'; // .title
 
 $limit_results = 3; // How many case studies to return
-echo $this->CasestudiesList($casestudy_page_data, null, $expertise['related_categories']['categories'], $limit_results);
+echo $this->CasestudiesList($casestudy_page_data, null, null, $limit_results, $related_casestudies['casestudies']);
 echo '</div>'; // .casestudies-list
index 182b193fcae2cd17e26f492df642c8aa923dbd9a..7a99f4aa1e83d45297cb6369dcbcca21988783f4 100644 (file)
@@ -4,6 +4,19 @@ function load_home() {
     $(window).on('cubeitresize', resize_home);\r
     $(document).on("beforechange afterchange", "#home-slideshow", resize_home);\r
     resize_home();\r
+\r
+    // Down arrow animation on slideshow\r
+    var e = $(".scrollarrow a");\r
+    var tl = new TimelineMax({repeat: -1, repeatDelay: 0.3});\r
+    tl.add(TweenMax.to(e, 1, {ease: Strong.easeOut, backgroundPosition: "50% 35px", opacity: 1}));\r
+    tl.add(TweenMax.to(e, 1, {ease: Strong.easeIn, backgroundPosition: "50% 70px", opacity: 0, delay: 0}));\r
+\r
+    $(document).localScroll({\r
+        axis: 'y',\r
+        duration: 500,\r
+        hash: false\r
+    });\r
+\r
 }\r
 \r
 function resize_home() {\r
index 76940366cd38c5930c49aca834b04be7afb221fe..f90fc31676251f668970968e4b358f4d002204de 100644 (file)
@@ -46,16 +46,5 @@ 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 9f1502486c7215cf54b50c15768acf2e88a1cf56..bb64e7af11846b87e8000fa14376f88e4578c996 100644 (file)
@@ -9,7 +9,7 @@
        padding: 3px 0 3px;
     position: absolute; // Needed to make it sit above header. Could also be 'fixed'...
     width: 100%;
-    z-index: 10;
+    z-index: 200;
 
        .bar {
                color: #fff;
index 1d1ae6c09025783efd137ec0f6c46f71049b7657..aab90bc09a04279afaaeb799a20ec7b1ffcd0161 100644 (file)
   &:hover {
     color: #000;
   }
+}
+
+.casestudies-list {
+  padding-top: 60px;
 }
\ No newline at end of file
index c54c5c080d0c42eefe2225d061ac482883d54fea..af0690a9055ac61c05f6795ef5f4191257088875 100644 (file)
@@ -41,6 +41,7 @@ body {
 
 h1, h2, h3, h4, h5, h6 {
        font-family: @Klavika;
+    transform: rotate(0.1deg); // Hack to fix poor rendering on Chrome + Windows (forces anti-aliasing)
 //    -webkit-font-smoothing: antialiased;
 }
 
@@ -59,6 +60,7 @@ strong, b {
 a {
     color: #222428;
     text-decoration: none;
+    transition: color 0.3s;
        &:hover,
        &:active {
                color: @yellow;
@@ -69,15 +71,17 @@ a {
                clear: both;
 
                border-radius: 2px;
-               padding: 15px 15px;
+        border: 2px solid @yellow;
+               padding: 13px;
                line-height: 12px;
                margin: 15px 0 0 0;
                font-weight: 400;
                font-size: 16px;
                text-decoration: none !important;
                text-transform: uppercase;
+        transition: all 0.3s;
 
-               .button(#fff, @yellow, #fff, @yellow);
+               .button(#fff, @yellow, @yellow, transparent);
        }
 }
 
index e204586572d89c05762b630cd783a51fe9850524..34439d605ef7cc0e81cbbcc8deb539bd557289df 100644 (file)
@@ -1,17 +1,5 @@
 @import "00-constants";
 
-/* Contact Title */
-.contact-title {
-       padding-top: 50px;
-       padding-bottom: 50px;
-
-       h1 {
-               text-align: left;
-               font-weight: 300;
-               font-size: 56px;
-       }
-}
-
 .half-full {
 
        float: left;
@@ -64,8 +52,7 @@
 
 /* Contact informations */
 .contact-informations {
-
-       padding-bottom: 50px;
+    margin: 30px 0 50px 0;
        overflow: hidden;
 
        .contact-texte {
index 7634780c0c8229ac203e28a528ef98ab86b518de..7499c21c8e60db8e71cc62a51cec2a57473e26e2 100644 (file)
@@ -6,6 +6,8 @@
         text-decoration: none;
                &.but {
                        .button(#fff, #212327);
+            border: 0;
+            padding: 15px;
                }
        }
 
index b426091b8d1b2a04f445650c887b116659af5af3..828790c7fc37143689ba60c9af8176a6341ceb96 100644 (file)
@@ -5,8 +5,10 @@
 header {
        height: 130px;
        background-color: #222428;
-       position: relative;
-       z-index: 4;
+       z-index: 100; // Some elements on case studies page have a higher z-index so make sure we are above that
+    position: fixed;
+    top: 0;
+    width: 100%;
 
        ul {
                text-transform: uppercase;
@@ -48,6 +50,9 @@ header {
        .logo {
                position: absolute;
                top: 36px;
+        transition: none;
+        white-space: nowrap; // Stops img elements wrapping under each other in IE.
+
                img {
                        width: auto;
                }
@@ -67,10 +72,6 @@ header {
                        }
                }
        }
-
-       position: fixed;
-       top: 0px;
-       width: 100%;
 }
 
 #headerPlaceholder {
@@ -172,8 +173,8 @@ header {
        }
 
        nav[role=navigation].active {
-               max-height: 16em;
-               padding: 135px 0 20px 0;
+               max-height: 26em;
+               padding: 65px 0 30px 0;
                box-sizing: content-box;
        }
 
@@ -183,6 +184,8 @@ header {
                float: none;
                text-align: center;
                position: relative;
+        font-size: 32px;
+        line-height: 1.7;
 
                li {
                        float: none;
@@ -194,7 +197,6 @@ header {
                }
 
                a {
-                       color: #fff !important;
                        display: block;
                        &:hover {
                                border-radius: 0;
index a65baffefaaa38070aa3ff636f6d31d3508101e9..b9559ac6aa57c029b43d297764b133b3387bece8 100644 (file)
@@ -44,6 +44,12 @@ section.list {
         &.two {
 //            margin-bottom: -50px; // Offset the 50px margins on the .sousbloc
 
+            // Special case for home page where link buttons are sitting under blocks and spacing is too big
+            + a.but {
+              margin-top: -30px;
+              float: left;
+            }
+
             .sousbloc {
                 white-space: normal;
                 width: 50%;