diff --git a/theme/nonzero/layout/general.php b/theme/nonzero/layout/general.php
index 988a177d60c..d5aeff59f96 100644
--- a/theme/nonzero/layout/general.php
+++ b/theme/nonzero/layout/general.php
@@ -3,28 +3,35 @@
$hasheading = ($PAGE->heading);
$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
$hasfooter = (empty($PAGE->layout_options['nofooter']));
+
$hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
$hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
+
+$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
+$showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
+
$custommenu = $OUTPUT->custom_menu();
$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
$bodyclasses = array();
-if ($hassidepre && !$hassidepost) {
+if ($showsidepre && !$showsidepost) {
$bodyclasses[] = 'side-pre-only';
-} else if ($hassidepost && !$hassidepre) {
+} else if ($showsidepost && !$showsidepre) {
$bodyclasses[] = 'side-post-only';
-} else if (!$hassidepost && !$hassidepre) {
+} else if (!$showsidepost && !$showsidepre) {
$bodyclasses[] = 'content-only';
}
if ($hascustommenu) {
$bodyclasses[] = 'has_custom_menu';
}
+
echo $OUTPUT->doctype() ?>
htmlattributes() ?>>
title ?>
+
standard_head_html() ?>
diff --git a/theme/nonzero/style/pagelayout.css b/theme/nonzero/style/pagelayout.css
index b3527524e8c..83988b637f4 100644
--- a/theme/nonzero/style/pagelayout.css
+++ b/theme/nonzero/style/pagelayout.css
@@ -10,7 +10,7 @@ body {margin:auto 0px;width:auto;}
#page-content #region-main-box {
float: left;
- margin-left: -[[setting:regionpostwidth]];;
+ margin-left: -[[setting:regionpostwidth]];
position: relative;
width: 200%;
right: 100%;
@@ -18,7 +18,7 @@ body {margin:auto 0px;width:auto;}
#page-content #region-post-box {
float: left;
- margin-left: -[[setting:regionprewidth]];;
+ margin-left: -[[setting:regionprewidth]];
width: 100%;
}
@@ -67,7 +67,7 @@ body {margin:auto 0px;width:auto;}
/** Only side pre **/
.side-pre-only #page-content #region-main-box {
- margin-left: 0px;
+ margin-left: 0;
}
.side-pre-only #page-content #region-post-box {
@@ -80,16 +80,17 @@ body {margin:auto 0px;width:auto;}
.side-pre-only #page-content #region-pre {
left: [[setting:regionprewidth]];
- width: [[setting:regionprewidth]];
+ width: [[setting:regionprewidth]];
}
.side-pre-only #page-content #region-post {
- width: 0%;
+ left: 0;
+ width: 0;
}
/** Only side post **/
.side-post-only #page-content #region-main-box {
- margin-left: 0px;
+ margin-left: 0;
}
@@ -99,11 +100,14 @@ body {margin:auto 0px;width:auto;}
.side-post-only #page-content #region-main {
margin-left: [[setting:regionpostwidth]];
-
}
+.side-post-only #page-content #region-pre {
+ left: 0;
+ width: 0;
+}
.side-post-only #page-content #region-post {
- left: [[setting:regionsumwidth]];
+ left: [[setting:regionpostwidth]];
width: [[setting:regionpostwidth]];
}
@@ -111,6 +115,47 @@ body {margin:auto 0px;width:auto;}
margin-left: [[setting:regionprewidth]];
}
+.blocks-moving.side-post-only #page-content #region-main-box {
+ float: left;
+ margin-left: -[[setting:regionpostwidth]];
+ position: relative;
+ width: 200%;
+ right: 100%;
+}
+
+.blocks-moving.side-post-only #page-content #region-main-box #region-post-box {
+ float: left;
+ margin-left:
+ -[[setting:regionprewidth]];
+ width: 100%;
+}
+
+.blocks-moving.side-post-only #page-content #region-main-box #region-post-box #region-main-wrap {
+ float: left;
+ width: 50%;
+}
+
+.blocks-moving.side-post-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {
+ overflow: hidden;
+ position: relative;
+ margin-left: [[setting:regionsumwidth]];
+ left: 100%;
+}
+
+.blocks-moving.side-post-only #page-content #region-main-box #region-post-box #region-pre {
+ float: right;
+ position: relative;
+ left: [[setting:leftregionwidthmargin]];
+ width: [[setting:regionprewidth]];
+}
+
+.blocks-moving.side-post-only #page-content #region-main-box #region-post-box #region-post {
+ float: right;
+ position: relative;
+ left: [[setting:regiondoublepresumwidth]];
+ width: [[setting:regionpostwidth]];
+}
+
/** No blocks whatsoever **/
.content-only #page-content #region-main-box {
margin-left: 0px;