themes MDL-22652 Added dock support to the serenity theme

This commit is contained in:
Sam Hemelryk 2010-06-11 03:16:54 +00:00
parent 157d25fb0d
commit da15f15d48
9 changed files with 38 additions and 16 deletions

View File

@ -29,7 +29,7 @@ $THEME->sheets = array('core');
////////////////////////////////////////////////////
$THEME->enable_dock = false;
$THEME->enable_dock = true;
////////////////////////////////////////////////////
// Do you want to use the new navigation dock?

View File

@ -1,14 +1,17 @@
<?php
$hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
$hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
$hassidepre = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT));
$hassidepost = (empty($PAGE->layout_options['noblocks']) && $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));
$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 ($hassidepre || $hassidepost) {
@ -62,7 +65,7 @@ echo $OUTPUT->doctype() ?>
</div>
<?php if ($hassidepre) { ?>
<div id="region-pre">
<div id="region-pre" class="block-region">
<div class="region-content">
<?php echo $OUTPUT->blocks_for_region('side-pre') ?>
</div>
@ -70,7 +73,7 @@ echo $OUTPUT->doctype() ?>
<?php } ?>
<?php if ($hassidepost) { ?>
<div id="region-post">
<div id="region-post" class="block-region">
<div class="region-content">
<?php echo $OUTPUT->blocks_for_region('side-post') ?>
</div>

View File

@ -3,15 +3,18 @@
$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);
$hassidepre = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT));
$hassidepost = (empty($PAGE->layout_options['noblocks']) && $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));
$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';
}
@ -71,7 +74,7 @@ echo $OUTPUT->doctype() ?>
</div>
<?php if ($hassidepre) { ?>
<div id="region-pre">
<div id="region-pre" class="block-region">
<div class="region-content">
<?php echo $OUTPUT->blocks_for_region('side-pre') ?>
</div>
@ -79,7 +82,7 @@ echo $OUTPUT->doctype() ?>
<?php } ?>
<?php if ($hassidepost) { ?>
<div id="region-post">
<div id="region-post" class="block-region">
<div class="region-content">
<?php echo $OUTPUT->blocks_for_region('side-post') ?>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 B

View File

@ -110,4 +110,20 @@ a:hover {
font-weight:normal;
border:none;
padding:2px 5px;
}
}
/** Dock
-----------------------------*/
body.has_dock {margin:0;}
#dock {left:5%;margin-left:-29px;border-width:0;background-color:transparent;}
#dock .controls {bottom:auto;background-color:#DDD6CC;}
#dock .dockeditem_container {position:relative;}
#dock .dockeditem.firstdockitem {margin-top:50px;}
#dock .dockeditem {background-color:#fff;padding:2px;padding-right:0px;}
#dock .dockedtitle {border-width:0;}
#dock .dockedtitle h2 {margin:0;padding:10px 3px;}
#dock .dockedtitle.activeitem {background-color:#817b65;width:35px;}
#dockeditempanel {background-color:#817b65;margin-left:5px;}
#dockeditempanel .dockeditempanel_content {background-color:#eee9e0;margin:0 3px;position:relative;top:-3px;min-height:100px;border-color:#6f6856;}
#dockeditempanel .dockeditempanel_hd {background-image:url([[pix:theme|headingblock]]);border-width:0;}
#dockeditempanel .dockeditempanel_hd h2 {font-size:1em;color:#fff;}