]> _ Git - fluidbook-v3.git/commitdiff
Done #481 @4
authorstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 23 Jun 2016 16:47:18 +0000 (16:47 +0000)
committerstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 23 Jun 2016 16:47:18 +0000 (16:47 +0000)
framework/application/forms/CMS/Element/PagesTagList.php
framework/application/forms/Settings.php
framework/application/layouts/scripts/layout.phtml
framework/application/views/helpers/FooterMenu.php [new file with mode: 0644]
framework/application/views/scripts/common/footer.phtml
less/003-mixins.less
less/101-header.less
less/102-footer.less

index c8f715b0be3bed6f52e04aa0293ddfbcb572d430..b199cc7232212d4de8ba49b4fd67cd66b74e93dc 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 
+// Note: for this to work fully, the layout.phtml needs to include the tagHandler files
+// eg. $this->headScript()->addTagHandler(true);
+
 class Fluidbook_Form_CMS_Element_PagesTagList extends CubeIT_Form_Element_TagList {
 
     public function init() {
@@ -8,7 +11,6 @@ class Fluidbook_Form_CMS_Element_PagesTagList extends CubeIT_Form_Element_TagLis
         $this->setAttrib('minChars', 1);
         $this->setAttrib('tagsPosition', "after");
         $this->setAttrib('searchAnywhere', 1); // Search anywhere in the word :)
-        //$this->setAttrib('manageurl', '/admin/ajaxpopup/openselectlist/Fluidbook_Form_CMS_Sub_Pages/' . $this->getName());
         $this->setAttrib('displayListManagement', 0);
         $this->_setOptions();
     }
@@ -55,8 +57,6 @@ class Fluidbook_Form_CMS_Element_PagesTagList extends CubeIT_Form_Element_TagLis
             $options[$id] = "[$id] - $title";
         }
 
-        fb($options, 'page options');
-
         $this->setMultiOptions($options);
     }
 
