]> _ Git - fluidbook-v3.git/commitdiff
wip #581 @0:45
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 31 Aug 2016 09:55:19 +0000 (09:55 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 31 Aug 2016 09:55:19 +0000 (09:55 +0000)
framework/application/forms/CMS/Sub/Home/Block.php
framework/application/views/helpers/ContactFooter.php
framework/application/views/helpers/HomeLayer.php
js/210-home.js
less/210-home.less

index eac06f5bf825a427442d0f61a523841e3e6f3173..6526c215c3560b2466cd7b1a827ebf4fbff3aa9b 100644 (file)
@@ -5,11 +5,15 @@ class Fluidbook_Form_CMS_Sub_Home_Block extends CubeIT_Form_SubForm {
                parent::init();
 
                $title = new CubeIT_Form_Element_Textarea('title');
-        $title->setAttrib('rows', 2);
+               $title->setAttrib('rows', 2);
                $title->setLabel('Titre');
                $title->setOrder(10);
                $this->addElement($title);
 
+               $puce = new CubeIT_Form_Element_Text('puce');
+               $puce->setLabel('Titre de la puce');
+               $this->addElement($puce);
+
                $text = new CubeIT_Form_Element_Markitup('content');
                $text->setLabel('Texte');
                $text->setAttrib('rows', 8);
index b657e27c81052ba4b6f414cadb34826f31e6e8c1..43315da3e11112a053c53fd14453c3c8d6b0769c 100644 (file)
@@ -28,6 +28,6 @@ class Fluidbook_View_Helper_ContactFooter extends CubeIT_View_Helper_Abstract {
                return $this->htmlElement($res, 'section', array(\r
                        'class' => 'contactFooter section',\r
                        'data-themecolor' => '#8aab41', // Todo: possibly set this via the admin?\r
-                       'data-section-name' => 'contact'));\r
+                       'data-section-name' => 'contact', 'data-puce' => __('Contact')));\r
        }\r
 }
