Skip to content

Commit

Permalink
Merge branch 'MDL-26711' of git://github.com/epsd/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Hemelryk committed Mar 14, 2011
2 parents 64f3208 + fab058e commit e2d50a6
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 6 deletions.
10 changes: 10 additions & 0 deletions theme/nonzero/layout/frontpage.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT)); $showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
$showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $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(); $bodyclasses = array();
if ($showsidepre && !$showsidepost) { if ($showsidepre && !$showsidepost) {
$bodyclasses[] = 'side-pre-only'; $bodyclasses[] = 'side-pre-only';
Expand All @@ -18,6 +21,9 @@
} else if (!$showsidepost && !$showsidepre) { } else if (!$showsidepost && !$showsidepre) {
$bodyclasses[] = 'content-only'; $bodyclasses[] = 'content-only';
} }
if ($hascustommenu) {
$bodyclasses[] = 'has_custom_menu';
}




echo $OUTPUT->doctype() ?> echo $OUTPUT->doctype() ?>
Expand Down Expand Up @@ -45,7 +51,11 @@
echo $PAGE->headingmenu; echo $PAGE->headingmenu;
?> ?>
</div> </div>
<?php if ($hascustommenu) { ?>
<div id="custommenuwrap"><div id="custommenu"><?php echo $custommenu; ?></div></div>
<?php } ?>
</div> </div>

</div> </div>


<!-- END OF HEADER --> <!-- END OF HEADER -->
Expand Down
11 changes: 9 additions & 2 deletions theme/nonzero/layout/general.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
$hasfooter = (empty($PAGE->layout_options['nofooter'])); $hasfooter = (empty($PAGE->layout_options['nofooter']));
$hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT); $hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
$hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT); $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
$custommenu = $OUTPUT->custom_menu();
$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));


$bodyclasses = array(); $bodyclasses = array();
if ($hassidepre && !$hassidepost) { if ($hassidepre && !$hassidepost) {
Expand All @@ -14,6 +16,9 @@
} else if (!$hassidepost && !$hassidepre) { } else if (!$hassidepost && !$hassidepre) {
$bodyclasses[] = 'content-only'; $bodyclasses[] = 'content-only';
} }
if ($hascustommenu) {
$bodyclasses[] = 'has_custom_menu';
}


echo $OUTPUT->doctype() ?> echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>> <html <?php echo $OUTPUT->htmlattributes() ?>>
Expand All @@ -28,7 +33,7 @@


<div id="page"> <div id="page">
<?php if ($hasheading || $hasnavbar) { ?> <?php if ($hasheading || $hasnavbar) { ?>
<div id="page-header" class="inside"> <div id="page-header" >
<div id="page-header-wrapper" class="wrapper clearfix"> <div id="page-header-wrapper" class="wrapper clearfix">
<?php if ($hasheading) { ?> <?php if ($hasheading) { ?>
<h1 class="headermain"><?php echo $PAGE->heading ?></h1> <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
Expand All @@ -39,7 +44,9 @@
} }
echo $PAGE->headingmenu ?> echo $PAGE->headingmenu ?>
</div> </div>
<?php } ?> <?php } if ($hascustommenu) { ?>
<div id="custommenuwrap"><div id="custommenu"><?php echo $custommenu; ?></div></div>
<?php } ?>
</div> </div>
</div> </div>


Expand Down
98 changes: 94 additions & 4 deletions theme/nonzero/style/core.css
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ a:active {
---------------------------*/ ---------------------------*/


#page-header { #page-header {
background: url([[pix:theme|n1]]) repeat-x 0 100%; background: url([[pix:theme|n1]]) repeat-x 0 0;
color: #fff; color: #fff;
height: 122px; height: 122px;
} }
Expand All @@ -57,6 +57,11 @@ a:active {
font-size:2.5em; font-size:2.5em;
padding-top:70px; padding-top:70px;
margin: 0; margin: 0;
text-shadow: 0 -1px 1px #000;
}

.has_custom_menu #page-header h1 {
padding-top:60px;
} }


#page-header.inside { #page-header.inside {
Expand Down Expand Up @@ -148,12 +153,97 @@ a:active {


.course-content .current { .course-content .current {
background: #1f5480; background: #1f5480;
}

.course-content .current .left {
color: #fff; color: #fff;
} }


.course-content .main .content { .course-content .main .content {
background: #fff; background: #fff;
} }

/* Custom Menu */
/*custom menu styles */
#custommenuwrap {
clear: both;
padding-top: 4px;
}

#custommenu {
border: none !important;
border: 0px solid #fff !important;
}

#custommenu * {
border: none !important;
}

/*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%;
}

.yui3-skin-sam #page .yui3-menu-label, .yui3-skin-sam #page .yui3-menuitem-content {
color: #fff;
font-weight: 600;
text-decoration: none;
padding-left: 0px;
padding-right: 20px !important;
text-shadow: 0 -1px 1px #000;
}

.custom_menu_submenu .yui3-menu-label, .custom_menu_submenu .yui3-menuitem-content {
color: #333 !important;
padding-left: 5px !important;
text-shadow:none !important;
}

.yui3-skin-sam #page .yui3-menu-label.yui3-menu-label-active, .yui3-skin-sam #page .yui3-menuitem-active .yui3-menuitem-content {
color: #ccc;
}

.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 #27608d !important;
border-top: none !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 e2d50a6

Please sign in to comment.