$res = $this->htmlElement($res, 'div', array('class' => 'grid'));\r
$res = $this->backgroundBlock($res, $cf, array('content-wrapper'));\r
\r
- return $this->htmlElement($res, 'section', array('class' => 'contactFooter'));\r
+ return $this->htmlElement($res, 'section', array('class' => 'contactFooter section'));\r
}\r
}
\ No newline at end of file
public $data;\r
\r
protected function _layer($content, $class, $attributes = array()) {\r
+\r
+ $class .= ' section';\r
+\r
$defaultAttributes = array('class' => $class, 'data-headerstyle' => $this->data['headerstyle']);\r
$attributes = $this->_mergeAttributes($attributes, $defaultAttributes);\r
\r
<?php\r
+\r
+$this->headScript()->addFullPage();\r
$this->headScript()->addScriptAndStyle('210-home');\r
-echo $this->home();
\ No newline at end of file
+\r
+echo '<div id="home">'; // Needed because FullPage.js doesn't work when the wrapper is a <main> element\r
+echo $this->home();\r
+echo '</div>';
\ No newline at end of file
}\r
\r
function changeHeaderStyle() {\r
+\r
+ // Todo: rework all this to be compatible with FullPage.js - see callbacks...\r
+\r
var scrollTop = $(window).scrollTop();\r
var wh = $(window).height();\r
var section;\r
- $('main>section').each(function () {\r
+ $('#home > section').each(function () {\r
var offset = $(this).offset().top;\r
if (scrollTop >= offset && scrollTop <= offset + wh - 50) {\r
section = $(this);\r
registerLoader(load_home, true);\r
function load_home() {\r
$(window).on('fluidbookresize', resizeHome);\r
-\r
resizeHome();\r
+\r
+ // FullPage.js setup\r
+ $('#home').fullpage({\r
+ navigation: true,\r
+ navigationPosition: 'left',\r
+ verticalCentered: false\r
+ });\r
+\r
}\r
\r
function resizeHome() {\r
- // Resize sections\r
- var wh = $(window).outerHeight() / zoom;\r
- var ww = $(window).outerWidth() / zoom;\r
- $('main>section').css('height', wh);\r
\r
+ // Todo: see if this can be removed completely if FullPage.js handles the section sizing...\r
\r
- resizeHomeContact(ww, wh);\r
+ // Resize sections\r
+ // var wh = $(window).outerHeight() / zoom;\r
+ // var ww = $(window).outerWidth() / zoom;\r
+ // $('#home > section').css('height', wh);\r
+ //\r
+ //\r
+ // resizeHomeContact(ww, wh);\r
}\r
\r
function resizeHomeContact(ww, wh) {\r