]> _ Git - fluidbook-v3.git/commitdiff
done #1074 @0:20
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 9 Jan 2017 15:24:30 +0000 (15:24 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 9 Jan 2017 15:24:30 +0000 (15:24 +0000)
framework/application/views/helpers/IntroBlock.php
framework/application/views/helpers/QuoteForm.php
framework/application/views/scripts/templates/contact.phtml
less/003-mixins.less
less/102-intro.less
less/315-quote.less

index 519aa9911e0f8d712b49d6907484e37569208bcf..26a34f1c26a84aff4f60b87e551f020ec82baa71 100644 (file)
@@ -2,7 +2,7 @@
 
 class Fluidbook_View_Helper_IntroBlock extends CubeIT_View_Helper_Abstract {
 
-       public function introBlock($intro, $additionnalContent = '', $outsideContent = '') {
+       public function introBlock($intro, $additionnalContent = '', $outsideContent = '', $paddingTop = true) {
                $this->addScriptAndStyle('102-intro');
 
                $res = '<div class="grid">';
@@ -17,9 +17,9 @@ class Fluidbook_View_Helper_IntroBlock extends CubeIT_View_Helper_Abstract {
                $res .= '</div>'; // .col-2
                $res .= '</div>'; // .grid
 
-        if ($outsideContent) {
-            $res .= $outsideContent;
-        }
+               if ($outsideContent) {
+                       $res .= $outsideContent;
+               }
 
                $res = $this->backgroundBlock($res, $intro);
 
@@ -27,6 +27,11 @@ class Fluidbook_View_Helper_IntroBlock extends CubeIT_View_Helper_Abstract {
                        $res .= $this->htmlElement($this->htmlElement(nl2br($intro['chapo']), 'div'), 'blockquote');
                }
 
-               return $this->htmlElement($res, 'section', array('class' => 'intro'));
+               $attrs = array('class' => array('intro'));
+               if (!$paddingTop) {
+                       $attrs['class'][] = 'nopad';
+               }
+
+               return $this->htmlElement($res, 'section', $attrs);
        }
 }
\ No newline at end of file
index 1d67d89b4f670d90d60ce033d81c6daa916c62b4..09e70ef432f22c3786b15a2733aab7cd8e47a088 100644 (file)
@@ -2,10 +2,10 @@
 
 class Fluidbook_View_Helper_QuoteForm extends CubeIT_View_Helper_Abstract {
 
-       public function quoteForm($formID = null) {
+       public function quoteForm($formID = null, $paddingTop = false) {
 
-        $this->headScript()->addScriptAndStyle('005-fancyselect');
-        $this->headScript()->addScriptAndStyle('315-quote');
+               $this->headScript()->addScriptAndStyle('005-fancyselect');
+               $this->headScript()->addScriptAndStyle('315-quote');
 
                $form = new Fluidbook_Form_RequestQuote();
 
@@ -13,11 +13,11 @@ class Fluidbook_View_Helper_QuoteForm extends CubeIT_View_Helper_Abstract {
                        $form->setId($formID);
                        $form->setAction($form->getAction() . '/' . $formID);
                } else {
-            $formID = $form->getId();
-        }
+                       $formID = $form->getId();
+               }
 
-               $res = '<div class="request-quote content-wrapper grid" id="'. $formID .'Wrapper">';
-               $res .= '<div class="text col-2">';
+
+               $res = '<div class="text col-2">';
                $res .= $this->title($this->option('quote_heading'));
                $res .= $this->markupDotclear($this->option('quote_description'));
                $res .= '</div>'; // .text
@@ -25,7 +25,14 @@ class Fluidbook_View_Helper_QuoteForm extends CubeIT_View_Helper_Abstract {
                $res .= $form;
                $res .= '<div class="validation-messages"></div>';
                $res .= '</div>'; // .form
-               $res .= '</div>'; // .request-quote
+
+               $attrs = array('class' => array('request-quote', 'content-wrapper', 'grid'),
+                              'id' => $formID . 'Wrapper');
+               if ($paddingTop) {
+                       $attrs['class'][] = 'pad';
+               }
+
+               return $this->htmlElement($res, 'div', $attrs);
 
                return $res;
        }
index 297dc50fdff48a2db27165eb00912361cd4e8687..b5524460772a1b9463158c7fc8e5a5669467f79c 100644 (file)
@@ -6,7 +6,7 @@ $address = $this->option('address');
 $locale = new Zend_Locale();\r
 $country = strtoupper($locale->getTranslation($address['pays'], 'Territory'));\r
 $content = '<address>';\r
-$content .= '<h4>'. $address['company'] .'</h4>';\r
+$content .= '<h4>' . $address['company'] . '</h4>';\r
 $content .= $address['adresse'];\r
 $content .= '<br>';\r
 $content .= "{$address['code_postal']} {$address['ville']} - $country";\r
@@ -16,23 +16,25 @@ $content .= '<br>';
 $content .= __('email :') . ' ' . $this->linkEmail($address['email']);\r
 $content .= '</address>';\r
 \r
-$res  = '<div class="contact-intro">';\r
-$res .= $this->introBlock($this->intro, $content);\r
-$res .= '</div>'; // .contact-intro\r
-\r
+$res = '';\r
 \r
 // Request Quote form\r
-$res .= $this->quoteForm();\r
+$res .= $this->quoteForm(null, true);\r
+\r
+$res .= '<div class="contact-intro">';\r
+$res .= $this->introBlock($this->intro, $content, '', false);\r
+$res .= '</div>'; // .contact-intro\r
+\r
 \r
 // Resellers\r
 $res .= '<div class="resellers content-wrapper grid">';\r
-$res .= '<h1 class="title col-6">'. nl2br($this->resellers_title) .'</h1>';\r
+$res .= '<h1 class="title col-6">' . nl2br($this->resellers_title) . '</h1>';\r
 foreach ($this->resellers as $reseller) {\r
-    $res .= '<div class="reseller col-1">';\r
-    $res .= '<h4>'. $locale->getTranslation($reseller['country'], 'Territory') .'</h4>';\r
-    $res .= $reseller['company'];\r
-    $res .= $this->markupDotclear($reseller['details']);\r
-    $res .= '</div>'; // .reseller\r
+       $res .= '<div class="reseller col-1">';\r
+       $res .= '<h4>' . $locale->getTranslation($reseller['country'], 'Territory') . '</h4>';\r
+       $res .= $reseller['company'];\r
+       $res .= $this->markupDotclear($reseller['details']);\r
+       $res .= '</div>'; // .reseller\r
 }\r
 $res .= '</div>'; // .resellers\r
 \r
index e6de962b77907efc953bcee42a7e510e1075abf6..f21c7a941d088750fc66af1f3458833ef2f3b2b9 100644 (file)
 
 .longarrow-button(@padding-vertical: 18px, @padding-horizontal: 40px, @offset: 20px, @offset-arrow: -5px) {
 
-
        padding: @padding-vertical @padding-horizontal;
        position: relative;
        transition: padding @transition-time-buttons;
                font-size: 1.2em;
                margin-top: -0.05em;
        }
+}
+
+.intro-padding() {
+       padding-top: 200px;
+       @media @m1280 {
+               padding-top: 120px;
+       }
+       @media @m900 {
+               padding-top: 100px;
+       }
+       @media @m768 {
+               padding-top: 80px;
+       }
+}
+
+.intro-no-padding() {
+       padding-top: 0;
+       @media @m1280 {
+               padding-top: 0;
+       }
+       @media @m900 {
+               padding-top: 0;
+       }
+       @media @m768 {
+               padding-top: 0;
+       }
 }
\ No newline at end of file
index 716849631352f92528cc031cf4cb247621bcd170..32ab113c2219a23ecc56b38cc9d3bbeb2dfbd08d 100644 (file)
@@ -3,20 +3,20 @@
 .intro {\r
        color: #151e28;\r
 \r
+       &.nopad {\r
+               .content-wrapper {\r
+                       .intro-no-padding();\r
+               }\r
+       }\r
+\r
        .content-wrapper {\r
+               .intro-padding();\r
                background-size: 100% auto;\r
                background-position: 100% 100%;\r
-               //padding-top: 152px; // Minimum clearance and top for fixed menu\r
-               padding-top: 200px;\r
-\r
-               @media @m1280 {\r
-                       padding-top: 120px;\r
-               }\r
 \r
                @media @m900 {\r
                        padding-bottom: 85%;\r
                        background-size: 180% auto; // This value needs to be synced with 410-features.js for resizeVideoLink()\r
-                       padding-top: 100px;\r
                        text-align: center;\r
 \r
                        .title {\r
                                text-align: left;\r
                        }\r
                }\r
-\r
-               @media @m768 {\r
-                       padding-top: 80px;\r
-               }\r
        }\r
 \r
        blockquote {\r
index 2bf35ed7ae6130d4aa0af354dd60a95ac4bf80c0..ecfe5dd90d01e91b31f53d5d8287a89dfb87b5ff 100644 (file)
@@ -5,6 +5,10 @@
 // Request a quote section
 .request-quote {
 
+       &.pad {
+               .intro-padding();
+       }
+
        @media @m1024 {
                flex-wrap: wrap;
        }