index 36fc21162f4d6a957956c8da6549ecc83a1cf8c2..57a6a78f5cceab697beb1c2b56e8965bc0c74e66 100644 (file)
@@ -25,9 +25,14 @@ class Fluidbook_Form_Settings extends CubeIT_Form_Settings {
 
                $footer_menu_main = new Fluidbook_Form_CMS_Element_PagesTagList('footer_menu_main');
                $footer_menu_main->setLabel('Pages for menu "Plan du site"');
-               $footer_menu_main->setAttrib('placeholder', 'Tapez une page');
+               $footer_menu_main->setAttrib('placeholder', 'Tapez un titre de la page');
                $this->addElement($footer_menu_main);
 
+               $footer_menu_contact = new Fluidbook_Form_CMS_Element_PagesTagList('footer_menu_contact');
+               $footer_menu_contact->setLabel('Pages for menu "Contactez-nous"');
+               $footer_menu_contact->setAttrib('placeholder', 'Tapez un titre de la page');
+               $this->addElement($footer_menu_contact);
+
                $footer = new CubeIT_Form_Element_Markitup('footer');
                $footer->setLabel('Footer');
                $footer->setAttrib('rows', 6);
index 99c8114d014f248856095e47a57ad85e81c1e613..83f8186060eeaf9951461c7dfe94a3a89fa9911a 100644 (file)
@@ -7,6 +7,8 @@ $this->headScript()->addIEConditionnals();
 $this->headScript()->appendFile('/js/002-common.js');
 $this->headLink()->appendStylesheet('/less/002-common.less', 'all');
 
+$this->headScript()->addTagHandler(true); // Used by related articles selector in admin
+
 /**
  * Exemples d'intégrations de webfonts
  *
diff --git a/framework/application/views/helpers/FooterMenu.php b/framework/application/views/helpers/FooterMenu.php
new file mode 100644 (file)
index 0000000..2de83df
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+
+class Fluidbook_View_Helper_FooterMenu extends CubeIT_View_Helper_Abstract {
+
+    public function footerMenu($pageIDs, $title = null) {
+
+        if (empty($pageIDs)) return false;
+
+        // PageIDs may be a comma separated string or an array of IDs already
+        if (!is_array($pageIDs)) {
+            $pageIDs = explode(',', $pageIDs);
+        }
+
+        $links = array();
+
+        // Build links
+        foreach ($pageIDs as $pageID) {
+            $links[] = $this->linkInternal(null, $pageID);
+        }
+
+        $res = '<div class="footer-menu">';
+
+        if ($title) {
+            $res .= '<strong class="menu-title">'. $title .'</strong>';
+        }
+
+        $res .= $this->htmlList($links);
+        
+        $res .= '</div>'; // .footer-menu
+
+        return $res;
+    }
+}
\ No newline at end of file
index 8c71cc89a5c90b07f25c408d29fe53309e69cb2f..93b1dac3bcfe16013501fa4c438b20a88af49945 100644 (file)
@@ -4,15 +4,27 @@ $this->headScript()->addScriptAndStyle('102-footer');
 \r
 $res = '<footer class="site">';\r
 \r
-$res .= $this->imageCms($this->option('logo'), 'Fluidbook', 258, 64);\r
+$logo = $this->imageCms($this->option('logo'), 'Fluidbook', 258, 64);\r
+$address = $this->option('address');\r
 \r
+// Get translation for country code\r
+$locale = new Zend_Locale();\r
+$country = $locale->getTranslation($address['pays'], 'Territory');\r
+\r
+$res .= '<div class="contact-details">';\r
+$res .= $this->link($logo, 'internal:home');\r
 $res .= '<address>';\r
-$res .= $this->option('address')['adresse'];\r
+$res .= "{$address['adresse']} - {$address['code_postal']} {$address['ville']} $country";\r
 $res .= '<br>';\r
-$res .= __('Tél.') . ' ' . $this->option('address')['phone'];\r
+$res .= __('Tél.') . ' ' . $address['phone'];\r
 $res .= '<br>';\r
-$res .= $this->option('address')['email'];\r
+$res .= $this->linkEmail($address['email']);\r
 $res .= '</address>';\r
+$res .= '</div>'; // .contact-details\r
+\r
+// Menus\r
+$res .= $this->footerMenu($this->option('footer_menu_main'), __('Plan du site'));\r
+$res .= $this->footerMenu($this->option('footer_menu_contact'), __('Contactez-nous'));\r
 \r
 $res .= '<div class="footer-social">';\r
 foreach ($this->option('social_networks') as $social) {\r
@@ -21,10 +33,19 @@ foreach ($this->option('social_networks') as $social) {
     $res .= '</a>';\r
 }\r
 $res .= '</div>'; // .footer-social\r
+\r
+$res .= '<div class="workshop">';\r
+$res .= $this->linkCMS($this->option('workshop'), array('class' => 'workshop-link'));\r
+$res .= '</div>'; // .workshop\r
+\r
 $res .= '</footer>';\r
 \r
 $res .= '<footer class="legal">';\r
 $res .= $this->markupDotclear($this->option('footer'));\r
+$res .= '<div class="locale-nav">';\r
+$res .= $this->localeNavigation(true, CubeIT_View_Helper_LocaleNavigation::BIGRAMME);\r
+$res .= '</div>'; // .locale-nav\r
+\r
 $res .= '</footer>'; // footer.legal\r
 \r
 echo $res;
\ No newline at end of file
index e15e61d65e74ef0f7ccc69a9775230943cdeb7e4..cc39248c4c8a45488a2c53d6fe6e2d626ceb311f 100644 (file)
        -moz-osx-font-smoothing: auto;
 }
 
+.rounded-button() {
+       display: inline-block;
+       padding: 13px 29px 14px;
+       line-height: 9px;
+       border-radius: 19px;
+       border: 1px solid transparent;
+}
+
 .border-button(@base-color,@border-color) {
        transition: all 200ms;
 
index f72c9a10b2b5b43dd48de3f054692e0b8cc36d27..5876552d2c8d23196fa87876c929465a81cf18cb 100644 (file)
@@ -68,11 +68,7 @@ header {
                        margin-left: 19px;\r
                }\r
                a {\r
-                       display: inline-block;\r
-                       padding: 13px 29px 14px;\r
-                       line-height: 9px;\r
-                       border-radius: 19px;\r
-                       border: 1px solid transparent;\r
+                       .rounded-button();\r
                        &.quoteLink {\r
                                .background-button(@color-green);\r
                                color: #fff;\r
index 90aecf2ded071d589ffd2cf94b8ff84208783ab3..544e7b35f33209f53220a8f4727875d4363c06e5 100644 (file)
@@ -13,6 +13,84 @@ footer.site {
   color: #fff;
   background-color: @color-footer-bg-primary;
   padding: 75px 85px 75px 42px;
+
+  // Flexbox setup
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  flex-wrap: wrap;
+
+  // Footer containers
+  &> div {
+    flex-grow: 1;
+    padding-right: 20px; // so elements don't get too close when layout shrinks
+    &:last-of-type {
+      padding-right: 0;
+    }
+  }
+
+  .contact-details {
+    flex-grow: 4; // Increase space bias for this block
+  }
+
+  address {
+    margin-top: 4px;
+    margin-left: 41px;
+    font-style: normal;
+    font-size: 14px;
+    line-height: 32/14;
+  }
+
+  .footer-social {
+    text-align: center;
+  }
+
+  .social-link {
+    margin-right: 20px;
+
+    &:last-of-type {
+      margin-right: 0;
+    }
+  }
+
+  .workshop {
+    text-align: right;
+  }
+  .workshop-link {
+    .rounded-button();
+    .border-button(#fff, #fff);
+    padding: 19px 83px 22px 46px;
+    border-radius: 26px;
+    text-transform: uppercase;
+    font-size: 12px;
+    position: relative;
+
+    &:after {
+      content: '';
+      width: 20px;
+      height: 13px;
+      position: absolute;
+      top: 17px;
+      right: 45px;
+      background-image: url('data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxOSAxMy45Ij48c3R5bGU+LnN0MHtmaWxsOiNGRkZGRkY7fTwvc3R5bGU+PHBhdGggY2xhc3M9InN0MCIgZD0iTTE4LjUgNy40Yy0uMSAwLS4zIDAtLjQtLjFMMTEuNy45Yy0uMi0uMi0uMi0uNSAwLS43LjItLjIuNS0uMi43IDBsNi40IDYuNGMuMi4yLjIuNSAwIC43IDAgLjEtLjIuMS0uMy4xeiIvPjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xOC41IDcuNEguNWMtLjMgMC0uNS0uMi0uNS0uNXMuMi0uNS41LS41aDE4Yy4zIDAgLjUuMi41LjVzLS4yLjUtLjUuNXoiLz48cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTIuMSAxMy45Yy0uMSAwLS4zIDAtLjQtLjEtLjItLjItLjItLjUgMC0uN2w2LjQtNi40Yy4yLS4yLjUtLjIuNyAwIC4yLjIuMi41IDAgLjdsLTYuNCA2LjRjLS4xIDAtLjIuMS0uMy4xeiIvPjwvc3ZnPg==');
+      background-size: 100%;
+    }
+  }
+}
+
+.footer-menu {
+  line-height: 32/14;
+  flex-grow: 2;
+
+  .menu-title {
+    text-transform: uppercase;
+    font-family: @montserrat;
+    font-weight: 600;
+  }
+
+  ul {
+    list-style: none;
+  }
 }
 
 // Copyright and legal bar
@@ -21,4 +99,34 @@ footer.legal {
   color: #5c6268;
   padding: 40px 85px;
   font-size: 14px;
+  position: relative;
+}
+
+.locale-nav {
+  position: absolute;
+  top: 21px;
+  right: 85px;
+
+  a {
+    display: inline-block;
+    width: 52px;
+    line-height: 52px;
+    margin-right: 20px;
+    text-align: center;
+    font-family: @montserrat;
+    font-size: 14px;
+    font-weight: 600;
+    text-transform: uppercase;
+    color: #fff;
+    border: 1px solid currentColor;
+    border-radius: 100%;
+
+    &.active {
+      color: #8aaa43;
+    }
+
+    &:last-of-type {
+      margin-right: 0;
+    }
+  }
 }
\ No newline at end of file