MDL-23188 Implement custom menu where possible in core themes, serenity and anomaly
This commit is contained in:
@@ -7,7 +7,8 @@ $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 ($showsidepre && !$showsidepost) {
|
||||
@@ -17,6 +18,9 @@ if ($showsidepre && !$showsidepost) {
|
||||
} else if (!$showsidepost && !$showsidepre) {
|
||||
$bodyclasses[] = 'content-only';
|
||||
}
|
||||
if ($hascustommenu) {
|
||||
$bodyclasses[] = 'has_custom_menu';
|
||||
}
|
||||
|
||||
echo $OUTPUT->doctype() ?>
|
||||
<html <?php echo $OUTPUT->htmlattributes() ?>>
|
||||
@@ -42,6 +46,11 @@ echo $OUTPUT->doctype() ?>
|
||||
}
|
||||
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>
|
||||
|
||||
@@ -5,12 +5,16 @@ $hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
|
||||
$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() ?>>
|
||||
@@ -36,6 +40,11 @@ echo $OUTPUT->doctype() ?>
|
||||
}
|
||||
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>
|
||||
|
||||
@@ -221,3 +221,68 @@ 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;}
|
||||
|
||||
/** Custom menu **/
|
||||
/*YUI Reset */
|
||||
.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-content{ background-position: -10000px -10000px; }
|
||||
|
||||
.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label{ background-position: -10000px -10000px; }
|
||||
|
||||
.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 { background-position: right center; }
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
#custommenu * {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.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-menuitem-active .yui3-menuitem-content {
|
||||
color: #000;
|
||||
background-color: #697F55;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ $hassidepost = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->regio
|
||||
|
||||
$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) {
|
||||
@@ -17,6 +19,9 @@ if ($showsidepre && !$showsidepost) {
|
||||
if ($hassidepre || $hassidepost) {
|
||||
$bodyclasses[] = 'background';
|
||||
}
|
||||
if ($hascustommenu) {
|
||||
$bodyclasses[] = 'has_custom_menu';
|
||||
}
|
||||
|
||||
echo $OUTPUT->doctype() ?>
|
||||
<html <?php echo $OUTPUT->htmlattributes() ?>>
|
||||
@@ -46,7 +51,9 @@ echo $OUTPUT->doctype() ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($hascustommenu) { ?>
|
||||
<div id="custommenu"><?php echo $custommenu; ?></div>
|
||||
<?php } ?>
|
||||
<!-- END OF HEADER -->
|
||||
|
||||
<!-- START OF CONTENT -->
|
||||
|
||||
@@ -8,6 +8,8 @@ $hassidepost = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->regio
|
||||
|
||||
$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) {
|
||||
@@ -17,7 +19,9 @@ if ($showsidepre && !$showsidepost) {
|
||||
} else if (!$showsidepost && !$showsidepre) {
|
||||
$bodyclasses[] = 'content-only';
|
||||
}
|
||||
|
||||
if ($hascustommenu) {
|
||||
$bodyclasses[] = 'has_custom_menu';
|
||||
}
|
||||
echo $OUTPUT->doctype() ?>
|
||||
<html <?php echo $OUTPUT->htmlattributes() ?>>
|
||||
<head>
|
||||
@@ -48,6 +52,10 @@ echo $OUTPUT->doctype() ?>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if ($hascustommenu) { ?>
|
||||
<div id="custommenu"><?php echo $custommenu; ?></div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($hasnavbar) { ?>
|
||||
<div class="navbar clearfix">
|
||||
|
||||
@@ -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 {
|
||||
@@ -230,4 +238,69 @@ 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{ background-position: -10000px -10000px; }
|
||||
|
||||
.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label{ background-position: -10000px -10000px; }
|
||||
|
||||
.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 { background-position: right center; }
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
#custommenu * {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.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-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;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user