Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-23188 implement custom menu where possible in core themes, 20 sta…

…ble version
  • Loading branch information...
commit e391f907afeeb045bbc1daf485afaa7f84427175 1 parent 7daba27
stabijoh authored
View
11 theme/anomaly/layout/general.php
@@ -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) {
@@ -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() ?>>
@@ -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>
View
11 theme/anomaly/layout/report.php
@@ -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() ?>>
@@ -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>
View
69 theme/anomaly/style/general.css
@@ -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;}
@@ -222,4 +220,69 @@ 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{ 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;
+}
View
9 theme/serenity/layout/frontpage.php
@@ -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) {
@@ -17,6 +19,9 @@
if ($hassidepre || $hassidepost) {
$bodyclasses[] = 'background';
}
+if ($hascustommenu) {
+ $bodyclasses[] = 'has_custom_menu';
+}
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
@@ -46,7 +51,9 @@
</div>
</div>
</div>
-
+<?php if ($hascustommenu) { ?>
+ <div id="custommenu"><?php echo $custommenu; ?></div>
+<?php } ?>
<!-- END OF HEADER -->
<!-- START OF CONTENT -->
View
10 theme/serenity/layout/general.php
@@ -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) {
@@ -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>
@@ -48,6 +52,10 @@
<?php } ?>
</div>
+
+ <?php if ($hascustommenu) { ?>
+ <div id="custommenu"><?php echo $custommenu; ?></div>
+ <?php } ?>
<?php if ($hasnavbar) { ?>
<div class="navbar clearfix">
View
75 theme/serenity/style/core.css
@@ -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;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.