\ No newline at end of file
index c72a972d7d5094724c80994361dadf46e242981f..723e2eeafd57a518488b67cd60d595ddc8e1d1e3 100644 (file)
@@ -5,14 +5,14 @@ class Fluidbook_View_Helper_HomeLayer extends CubeIT_View_Helper_Abstract {
 \r
        protected function _layer($content, $class, $attributes = array(), $outerContent = '') {\r
 \r
-           $section = $class;\r
+               $section = $class;\r
 \r
                $class .= ' section ' . $this->data['headerstyle'];\r
 \r
                $defaultAttributes = array('class' => $class,\r
-                                   'data-headerstyle' => $this->data['headerstyle'],\r
-                                   'data-themecolor' => $this->data['themecolor'],\r
-                                   'data-section-name' => $section);\r
+                                          'data-headerstyle' => $this->data['headerstyle'],\r
+                                          'data-themecolor' => $this->data['themecolor'],\r
+                                          'data-section-name' => $section, 'data-puce' => $this->data['puce']);\r
                $attributes = $this->_mergeAttributes($attributes, $defaultAttributes);\r
 \r
                $content = $this->htmlElement($content, 'div', array('class' => 'content-inner'));\r
index affb760a05f95d23204b71a8ec20142d31abe769..01d47c2c75be1cf94274efcea11a72d8549cd398 100644 (file)
@@ -30,10 +30,10 @@ function load_home() {
 \r
     // Disable scrollify when popups are open because it\r
     // interferes with internal popup scrolling\r
-    $(window).on('cubeitopenpopup', function() {\r
+    $(window).on('cubeitopenpopup', function () {\r
         disableScrollify();\r
     });\r
-    $(window).on('cubeitpopupremoved', function() {\r
+    $(window).on('cubeitpopupremoved', function () {\r
         resizeHome(); // Update layout and re-enable scrollify if space requirements are met\r
     });\r
 }\r
@@ -173,11 +173,16 @@ function initScrollify() {
             var pagination = '<ul class="pagination">';\r
             var css = '';\r
 \r
+\r
             $('[data-section-name]').each(function (i) {\r
-                css += '.pagination li[data-section="#' + $(this).attr('data-section-name') + '"]:hover,.pagination li[data-section="#' + $(this).attr('data-section-name') + '"].active{';\r
-                css += 'color:' + $(this).data('themecolor') + ';';\r
+                var color = $(this).data('themecolor');\r
+                css += '.pagination li[data-section="#' + $(this).attr('data-section-name') + '"].active:before{';\r
+                css += 'background-color:' + color + ';';\r
+                css += '}';\r
+                css += '.pagination li[data-section="#' + $(this).attr('data-section-name') + '"]:hover{';\r
+                css += 'background-color:' + color + ';';\r
                 css += '}';\r
-                pagination += '<li data-section="#' + $(this).attr('data-section-name') + '"><span class="hover-text">' + $(this).attr('data-section-name').charAt(0).toUpperCase() + $(this).attr('data-section-name').slice(1) + '</span></li>';\r
+                pagination += '<li data-section="#' + $(this).attr('data-section-name') + '"><span class="hover-text">' + $(this).data('puce') + '</span></li>';\r
             });\r
 \r
             pagination += "</ul>";\r
index 85f87e432afccb3554cff1e518ded898ee2e0744..1e9dfff77e0ba35949c940f308e51e53d2aa96ce 100644 (file)
@@ -5,37 +5,37 @@
                position: relative;\r
                background-position: bottom right;\r
 \r
-        @media @m900 {\r
-          background-size: 180%;\r
-        }\r
+               @media @m900 {\r
+                       background-size: 180%;\r
+               }\r
        }\r
 \r
        .content-inner {\r
-        position: absolute;\r
-        padding: 0 5%;\r
-        top: 50%;\r
-        left: 0;\r
-        width: 100%;\r
-        transform: translateY(-50%);\r
-\r
-        @media @m900 {\r
-          position: static;\r
-          transform: none;\r
-          padding-top: 5%;\r
-          padding-bottom: 80%;\r
-          text-align: center;\r
-        }\r
+               position: absolute;\r
+               padding: 0 5%;\r
+               top: 50%;\r
+               left: 0;\r
+               width: 100%;\r
+               transform: translateY(-50%);\r
+\r
+               @media @m900 {\r
+                       position: static;\r
+                       transform: none;\r
+                       padding-top: 5%;\r
+                       padding-bottom: 80%;\r
+                       text-align: center;\r
+               }\r
        }\r
 \r
        .btn {\r
                .button();\r
                .longarrow-button(20px, 40px, 18px);\r
-        color: #fff;\r
-        margin-top: 30px;\r
+               color: #fff;\r
+               margin-top: 30px;\r
        }\r
 \r
        section {\r
-        overflow: hidden;\r
+               overflow: hidden;\r
 \r
                &.light {\r
                        color: #fff;\r
                        }\r
                }\r
 \r
-        .dotclear {\r
-          max-width: 500px;\r
+               .dotclear {\r
+                       max-width: 500px;\r
 \r
-          @media @m900 {\r
-            max-width: none;\r
+                       @media @m900 {\r
+                               max-width: none;\r
 \r
-            ul {\r
-              display: inline-block;\r
-              text-align: left;\r
-            }\r
-          }\r
-        }\r
+                               ul {\r
+                                       display: inline-block;\r
+                                       text-align: left;\r
+                               }\r
+                       }\r
+               }\r
        }\r
 }\r
 \r
 .pagination {\r
-  color: rgba(128,128,128,0.5);\r
-  position: fixed;\r
-  top: 50%;\r
-  left: 15px;\r
-  transform: translateY(-50%);\r
-  font-size: 30px;\r
-  line-height: 1;\r
-  transition: opacity 0.3s;\r
-  cursor: pointer;\r
-  z-index: 10;\r
-  display: none; // Displayed only when in pagination mode\r
-\r
-  .fullpages & {\r
-    display: block;\r
-  }\r
-\r
-  //li:hover span {\r
-  //  display: inline-block;\r
-  //}\r
-\r
-  span {\r
-    display: none;\r
-  }\r
+       position: fixed;\r
+       top: 50%;\r
+       left: 15px;\r
+       transform: translateY(-50%);\r
+       font-size: 30px;\r
+       line-height: 1;\r
+       transition: opacity 0.3s;\r
+       cursor: pointer;\r
+       z-index: 10;\r
+       display: none; // Displayed only when in pagination mode\r
+       list-style: none;\r
+\r
+       .fullpages & {\r
+               display: block;\r
+       }\r
+\r
+       li {\r
+               //margin: 10px 0;\r
+               height: 22px;\r
+               position: relative;\r
+               padding: 0 10px 0 25px;\r
+               &:before {\r
+                       content: "";\r
+                       background-color: #e1e2e3;\r
+                       display: block;\r
+                       width: 10px;\r
+                       height: 10px;\r
+                       border-radius: 5px;\r
+                       position: absolute;\r
+                       left: 6px;\r
+                       top: 6px;\r
+               }\r
+               &:hover {\r
+                       &:before {\r
+                               background-color: #fff !important;\r
+                       }\r
+                       border-radius: 10px;\r
+                       span {\r
+                               position: relative;\r
+                               display: inline-block;\r
+                               color: #fff;\r
+                               top: -10px;\r
+                       }\r
+               }\r
+               span {\r
+                       font-size: 14px;\r
+                       line-height: 22px;\r
+               }\r
+       }\r
+\r
+       span {\r
+               display: none;\r
+       }\r
 }
\ No newline at end of file