$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
$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);
$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
\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
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;