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

This commit is contained in:
Sam Hemelryk 2011-10-17 17:37:49 +13:00
commit 22ca670f88
2 changed files with 63 additions and 11 deletions

View File

@ -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>

View File

@ -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;