Permalink
Browse files

Merge branch 'MDL-26953-M21' of git://github.com/lazydaisy/moodle int…

…o MOODLE_21_STABLE
  • Loading branch information...
2 parents 6adc168 + a8b50f5 commit f1618d93436e142c53fafad749299c161bd116a4 Sam Hemelryk committed Oct 17, 2011
Showing with 63 additions and 11 deletions.
  1. +10 −3 theme/nonzero/layout/general.php
  2. +53 −8 theme/nonzero/style/pagelayout.css
@@ -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() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
<title><?php echo $PAGE->title ?></title>
<link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
+ <meta name="description" content="<?php p(strip_tags(format_text($SITE->summary, FORMAT_HTML))) ?>" />
<?php echo $OUTPUT->standard_head_html() ?>
</head>
@@ -10,15 +10,15 @@ 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%;
}
#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,18 +100,62 @@ 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]];
}
.has_dock.side-post-only .page-middle #region-main-box #region-post-box #region-main-wrap #region-main {
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;

0 comments on commit f1618d9

Please sign in to comment.