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">';
$res .= '</div>'; // .col-2
$res .= '</div>'; // .grid
- if ($outsideContent) {
- $res .= $outsideContent;
- }
+ if ($outsideContent) {
+ $res .= $outsideContent;
+ }
$res = $this->backgroundBlock($res, $intro);
$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
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();
$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
$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;
}
$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
$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
.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
.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
// Request a quote section
.request-quote {
+ &.pad {
+ .intro-padding();
+ }
+
@media @m1024 {
flex-wrap: wrap;
}