]> _ Git - fluidbook-v3.git/commitdiff
WIP #4063 @7
authorstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 19 Nov 2020 18:26:06 +0000 (18:26 +0000)
committerstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 19 Nov 2020 18:26:06 +0000 (18:26 +0000)
15 files changed:
framework/application/configs/application.ini
framework/application/forms/CMS/Home.php
framework/application/forms/CMS/Sub/Home/Intro.php
framework/application/forms/CMS/Sub/Home/Mobile.php [new file with mode: 0644]
framework/application/views/helpers/Home.php
framework/application/views/helpers/HomeIntro.php
framework/application/views/helpers/HomeLayer.php
framework/application/views/helpers/HomeMobile.php [new file with mode: 0644]
framework/application/views/helpers/HomeServices.php
framework/application/views/helpers/Logos.php
index.php
less/106-logos.less
less/211-home-intro.less
less/214-home-services.less
less/216-home-mobile.less [new file with mode: 0644]

index 130d08ce863a12b450708f3e802a807084b70599..150b72d4c55fa7a53db81a90d1eb5184807baf52 100644 (file)
@@ -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
+
index 5d9b6568b9c46a5b41f3e63cd2385d26bd5b32e0..a264328fe601e40c17aae4a30d917a1f157e098e 100644 (file)
@@ -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'),
index cca9784d991783b33792195f5f49003cdd20a330..2b880645d2e81c83aabf89a27d6429966ca9debf 100644 (file)
@@ -8,5 +8,10 @@ class Fluidbook_Form_CMS_Sub_Home_Intro extends Fluidbook_Form_CMS_Sub_Home_Bloc
                $video->setLabel('Vidéo');\r
                $video->setOrder(25);\r
                $this->addElement($video);\r
+\r
+        $logos = new CubeIT_Form_Element_File_Image('client_logos');\r
+        $logos->setLabel('Client Logos');\r
+        $logos->setOrder(70);\r
+        $this->addElement($logos);\r
        }\r
-}
\ No newline at end of file
+}\r
diff --git a/framework/application/forms/CMS/Sub/Home/Mobile.php b/framework/application/forms/CMS/Sub/Home/Mobile.php
new file mode 100644 (file)
index 0000000..1346725
--- /dev/null
@@ -0,0 +1,7 @@
+<?php\r
+\r
+class Fluidbook_Form_CMS_Sub_Home_Mobile extends Fluidbook_Form_CMS_Sub_Home_Block {\r
+       public function init() {\r
+               parent::init();\r
+       }\r
+}\r
index cfe3b3de496ed8dc2103b8a375334d8557c66845..7272b3a4e8cce3b48810f2ef352779f57939313f 100644 (file)
@@ -9,12 +9,16 @@ class Fluidbook_View_Helper_Home extends CubeIT_View_Helper_Abstract {
                $blocs = array(\r
                        'intro',\r
                        'features',\r
-                       'customers',\r
+                       'mobile',\r
                        'services',\r
-                       'references'\r
+                       'references',\r
+                       'customers',\r
                );\r
 \r
                foreach ($blocs as $bloc) {\r
+\r
+                   if (empty($this->{$bloc}['title'])) continue; // Skip sections with no title set\r
+\r
                        $viewHelper = 'home' . ucfirst($bloc);\r
                        $res .= $this->$viewHelper($this->{$bloc});\r
                }\r
@@ -25,4 +29,4 @@ class Fluidbook_View_Helper_Home extends CubeIT_View_Helper_Abstract {
 \r
                return $res;\r
        }\r
-}
\ No newline at end of file
+}\r
index e0863760ea329119834e172b347dd0f461ab3251..3d4451760a9c7ffe8120ee5f9432cd893939c3e7 100644 (file)
@@ -10,11 +10,11 @@ class Fluidbook_View_Helper_HomeIntro extends Fluidbook_View_Helper_HomeLayer {
 \r
         $this->data = $data;\r
 \r
-        $res  = $this->_leftText('h1');\r
-\r
+        $res = $this->_leftText('h1');\r
         $arrow = $this->link(null, '#', ['class' => 'scroll-arrow']);\r
+        $logos = $this->logos($data['client_logos'], 'div');\r
 \r
-               return $this->_layer($res, 'intro', [], $arrow);\r
+               return $this->_layer($res, 'intro', [], $arrow, $logos);\r
        }\r
 \r
 \r
