Skip to content

Commit

Permalink
Merged changes and fixed whitespace issues for MDL-23188
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Hemelryk committed May 2, 2011
2 parents 0742ea8 + e391f90 commit e3cc5b1
Show file tree
Hide file tree
Showing 6 changed files with 168 additions and 35 deletions.
11 changes: 10 additions & 1 deletion theme/anomaly/layout/general.php
Expand Up @@ -7,7 +7,8 @@
$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 ($showsidepre && !$showsidepost) {
Expand All @@ -17,6 +18,9 @@
} else if (!$showsidepost && !$showsidepre) {
$bodyclasses[] = 'content-only';
}
if ($hascustommenu) {
$bodyclasses[] = 'has_custom_menu';
}

echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
Expand All @@ -42,6 +46,11 @@
}
echo $PAGE->headingmenu
?></div><?php } ?>

<?php if ($hascustommenu) { ?>
<div id="custommenu"><?php echo $custommenu; ?></div>
<?php } ?>

<?php if ($hasnavbar) { ?>
<div class="navbar clearfix">
<div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
Expand Down
11 changes: 10 additions & 1 deletion theme/anomaly/layout/report.php
Expand Up @@ -5,12 +5,16 @@
$hasfooter = (empty($PAGE->layout_options['nofooter']));
$hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
$showsidepre = $hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT);

$custommenu = $OUTPUT->custom_menu();
$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));

$bodyclasses = array();
if (!$showsidepre) {
$bodyclasses[] = 'content-only';
}
if ($hascustommenu) {
$bodyclasses[] = 'has_custom_menu';
}

echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
Expand All @@ -36,6 +40,11 @@
}
echo $PAGE->headingmenu
?></div><?php } ?>

<?php if ($hascustommenu) { ?>
<div id="custommenu"><?php echo $custommenu; ?></div>
<?php } ?>

