]> _ Git - fluidbook-v3.git/commitdiff
#1809
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 20 Dec 2017 17:07:58 +0000 (17:07 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 20 Dec 2017 17:07:58 +0000 (17:07 +0000)
framework/application/forms/CMS/Sub/Features/Feature.php
framework/application/forms/CMS/Sub/Home/Services/Example.php
framework/application/views/helpers/FeaturesSection.php
framework/application/views/helpers/HomeServices.php
less/106-logos.less
less/410-features.less

index d0a59a0725f44d1b5ec62c998e346e546ff001fd..2ddc07858196258915e370b1a4650ca32642a1e0 100644 (file)
@@ -37,5 +37,8 @@ class Fluidbook_Form_CMS_Sub_Features_Feature extends CubeIT_Form_SubForm {
                ));
                $this->addElement($layout);
 
+               $link = new CubeIT_Form_Element_Link('link');
+               $link->setLabel('Lien');
+               $this->addSubForm($link, 'link');
        }
 }
\ No newline at end of file
index 8bf4a75c2a53a796a98df5dd30653dfdab8976c9..8dff3993ec83b6d9693a7a6d8c7f3a8c16829c7d 100644 (file)
@@ -16,5 +16,9 @@ class Fluidbook_Form_CMS_Sub_Home_Services_Example extends CubeIT_Form_SubForm {
                $image = new CubeIT_Form_Element_File_Image('image');
                $image->setLabel('Image');
                $this->addElement($image);
+
+               $link = new CubeIT_Form_Element_Link('link');
+               $link->setLabel('Link');
+               $this->addSubForm($link, 'link');
        }
 }
\ No newline at end of file
index e4e37cb8608df2da16f210bfd7d5446442c0d31e..12044f99cc13baa21c8a526a103e98866cf2f33e 100644 (file)
@@ -19,6 +19,10 @@ class Fluidbook_View_Helper_FeaturesSection extends CubeIT_View_Helper_Abstract
                        $text_colour = $this->hasGradient($block) ? 'light' : 'dark';
 
                        $res .= '<div class="feature-block text-' . $text_colour . ' ' . $block['layout'] . '" id="' . $id . '">';
+                       $link = $this->linkCMS($block['link'], ['class' => 'button']);
+                       if ($link) {
+                               $res .= $this->htmlElement($link, 'div', ['class' => 'more']);
+                       }
 
                        $res .= $this->_CSS($id, $block);
 
index b4b061349fcde69bbe98053a1339d2f6e184fe3a..00063f1734670c63ff2976d3e95028370ad352eb 100644 (file)
@@ -33,7 +33,7 @@ class Fluidbook_View_Helper_HomeServices extends Fluidbook_View_Helper_HomeLayer
                $res .= '<div class="services-examples">';\r
 \r
                foreach ($data['examples'] as $example) {\r
-            $img = $this->imageProcess($example['image'], $example['title'], 810, 506, [], 'C', 'C', 'M', false, 'auto', null, 82);\r
+                       $img = $this->imageProcess($example['image'], $example['title'], 810, 506, [], 'C', 'C', 'M', false, 'auto', null, 82);\r
                        $rollover = $this->_rollover($example);\r
                        $res .= $this->htmlElement($img . $rollover, 'div', ['data-title' => $example['title']]);\r
                }\r
@@ -48,22 +48,27 @@ class Fluidbook_View_Helper_HomeServices extends Fluidbook_View_Helper_HomeLayer
 \r
 \r
        public function _rollover($example) {\r
-\r
                $res = '';\r
-\r
+               $link = false;\r
 \r
                if ($example['exemple']) {\r
                        $model = Fluidbook_Model_Reference::findOneById($example['exemple']);\r
 \r
                        if ($model) {\r
-                $ex = $model->unserialize();\r
+                               $ex = $model->unserialize();\r
 \r
-                if ($ex->hasUrl()) {\r
-                    $res .= $this->linkTruePopupFullscreen(__('Voir le Fluidbook'), $ex->getFinalUrl(), ['class' => 'button']);\r
-                }\r
-            }\r
+                               if ($ex->hasUrl()) {\r
+                                       $link = true;\r
+                                       $res .= $this->linkTruePopupFullscreen(__('Voir le Fluidbook'), $ex->getFinalUrl(), ['class' => 'button']);\r
+                               }\r
+                       }\r
                }\r
 \r
+               if (!$link) {\r
+                       $res .= $this->linkCMS($example['link'], ['class' => 'button']);\r
+               }\r
+\r
+\r
                $res = $this->htmlElement($res, 'div', ['class' => 'inner']); // Wrapper for vertical centering\r
                return $this->htmlElement($res, 'div', ['class' => 'more']);\r
        }\r
index a554e48715ebcc0bfe61a691fc09970a297d4823..bbd6b755401d2d8787a5813967d7d88c433f8b9d 100644 (file)
@@ -37,6 +37,8 @@
 \r
                        img {\r
                                vertical-align: middle;\r
+                               max-width: 100%;\r
+                               max-height: 100%;\r
                        }\r
                }\r
        }\r
index 2653514ea4c609b958f809e720cebdf06ec3444d..ac213cc18bb00e866ad9a26a802f99ef1d3e00a2 100644 (file)
        background-size: 100%;
        color: @color-text;
 
+       .more {
+               //display: none;
+               opacity: 0;
+               position: absolute;
+               width: 100%;
+               height: 100%;
+               top: 0;
+               left: 0;
+               background-color: rgba(42, 50, 58, .9);
+               color: #fff;
+               z-index: 3;
+               text-align: center;
+               padding-top: 30%;
+               padding-left: 10px;
+               padding-right: 10px;
+               transition: opacity @transition-time-buttons;
+               @media @m640 {
+                       //padding-top: 55%;
+               }
+               a.others {
+                       display: block;
+                       color: #fff;
+                       text-transform: uppercase;
+                       font-family: @montserrat;
+                       font-size: 12px;
+                       font-weight: 300;
+                       margin-top: 35px;
+                       text-decoration: none;
+                       @media @m640 {
+                               display: none;
+                       }
+               }
+               p, h3 {
+                       transition: color @transition-time-buttons;
+               }
+
+               .button {
+                       background-color: transparent;
+                       color: #343c44;
+                       border: 0;
+                       text-transform: uppercase;
+                       font-family: @montserrat;
+                       font-weight: 300;
+                       font-size: 12px;
+                       line-height: 18px;
+                       cursor: pointer;
+                       float: none;
+                       display: inline-block;
+                       margin-top: 0;
+
+                       .border-button-fill(#fff, rgba(231, 92, 123, 1));
+                       .longarrow-button(16px, 40px, 18px);
+               }
+       }
+
+       &:hover {
+               .more {
+                       //display: block;
+                       opacity: 1;
+               }
+       }
+
        [data-cols="1"] & {
                width: 100% !important;
                padding-bottom: 0 !important;