index 1fb2727d05bab4f90e1f1fa7aaf09974f96cac68..895001349a9513b8105348a5cff07b5588f35654 100644 (file)
@@ -4,7 +4,7 @@ class Fluidbook_View_Helper_HomeLayer extends CubeIT_View_Helper_Abstract
 {\r
     public $data;\r
 \r
-    protected function _layer($content, $class, $attributes = array(), $outerContent = '')\r
+    protected function _layer($content, $class, $attributes = array(), $extraContent = '', $outerContent = '')\r
     {\r
 \r
         $section = $class;\r
@@ -19,10 +19,10 @@ class Fluidbook_View_Helper_HomeLayer extends CubeIT_View_Helper_Abstract
         $attributes = $this->_mergeAttributes($attributes, $defaultAttributes);\r
 \r
         $content = $this->htmlElement($content, 'div', array('class' => 'content-inner'));\r
-        $content .= $outerContent;\r
+        $content .= $extraContent;\r
         $content = $this->backgroundBlock($content, $this->data, ['class' => ['content-wrapper', 'no-shrink', 'fullheight']]);\r
 \r
-        return $this->htmlElement($content, 'section', $attributes);\r
+        return $this->htmlElement($content . $outerContent, 'section', $attributes);\r
     }\r
 \r
     protected function _leftText($title_element = 'h2')\r
diff --git a/framework/application/views/helpers/HomeMobile.php b/framework/application/views/helpers/HomeMobile.php
new file mode 100644 (file)
index 0000000..df66689
--- /dev/null
@@ -0,0 +1,17 @@
+<?php\r
+\r
+class Fluidbook_View_Helper_HomeMobile extends Fluidbook_View_Helper_HomeLayer {\r
+       /**\r
+        * @return string\r
+        */\r
+       public function homeMobile($data) {\r
+\r
+        $this->headScript()->addScriptAndStyle('212-home-mobile');\r
+\r
+               $this->data = $data;\r
+\r
+               $res = $this->_leftText();\r
+\r
+               return $this->_layer($res, 'mobile');\r
+       }\r
+}\r
index f109a9a315d69078abd884d4f51623c4ecc63ab3..e08bfc07fcb7872b6a44b9bfdd2c693af4b3e505 100644 (file)
@@ -15,21 +15,6 @@ class Fluidbook_View_Helper_HomeServices extends Fluidbook_View_Helper_HomeLayer
                $res .= '</div>'; // .text\r
 \r
                $res .= '<div class="carousel">';\r
-               $res .= '<div class="window-top-wrapper">';\r
-               //        $res .= '<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\r
-               //                   viewBox="0 0 755 24" xml:space="preserve">\r
-               //                <style type="text/css">\r
-               //                    .st0{fill-rule:evenodd;clip-rule:evenodd;fill:#475462;}\r
-               //                    .st1{fill-rule:evenodd;clip-rule:evenodd;fill:#151E26;}\r
-               //                </style>\r
-               //                <path class="st0" d="M0,24V5c0-2.8,2.2-5,5-5h745c2.8,0,5,2.2,5,5v19"/>\r
-               //                <circle class="st1" cx="16" cy="12" r="3"/>\r
-               //                <circle class="st1" cx="26" cy="12" r="3"/>\r
-               //                <circle class="st1" cx="36" cy="12" r="3"/>\r
-               //                </svg>';\r
-               //        $res .= '<span></span><span></span><span></span>'; // Dot elements\r
-               $res .= '</div>'; // .window-top-wrapper\r
-               $res .= '<img src="/images/home/window-top.png" class="window-top" alt="Window header">';\r
                $res .= '<div class="services-examples">';\r
 \r
                foreach ($data['examples'] as $example) {\r
index 1e15bcff649b03b60c29e89ad3f29967b2a1d253..3c4b16ac93104eef2d1b55adf5f42d13e96c6944 100644 (file)
@@ -4,7 +4,7 @@ class Fluidbook_View_Helper_Logos extends CubeIT_View_Helper_Abstract {
        /**\r
         * @return string\r
         */\r
-       public function logos($logos) {\r
+       public function logos($logos, $wrapper_element = 'section') {\r
                $images = CubeIT_Util_Cms::extractFiles($logos);\r
                if (!count($images)) {\r
                        return;\r
@@ -14,10 +14,11 @@ class Fluidbook_View_Helper_Logos extends CubeIT_View_Helper_Abstract {
 \r
                $res = '';\r
                foreach ($images as $image) {\r
-                       $res .= $this->htmlElement($this->imageCms($image), 'div', ['class' => 'i']) . ' '; // Space needed for the justify\r
+                   $img = $this->imageCms($image, '', null, null, ['class' => 'logos-image']);\r
+                       $res .= $this->htmlElement($img, 'div', ['class' => 'logos-item']);\r
                }\r
 \r
-               $res = $this->htmlElement($res, 'div', ['class' => 'c']);\r
-               return $this->htmlElement($res, 'section', ['class' => 'logos content-wrapper grid wrap']);\r
+               $res = $this->htmlElement($res, 'div', ['class' => 'logos-grid']);\r
+               return $this->htmlElement($res, $wrapper_element, ['class' => 'logos-wrapper grid']);\r
        }\r
-}
\ No newline at end of file
+}\r
index e495985b4d3e690d1ceb0a291ff4c92bcb0592aa..15775198666086e62f83c438db1b2c8a5101871d 100644 (file)
--- a/index.php
+++ b/index.php
@@ -8,6 +8,8 @@ if (strpos($_SERVER['HTTP_HOST'], 'elearning.') !== false) {
     define('APPLICATION_ENV', 'learning');
 } elseif (strpos($_SERVER['HTTP_HOST'], 'dev.') !== false) {
     define('APPLICATION_ENV', 'testing');
+} elseif (strpos($_SERVER['HTTP_HOST'], '.test') !== false) {
+    define('APPLICATION_ENV', 'local');
 } else {
     define('APPLICATION_ENV', 'production');
 }
index 3ed36009c30f957f7656c0242739e5a96f18995e..25889b9e43c0157c9286c5d5743180b3f79404f7 100644 (file)
@@ -1,45 +1,45 @@
 @import "000-imports";\r
 \r
 .logos {\r
-       &.content-wrapper {\r
+       &-wrapper {\r
+               background-color: @color-light-grey;\r
                padding-top: 3%;\r
                padding-bottom: 3%;\r
        }\r
 \r
-       background-color: @color-light-grey;\r
-\r
-       .c {\r
-               display: inline-block;\r
+       &-grid {\r
+               display: flex;\r
+               align-items: center;\r
+               justify-content: center;\r
                width: 100%;\r
-               text-align: justify;\r
-               padding-left: 70px;\r
-               padding-right: 70px;\r
-               margin: 0 auto;\r
-               line-height: 0;\r
-\r
-               @media @m900 {\r
-                       padding-left: 0;\r
-                       padding-right: 0;\r
-               }\r
+               margin: -1em 0; // Offset vertical padding on .logos-item so we only have spacing between multiple rows\r
+               padding: 0 70px;\r
 \r
-               &:after {\r
-                       content: "";\r
-                       display: inline-block;\r
-                       width: 100%;\r
-                       height: 0;\r
+               @media (max-width: 1299px) {\r
+                       padding: 0;\r
                }\r
 \r
-               .i {\r
-                       width: 120px;\r
-                       height: 45px;\r
-                       display: inline-block;\r
-                       text-align: center;\r
+               @media @m640 {\r
+                       flex-wrap: wrap;\r
 \r
-                       img {\r
-                               vertical-align: middle;\r
-                               max-width: 100%;\r
-                               max-height: 100%;\r
+                       .logos-item {\r
+                               flex-basis: 33%; // Switch to 3 cols instead of 5\r
                        }\r
                }\r
        }\r
-}
\ No newline at end of file
+\r
+       &-item {\r
+               flex: 1 1 auto; // Equal width columns covering available total width\r
+               display: flex; // Enable flex here to allow easier centering of images\r
+               justify-content: center;\r
+               align-items: center;\r
+               padding: 1em; // Controls minimum space between items\r
+       }\r
+\r
+       &-image {\r
+               width: 100%;\r
+               height: 100%;\r
+               max-width: 120px;\r
+               max-height: 45px;\r
+       }\r
+}\r
index 04bdb6a6e1b1d8cdba5a9625ab3bf8e1ff363610..39c6277c34eaee1ee201b3a7e34c90a96f778aed 100644 (file)
@@ -1,6 +1,13 @@
 @import "000-imports";
 
 section.intro {
+  display: flex;
+  flex-direction: column;
+
+  .content-wrapper {
+    min-height: unset !important;
+    flex: 1; // Take up all remaining height that logos don't use
+  }
 
   a.scroll-arrow {
     display: none;
@@ -8,12 +15,12 @@ section.intro {
     bottom: 10px;
     left: 50%;
     transform: translateX(-50%);
-    color:transparent !important;
+    color: currentColor !important;
 
     &:after {
       .icon('f');
       font-size: 40px;
-      color: #fff;
+      color: currentColor;
       transform: rotate(90deg);
       display: inline-block;
       .font-thinning-off();
@@ -29,4 +36,4 @@ section.intro {
         padding-top: 70px;
       }
   }
-}
\ No newline at end of file
+}
index 485400cb368034056b6083a7d8b2c0d89e973302..3eea7786df34e2551558e28f909620ae11684d98 100644 (file)
@@ -27,52 +27,6 @@ section.services {
   }
 }
 
-// Responsive inline SVG (see: https://thatemil.com/blog/2014/04/06/intrinsic-sizing-of-svg-in-responsive-web-design/)
-//.window-top-wrapper {
-//  padding-top: percentage(24/755); // Intrinsic ratio so SVG scales properly at all sizes
-//  position: relative;
-//  max-width: 755px;
-//  margin: 0 auto;
-//
-//  // CSS version of the header
-//  background-color: #475462;
-//  border-top-right-radius: 5px;
-//  border-top-left-radius: 5px;
-//
-//  span {
-//    position: absolute;
-//    top: percentage(9/24);
-//    width: percentage(6/755);
-//    padding-bottom: percentage(6/755);
-//    border-radius: 50%;
-//    background-color: #151E26;
-//
-//    &:nth-child(1) {
-//      left: percentage(13/755);
-//    }
-//    &:nth-child(2) {
-//      left: percentage(23/755);
-//    }
-//    &:nth-child(3) {
-//      left: percentage(33/755);
-//    }
-//  }
-//
-//  svg {
-//    position: absolute;
-//    top: 0;
-//    left: 0;
-//    width: 100%;
-//    height: 100%;
-//  }
-//}
-
-.window-top {
-  display: block;
-  max-width: 100%;
-  height: auto;
-}
-
 .services-examples {
   position: relative;
   width: 100%;
@@ -108,7 +62,7 @@ section.services {
     height: 100%;
     top: -1px; // Cover rounding errors - better than having a gap
     left: 0;
-    background-color: rgba(52, 60, 68, .8);
+    background-color: rgba(14, 24, 34, 0.8);
     color: #fff;
     z-index: 3;
     //transition: opacity @transition-time-buttons; // Disabled because it causes ugly page rendering shifts during animation
@@ -147,6 +101,8 @@ section.services {
   list-style-type: none;
   text-align: center;
   padding-top: 30px;
+  max-width: 700px;
+  margin: 0 auto;
 
   li {
     display: inline-block;
@@ -174,4 +130,4 @@ section.services {
     }
 
   }
-}
\ No newline at end of file
+}
diff --git a/less/216-home-mobile.less b/less/216-home-mobile.less
new file mode 100644 (file)
index 0000000..7de05c1
--- /dev/null
@@ -0,0 +1,20 @@
+@import "000-imports";
+
+.mobile {
+
+       .title {
+               max-width: 50%;
+
+               @media @m900 {
+                       max-width: none;
+
+               }
+       }
+
+       .content-inner {
+               @media @m900 {
+                       padding-bottom: 85%;
+               }
+       }
+
+}