<?php if ($hasnavbar) { ?>
<div class="navbar clearfix">
<div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
Expand Down
32 changes: 29 additions & 3 deletions theme/anomaly/style/general.css
Expand Up @@ -121,8 +121,6 @@ html, body {background-color:#C8C9C7;}
.group .r1 .cell,
.admin table .r1 .cell {background-color:#EEE;}

.admin .plugincompattable .r1 .cell {background-color:#FFF;}

.singlebutton,
.buttons {text-align:center;margin:20px;}
.buttons form {display:inline;}
Expand Down Expand Up @@ -222,4 +220,32 @@ html, body {background-color:#C8C9C7;}

/** Overide for RTL layout **/
.dir-rtl #page-header .navbar .breadcrumb {float:right;}
.dir-rtl #page-header .navbar .navbutton {float:left;}
.dir-rtl #page-header .navbar .navbutton {float:left;}

/** Custom menu **/
/*YUI Reset */
.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-content,
.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label,
.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label-active,
.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menuitem-active .yui3-menuitem-content,
.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label-menuvisible {background-position: -10000px -10000px;}
.yui3-skin-sam #page .yui3-menu-label,
.yui3-skin-sam #page .yui3-menu .yui3-menu .yui3-menu-label,
.yui3-skin-sam #page .yui3-menubuttonnav .yui3-menu-label em { background-position: right center; }
.yui3-skin-sam #page .yui3-splitbuttonnav .yui3-menu-label .yui3-menu-toggle {background-position: 3px center;}
.yui3-skin-sam #page .yui3-splitbuttonnav .yui3-menu-label-menuvisible .yui3-menu-toggle {background-position: 0% 50%;}
#custommenu {clear: both;padding-left: 4px;margin-bottom: 0px;padding-bottom: 2px;}
.yui3-skin-sam #page .yui3-menu-label,
.yui3-skin-sam #page .yui3-menuitem-content {color: #fff;font-weight: 800;line-height: 30px;}
.yui3-skin-sam #page .custom_menu_submenu .yui3-menu-label,
.yui3-skin-sam #page .custom_menu_submenu .yui3-menuitem-content {color: #000 !important;text-shadow: none !important;line-height: 25px;}
.yui3-skin-sam #page .yui3-menu-label.yui3-menu-label-active,
.yui3-skin-sam #page .yui3-menuitem-active .yui3-menuitem-content {color: #000;background-color: #697F55;}
.yui3-skin-sam #page .yui3-menu-content,
.yui3-skin-sam #page .yui3-menu .yui3-menu .yui3-menu-content,
.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label,
.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menuitem-content {border: none !important;}
.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label,
.yui3-skin-sam .yui3-menu-horizontal .yui3-menuitem-content {border-color:#808080;border-style:solid;border-width:0px 0;}

#page .custom_menu_submenu {border: 1px solid #697F55 !important;-webkit-border-bottom-right-radius: 5px;-webkit-border-bottom-left-radius: 5px;-moz-border-radius-bottomright: 5px;-moz-border-radius-bottomleft: 5px;border-bottom-right-radius: 5px;border-bottom-left-radius: 5px;}
35 changes: 21 additions & 14 deletions theme/serenity/layout/frontpage.php
Expand Up @@ -5,6 +5,8 @@

$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 ($showsidepre && !$showsidepost) {
Expand All @@ -15,7 +17,10 @@
$bodyclasses[] = 'content-only';
}
if ($hassidepre || $hassidepost) {
$bodyclasses[] = 'background';
$bodyclasses[] = 'background';
}
if ($hascustommenu) {
$bodyclasses[] = 'has_custom_menu';
}

echo $OUTPUT->doctype() ?>
Expand All @@ -30,23 +35,25 @@
<?php echo $OUTPUT->standard_top_of_body_html() ?>

<div id="page">
<div id="wrapper" class="clearfix">
<div id="wrapper" class="clearfix">

<!-- START OF HEADER -->

<div id="page-header" class="clearfix">
<div id="page-header-wrapper">
<h1 class="headermain"><?php echo $PAGE->heading ?></h1>
<div class="headermenu">
<?php
echo $OUTPUT->login_info();
echo $OUTPUT->lang_menu();
echo $PAGE->headingmenu;
?>
</div>
</div>
<div id="page-header-wrapper">
<h1 class="headermain"><?php echo $PAGE->heading ?></h1>
<div class="headermenu">
<?php
echo $OUTPUT->login_info();
echo $OUTPUT->lang_menu();
echo $PAGE->headingmenu;
?>
</div>
</div>
</div>

<?php if ($hascustommenu) { ?>
<div id="custommenu"><?php echo $custommenu; ?></div>
<?php } ?>
<!-- END OF HEADER -->

<!-- START OF CONTENT -->
Expand Down Expand Up @@ -87,7 +94,7 @@

<!-- END OF CONTENT -->

</div>
</div>

<!-- START OF FOOTER -->

Expand Down
40 changes: 24 additions & 16 deletions theme/serenity/layout/general.php
Expand Up @@ -8,6 +8,8 @@

$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 ($showsidepre && !$showsidepost) {
Expand All @@ -17,7 +19,9 @@
} else if (!$showsidepost && !$showsidepre) {
$bodyclasses[] = 'content-only';
}

if ($hascustommenu) {
$bodyclasses[] = 'has_custom_menu';
}
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
Expand All @@ -29,29 +33,33 @@
<?php echo $OUTPUT->standard_top_of_body_html() ?>

<div id="page">
<div id="wrapper" class="clearfix">
<div id="wrapper" class="clearfix">
<?php if ($hasheading || $hasnavbar) { ?>

<div id="page-header" class="clearfix">

<?php if ($hasheading) { ?>
<h1 class="headermain"><?php echo $PAGE->heading ?></h1>
<div class="headermenu">
<?php
echo $OUTPUT->login_info();
if (!empty($PAGE->layout_options['langmenu'])) {
echo $OUTPUT->lang_menu();
}
echo $PAGE->headingmenu
?>
</div>
<?php } ?>
<?php if ($hasheading) { ?>
<h1 class="headermain"><?php echo $PAGE->heading ?></h1>
<div class="headermenu">
<?php
echo $OUTPUT->login_info();
if (!empty($PAGE->layout_options['langmenu'])) {
echo $OUTPUT->lang_menu();
}
echo $PAGE->headingmenu
?>
</div>
<?php } ?>

</div>

<?php if ($hascustommenu) { ?>
<div id="custommenu"><?php echo $custommenu; ?></div>
<?php } ?>

<?php if ($hasnavbar) { ?>
<div class="navbar clearfix">
<div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
<div class="navbar clearfix">
<div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
<div class="navbutton"> <?php echo $PAGE->button; ?></div>
</div>
<?php } ?>
Expand Down
74 changes: 74 additions & 0 deletions theme/serenity/style/core.css
Expand Up @@ -48,11 +48,19 @@ a:hover {
margin-bottom: 5px;
}

.has_custom_menu #page-header {
margin-bottom: 0px;
}

.headermain {
font-weight: normal;
margin: 1em 0.5em 0.75em;
}

#page-content {
float: none;
}

/* Footer
-------------------------*/
#page-footer {
Expand Down Expand Up @@ -230,4 +238,70 @@ body.has_dock {
#dockeditempanel .dockeditempanel_hd h2 {
font-size: 1em;
color: #fff;
}

/*cutom menu */
/*YUI Reset */
.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-content,
.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label,
.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label-active,
.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menuitem-active .yui3-menuitem-content,
.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label-menuvisible {background-position: -10000px -10000px;}
.yui3-skin-sam #page .yui3-menu-label,
.yui3-skin-sam #page .yui3-menu .yui3-menu .yui3-menu-label,
.yui3-skin-sam #page .yui3-menubuttonnav .yui3-menu-label em {background-position: right center;}
.yui3-skin-sam #page .yui3-splitbuttonnav .yui3-menu-label .yui3-menu-toggle {background-position: 3px center;}
.yui3-skin-sam #page .yui3-splitbuttonnav .yui3-menu-label-menuvisible .yui3-menu-toggle {background-position: 0% 50%;}

#custommenu {
clear: both;
background-image: url([[pix:theme|headingblock]]);
margin-bottom: 5px;
}

.yui3-skin-sam #page .yui3-menu-label,
.yui3-skin-sam #page .yui3-menuitem-content {
color: #fff;
font-weight: 800;
line-height: 30px;
}

.custom_menu_submenu .yui3-menu-label,
.custom_menu_submenu .yui3-menuitem-content {
color: #000 !important;
text-shadow: none !important;
line-height: 25px;
}

.yui3-skin-sam #page .yui3-menu-label.yui3-menu-label-active,
.yui3-skin-sam #page .yui3-menu-label.yui3-menu-label-menuvisible,
.yui3-skin-sam #page .yui3-menuitem-active .yui3-menuitem-content {
color: #000;
background-color: #d8d2c6;
}

.yui3-skin-sam #page .yui3-menu-content,
.yui3-skin-sam #page .yui3-menu-content,
.yui3-skin-sam #page .yui3-menu .yui3-menu .yui3-menu-content,
.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label,
.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menuitem-content {
border: none !important;
}

.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label,
.yui3-skin-sam .yui3-menu-horizontal .yui3-menuitem-content {
border-color:#808080;
border-style:solid;
border-width:0px 0;
}

#page .custom_menu_submenu {
border: 2px solid #d8d2c6 !important;
background: #fff;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
-webkit-box-shadow: 0px 1px 3px #ccc;
-moz-box-shadow: 0px 1px 3px #ccc;
box-shadow: 0px 1px 3px #ccc;
}

0 comments on commit e3cc5b1

Please sign in to comment.