'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'),
- 'contact' => array('class' => 'Fluidbook_Form_CMS_Sub_Home_Contact', 'label' => 'Contactez-nous'),
);
foreach ($blocs as $name => $data) {
$style = '';\r
$attributes = array('class' => $class);\r
\r
+ if (isset($data['backgroundimage']) && !isset($data['bg_image'])) {\r
+ $data['bg_image'] = $data['backgroundimage'];\r
+ }\r
+\r
$bgimage = CubeIT_Util_Cms::extractFile($data['bg_image']);\r
$extra_attributes = array();\r
if ($bgimage) {\r
--- /dev/null
+<?php\r
+\r
+class Fluidbook_View_Helper_Home extends CubeIT_View_Helper_Abstract {\r
+ /**\r
+ * @return string\r
+ */\r
+ public function home() {\r
+ $res = '';\r
+ $blocs = array(\r
+ 'intro',\r
+ 'features',\r
+ 'customers',\r
+ 'services',\r
+ 'references'\r
+ );\r
+\r
+ foreach ($blocs as $bloc) {\r
+ $viewHelper = 'home' . ucfirst($bloc);\r
+ $res .= $this->$viewHelper($this->{$bloc});\r
+ }\r
+ $res.=$this->contactFooter();\r
+\r
+ return $res;\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+<?php\r
+\r
+class Fluidbook_View_Helper_HomeCustomers extends Fluidbook_View_Helper_HomeLayer {\r
+ /**\r
+ * @return string\r
+ */\r
+ public function homeCustomers($data) {\r
+ $this->data=$data;\r
+\r
+ $res = '';\r
+\r
+\r
+ return $this->_layer($res, 'customers');\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+<?php\r
+\r
+class Fluidbook_View_Helper_HomeFeatures extends Fluidbook_View_Helper_HomeLayer {\r
+ /**\r
+ * @return string\r
+ */\r
+ public function homeFeatures($data) {\r
+ $this->data=$data;\r
+\r
+ $res='';\r
+\r
+ return $this->_layer($res, 'features');\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+<?php\r
+\r
+class Fluidbook_View_Helper_HomeIntro extends Fluidbook_View_Helper_HomeLayer {\r
+ /**\r
+ * @return string\r
+ */\r
+ public function homeIntro($data) {\r
+ $this->data=$data;\r
+\r
+ $res='';\r
+\r
+ return $this->_layer($res, 'intro');\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+<?php\r
+\r
+class Fluidbook_View_Helper_HomeLayer extends CubeIT_View_Helper_Abstract {\r
+ public $data;\r
+\r
+ protected function _layer($content, $class, $attributes = array()) {\r
+ $defaultAttributes = array('class' => $class);\r
+ $attributes = $this->_mergeAttributes($attributes, $defaultAttributes);\r
+\r
+ $content = $this->backgroundBlock($content, $this->data, array('content-wrapper', 'no-shrink', 'fullheight'));\r
+\r
+ return $this->htmlElement($content, 'section', $attributes);\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+<?php\r
+\r
+class Fluidbook_View_Helper_HomeReferences extends Fluidbook_View_Helper_HomeLayer {\r
+ /**\r
+ * @return string\r
+ */\r
+ public function homeReferences($data) {\r
+ $this->data=$data;\r
+\r
+ $res = '';\r
+\r
+ return $this->_layer($res, 'references');\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+<?php\r
+\r
+class Fluidbook_View_Helper_HomeServices extends Fluidbook_View_Helper_HomeLayer {\r
+ /**\r
+ * @return string\r
+ */\r
+ public function homeServices($data) {\r
+ $this->data = $data;\r
+\r
+ $res = '';\r
+\r
+ return $this->_layer($res, 'services');\r
+ }\r
+}
\ No newline at end of file
<?php\r
$this->headScript()->addScriptAndStyle('210-home');\r
-\r
-echo $this->picture(\r
- array(\r
- array('src' => '/images/test.png', 'width' => 840),\r
- array('src' => '/images/test-portrait.png', 'media' => '(orientation: portrait)', 'width' => 550)\r
- )\r
-);
\ No newline at end of file
+echo $this->home();
\ No newline at end of file
$('main').css('min-height', mainHeight);\r
\r
// Handle divs with background images that must have a proportional min-height\r
- $('[data-bg-ratio]').each(function () {\r
+ $('[data-bg-ratio]:not(.fullheight)').each(function () {\r
$(this).css('min-height', Math.round($(this).outerWidth() * $(this).data('bg-ratio')));\r
});\r
\r
setZoom(ww);\r
+ $(window).trigger('fluidbookresize');\r
}\r
\r
function setZoom(ww) {\r
+registerLoader(load_home, true);\r
+function load_home() {\r
+ $(window).on('fluidbookresize', resizeHome);\r
+\r
+ resizeHome();\r
+}\r
+\r
+function resizeHome() {\r
+ var wh = $(window).outerHeight() / zoom;\r
+ $('main>section').css('height', wh);\r
+}
\ No newline at end of file
width: 100%;\r
padding-top: 4%;\r
padding-bottom: 5%;\r
+ &.fullheight {\r
+ min-height: 100%;\r
+ background-size: cover;\r
+ }\r
}\r
\r
.no-shrink {\r
-main {\r
- height: 3000px;\r
- background-image: linear-gradient(to bottom, rgba(30, 87, 153, 1) 0%, rgba(125, 185, 232, 1) 100%);;\r
+main>section{\r
+ width: 100%;\r
+ overflow: hidden;\r
}
\ No newline at end of file