From 56409b2f395df843e114fc2d51c32d81dc3ab0c1 Mon Sep 17 00:00:00 2001 From: "stephen@cubedesigners.com" Date: Thu, 19 Nov 2020 18:26:06 +0000 Subject: [PATCH] WIP #4063 @7 --- framework/application/configs/application.ini | 14 +++++ framework/application/forms/CMS/Home.php | 1 + .../application/forms/CMS/Sub/Home/Intro.php | 7 ++- .../application/forms/CMS/Sub/Home/Mobile.php | 7 +++ framework/application/views/helpers/Home.php | 10 +++- .../application/views/helpers/HomeIntro.php | 6 +- .../application/views/helpers/HomeLayer.php | 6 +- .../application/views/helpers/HomeMobile.php | 17 ++++++ .../views/helpers/HomeServices.php | 15 ----- framework/application/views/helpers/Logos.php | 11 ++-- index.php | 2 + less/106-logos.less | 60 +++++++++---------- less/211-home-intro.less | 13 +++- less/214-home-services.less | 52 ++-------------- less/216-home-mobile.less | 20 +++++++ 15 files changed, 130 insertions(+), 111 deletions(-) create mode 100644 framework/application/forms/CMS/Sub/Home/Mobile.php create mode 100644 framework/application/views/helpers/HomeMobile.php create mode 100644 less/216-home-mobile.less diff --git a/framework/application/configs/application.ini b/framework/application/configs/application.ini index 130d08c..150b72d 100644 --- a/framework/application/configs/application.ini +++ b/framework/application/configs/application.ini @@ -101,3 +101,17 @@ locales.fr = dev.fluidbook.com locales.en = en.dev.fluidbook.com database.params.dbname = fluidbookwebv3_dev + +[local : production] + +dev = true +firephp = false + +webhost = fluidbook.test +locales.fr = fluidbook.test +locales.en = en.fluidbook.test + +database.params.username = root +database.params.password = +database.params.dbname = fluidbook-website + diff --git a/framework/application/forms/CMS/Home.php b/framework/application/forms/CMS/Home.php index 5d9b656..a264328 100644 --- a/framework/application/forms/CMS/Home.php +++ b/framework/application/forms/CMS/Home.php @@ -7,6 +7,7 @@ class Fluidbook_Form_CMS_Home extends Fluidbook_Form_CMS { $blocs = array( 'intro' => array('class' => 'Fluidbook_Form_CMS_Sub_Home_Intro', 'label' => 'Intro'), 'features' => array('class' => 'Fluidbook_Form_CMS_Sub_Home_Features', 'label' => 'Fonctionnalités'), + 'mobile' => array('class' => 'Fluidbook_Form_CMS_Sub_Home_Mobile', 'label' => 'Mobile First'), 'customers' => array('class' => 'Fluidbook_Form_CMS_Sub_Home_Customers', 'label' => 'Clients'), 'services' => array('class' => 'Fluidbook_Form_CMS_Sub_Home_Services', 'label' => 'Services'), 'references' => array('class' => 'Fluidbook_Form_CMS_Sub_Home_References', 'label' => 'Référeces'), diff --git a/framework/application/forms/CMS/Sub/Home/Intro.php b/framework/application/forms/CMS/Sub/Home/Intro.php index cca9784..2b88064 100644 --- a/framework/application/forms/CMS/Sub/Home/Intro.php +++ b/framework/application/forms/CMS/Sub/Home/Intro.php @@ -8,5 +8,10 @@ class Fluidbook_Form_CMS_Sub_Home_Intro extends Fluidbook_Form_CMS_Sub_Home_Bloc $video->setLabel('Vidéo'); $video->setOrder(25); $this->addElement($video); + + $logos = new CubeIT_Form_Element_File_Image('client_logos'); + $logos->setLabel('Client Logos'); + $logos->setOrder(70); + $this->addElement($logos); } -} \ No newline at end of file +} diff --git a/framework/application/forms/CMS/Sub/Home/Mobile.php b/framework/application/forms/CMS/Sub/Home/Mobile.php new file mode 100644 index 0000000..1346725 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Home/Mobile.php @@ -0,0 +1,7 @@ +{$bloc}['title'])) continue; // Skip sections with no title set + $viewHelper = 'home' . ucfirst($bloc); $res .= $this->$viewHelper($this->{$bloc}); } @@ -25,4 +29,4 @@ class Fluidbook_View_Helper_Home extends CubeIT_View_Helper_Abstract { return $res; } -} \ No newline at end of file +} diff --git a/framework/application/views/helpers/HomeIntro.php b/framework/application/views/helpers/HomeIntro.php index e086376..3d44517 100644 --- a/framework/application/views/helpers/HomeIntro.php +++ b/framework/application/views/helpers/HomeIntro.php @@ -10,11 +10,11 @@ class Fluidbook_View_Helper_HomeIntro extends Fluidbook_View_Helper_HomeLayer { $this->data = $data; - $res = $this->_leftText('h1'); - + $res = $this->_leftText('h1'); $arrow = $this->link(null, '#', ['class' => 'scroll-arrow']); + $logos = $this->logos($data['client_logos'], 'div'); - return $this->_layer($res, 'intro', [], $arrow); + return $this->_layer($res, 'intro', [], $arrow, $logos); } diff --git a/framework/application/views/helpers/HomeLayer.php b/framework/application/views/helpers/HomeLayer.php index 1fb2727..8950013 100644 --- a/framework/application/views/helpers/HomeLayer.php +++ b/framework/application/views/helpers/HomeLayer.php @@ -4,7 +4,7 @@ class Fluidbook_View_Helper_HomeLayer extends CubeIT_View_Helper_Abstract { public $data; - protected function _layer($content, $class, $attributes = array(), $outerContent = '') + protected function _layer($content, $class, $attributes = array(), $extraContent = '', $outerContent = '') { $section = $class; @@ -19,10 +19,10 @@ class Fluidbook_View_Helper_HomeLayer extends CubeIT_View_Helper_Abstract $attributes = $this->_mergeAttributes($attributes, $defaultAttributes); $content = $this->htmlElement($content, 'div', array('class' => 'content-inner')); - $content .= $outerContent; + $content .= $extraContent; $content = $this->backgroundBlock($content, $this->data, ['class' => ['content-wrapper', 'no-shrink', 'fullheight']]); - return $this->htmlElement($content, 'section', $attributes); + return $this->htmlElement($content . $outerContent, 'section', $attributes); } protected function _leftText($title_element = 'h2') diff --git a/framework/application/views/helpers/HomeMobile.php b/framework/application/views/helpers/HomeMobile.php new file mode 100644 index 0000000..df66689 --- /dev/null +++ b/framework/application/views/helpers/HomeMobile.php @@ -0,0 +1,17 @@ +headScript()->addScriptAndStyle('212-home-mobile'); + + $this->data = $data; + + $res = $this->_leftText(); + + return $this->_layer($res, 'mobile'); + } +} diff --git a/framework/application/views/helpers/HomeServices.php b/framework/application/views/helpers/HomeServices.php index f109a9a..e08bfc0 100644 --- a/framework/application/views/helpers/HomeServices.php +++ b/framework/application/views/helpers/HomeServices.php @@ -15,21 +15,6 @@ class Fluidbook_View_Helper_HomeServices extends Fluidbook_View_Helper_HomeLayer $res .= ''; // .text $res .= '