From d7a368fb0d72827bd46a526b0eb0184305470680 Mon Sep 17 00:00:00 2001 From: "stephen@cubedesigners.com" Date: Mon, 2 May 2022 16:38:16 +0000 Subject: [PATCH] Done #4980 @0.75 --- framework/application/views/helpers/IntroBlock.php | 6 +++++- .../views/scripts/templates/fonctionnalites.phtml | 4 ++++ less/102-intro.less | 12 +++++++++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/framework/application/views/helpers/IntroBlock.php b/framework/application/views/helpers/IntroBlock.php index 440973e..f14b19a 100644 --- a/framework/application/views/helpers/IntroBlock.php +++ b/framework/application/views/helpers/IntroBlock.php @@ -7,11 +7,15 @@ class Fluidbook_View_Helper_IntroBlock extends CubeIT_View_Helper_Abstract { $this->addScriptAndStyle('102-intro'); + if (empty($intro)) { + return ''; + } $res = '
'; $res .= '
'; $res .= $this->title($intro['title']); $res .= $this->_content($intro['content']); + $res .= $this->linkCMS($intro['button'], ['class' => 'intro-button']); if ($additionnalContent) { $res .= $additionnalContent; } @@ -84,4 +88,4 @@ class Fluidbook_View_Helper_IntroBlock extends CubeIT_View_Helper_Abstract } return $res; } -} \ No newline at end of file +} diff --git a/framework/application/views/scripts/templates/fonctionnalites.phtml b/framework/application/views/scripts/templates/fonctionnalites.phtml index ab3fb3e..07bddaa 100644 --- a/framework/application/views/scripts/templates/fonctionnalites.phtml +++ b/framework/application/views/scripts/templates/fonctionnalites.phtml @@ -18,6 +18,10 @@ $extraContent .= ''; // .lightbox +// Since we've added a custom CTA button and the introBlock helper also outputs +// a button, we need to empty the variable to avoid duplicate buttons appearing. +$this->intro['button'] = []; + $res = $this->introBlock($this->intro, $extraContent, $playButtonLink); $res .= $this->featuresSection($this->features_title, $this->features); diff --git a/less/102-intro.less b/less/102-intro.less index 4eece1f..d485eea 100644 --- a/less/102-intro.less +++ b/less/102-intro.less @@ -74,4 +74,14 @@ } } } -} \ No newline at end of file +} + +.intro-button { + .border-button-fill(@color-text, @color-text, 5%); + .longarrow-button(12px, 40px, 18px); + margin-top: 2em; + + &:hover { + color: @color-text; + } +} -- 2.39.5