<?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() {
$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();
}
$options[$id] = "[$id] - $title";
}
- fb($options, 'page options');
-
$this->setMultiOptions($options);
}
$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);
$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
*
--- /dev/null
+<?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
\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
$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
-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;
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
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
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