theme-binarius MDL-23188 Added support for the custom menu
authorSam Hemelryk <sam@moodle.com>
Fri, 27 Aug 2010 08:52:46 +0000 (08:52 +0000)
committerSam Hemelryk <sam@moodle.com>
Fri, 27 Aug 2010 08:52:46 +0000 (08:52 +0000)
theme/arialist/config.php
theme/binarius/layout/frontpage.php
theme/binarius/style/core.css

index fd256b1..6848c22 100644 (file)
@@ -143,7 +143,7 @@ $THEME->layouts = array(
     'popup' => array(
         'file' => 'general.php',
         'regions' => array(),
-        'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>true),
+        'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>true, 'nocustommenu'=>true),
     ),
     'frametop' => array(
         'file' => 'general.php',
@@ -153,19 +153,19 @@ $THEME->layouts = array(
     'maintenance' => array(
         'file' => 'general.php',
         'regions' => array(),
-        'options' => array('nofooter'=>true, 'nonavbar'=>true),
+        'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true),
     ),
     'embedded' => array(
        'theme' => 'canvas',
         'file' => 'embedded.php',
         'regions' => array(),
-        'options' => array('nofooter'=>true, 'nonavbar'=>true),
+        'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true),
     ),
     // Should display the content and basic headers only.
     'print' => array(
         'file' => 'general.php',
         'regions' => array(),
-        'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>false),
+        'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>false, 'nocustommenu'=>true),
     ),
 );
 
index fbdbd15..f754c2f 100644 (file)
@@ -6,6 +6,9 @@ $hasfooter = (empty($PAGE->layout_options['nofooter']));
 $hassidepost = $PAGE->blocks->region_has_content('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();
 if ($showsidepost) {
     $bodyclasses[] = 'side-post-only';
@@ -13,6 +16,10 @@ if ($showsidepost) {
     $bodyclasses[] = 'content-only';
 }
 
+if ($hascustommenu) {
+    $bodyclasses[] = 'has-custom-menu';
+}
+
 echo $OUTPUT->doctype() ?>
 <html <?php echo $OUTPUT->htmlattributes() ?>>
 <head>
@@ -27,71 +34,73 @@ echo $OUTPUT->doctype() ?>
 
 <div id="page">
 
-       <div id="wrapper" class="clearfix">
+    <div id="wrapper" class="clearfix">
 
 <!-- START OF HEADER -->
 
-           <div id="page-header">
-                       <div id="page-header-wrapper" class="wrapper clearfix">
-                   
-                   <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>
+        <div id="page-header">
+            <div id="page-header-wrapper" class="wrapper clearfix">
+
+                <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
+                <div class="headermenu">
+                    <?php
+                        echo $OUTPUT->login_info();
+                        echo $OUTPUT->lang_menu();
+                        echo $PAGE->headingmenu;
+                    ?>
+                </div>
+                <?php if ($hascustommenu) { ?>
+                <div id="custommenu"><?php echo $custommenu; ?></div>
+                <?php } ?>
+            </div>
+        </div>
         
 <!-- END OF HEADER -->
 
 <!-- START OF CONTENT -->
 
-               <div id="page-content-wrapper" class="wrapper clearfix">
-                   <div id="page-content">
-                   <div id="region-main-box">
-                           <div id="region-post-box">
+        <div id="page-content-wrapper" class="wrapper clearfix">
+            <div id="page-content">
+                <div id="region-main-box">
+                    <div id="region-post-box">
             
-                           <div id="region-main-wrap">
-                                   <div id="region-main">
-                                   <div class="region-content">
-                                           <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
-                                       </div>
-                               </div>
-                               </div>
+                        <div id="region-main-wrap">
+                            <div id="region-main">
+                                <div class="region-content">
+                                    <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
+                                </div>
+                            </div>
+                        </div>
                 
-                       <?php if ($hassidepost) { ?>
-                           <div id="region-post" class="block-region">
-                           <div class="region-content">
-                                   <?php echo $OUTPUT->blocks_for_region('side-post') ?>
-                               </div>
-                               </div>
-                           <?php } ?>
-                           
-                       </div>    
-                   </div>
-               </div>
-       </div>
+                        <?php if ($hassidepost) { ?>
+                        <div id="region-post" class="block-region">
+                            <div class="region-content">
+                                <?php echo $OUTPUT->blocks_for_region('side-post') ?>
+                            </div>
+                        </div>
+                        <?php } ?>
+
+                    </div>
+                </div>
+            </div>
+        </div>
 
 <!-- END OF CONTENT -->
-       <div class="myclear"></div>
-       </div> <!-- END #wrapper -->
+    <div class="myclear"></div>
+    </div> <!-- END #wrapper -->
 
 <!-- START OF FOOTER -->
     <div id="page-footer" class="wrapper clearfix">
-           <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
+           <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
         <?php
-                   echo $OUTPUT->login_info();
-                       echo $OUTPUT->home_link();
-               echo $OUTPUT->standard_footer_html();
-           ?>
-       </div>
+               echo $OUTPUT->login_info();
+               echo $OUTPUT->home_link();
+            echo $OUTPUT->standard_footer_html();
+           ?>
+       </div>
 
 <!-- END OF FOOTER -->
-       
+
 </div> <!-- END #page -->
 
 <?php echo $OUTPUT->standard_end_of_body_html() ?>
index f62ff0c..78665ff 100644 (file)
@@ -2,10 +2,10 @@
 --------------------------*/
 
 body {
-       background: #555;
-       margin: 0;
-       padding: 0;
-       color: #000;
+    background: #555;
+    margin: 0;
+    padding: 0;
+    color: #000;
 }
 
 body,h1,h2,h3,h4,h5,h6,p,ul,ol,dl,input,textarea {
@@ -14,15 +14,15 @@ body,h1,h2,h3,h4,h5,h6,p,ul,ol,dl,input,textarea {
 
 
 #wrapper {
-       margin: 25px 75px;
-       background: #fff;
-       -webkit-border-radius: 6px;
-       -moz-border-radius: 6px;
-       border-radius: 6px;     
-       -webkit-box-shadow: 0px 0px 10px #000000;
-       -moz-box-shadow: 0px 0px 10px #000000;
-       box-shadow: 0px 0px 10px #000000;
-       padding: 10px;
+    margin: 25px 75px;
+    background: #fff;
+    -webkit-border-radius: 6px;
+    -moz-border-radius: 6px;
+    border-radius: 6px;
+    -webkit-box-shadow: 0px 0px 10px #000000;
+    -moz-box-shadow: 0px 0px 10px #000000;
+    box-shadow: 0px 0px 10px #000000;
+    padding: 10px;
 }
 
 a:link,a:visited {
@@ -30,232 +30,272 @@ a:link,a:visited {
 }
 
 a:hover,a:active {
-       color:#fb961c;
+    color:#fb961c;
 }
 
 a img {
-       border: none;
+    border: none;
 }
 
 a:active {
-       outline: none;
+    outline: none;
 }
 
 fieldset#general {
-       border-color: #ddd;
+    border-color: #ddd;
 }
 
 /* Header
 ------------------------------*/
 
 #page-header {
-       background: #f04916 url([[pix:theme|header]]) repeat-x 0 0;
-       -webkit-border-radius: 6px;
-       -moz-border-radius: 6px;
-       border-radius: 6px;     
+    background: #f04916 url([[pix:theme|header]]) repeat-x 0 0;
+    -webkit-border-radius: 6px;
+    -moz-border-radius: 6px;
+    border-radius: 6px;
 }
 
 #page-header .headermain {
-       color: #fff;
-       padding: 0.8em 0.5em;
-       font-size: 2.75em;
+    color: #fff;
+    padding: 0.8em 0.5em;
+    font-size: 2.75em;
 }
 
 .headermenu {
-       color: #fff;
+    color: #fff;
 }
 
 .headermenu a {
-       text-decoration: underline;
-       color: #fff;
+    text-decoration: underline;
+    color: #fff;
 }
 
 .navbar {
-       font-size: 0.9em;
-       padding: 10px;color: #555;
+    font-size: 0.9em;
+    padding: 10px;color: #555;
 }
 
 .navbar .sep {
-       font-size: 0.85em;
-       padding-left: 5px;
+    font-size: 0.85em;
+    padding-left: 5px;
 }
 
 /* Blocks 
 -----------------------------*/
 
 .block {
-       border: none;
+    border: none;
 }
 
 .block .header {
-       background: #fb931c url([[pix:theme|sideblock]]) repeat-x 0 50%;
-       padding: 2px 5px;
-       -webkit-border-radius: 6px;
-       -moz-border-radius: 6px;
-       border-radius: 6px;
+    background: #fb931c url([[pix:theme|sideblock]]) repeat-x 0 50%;
+    padding: 2px 5px;
+    -webkit-border-radius: 6px;
+    -moz-border-radius: 6px;
+    border-radius: 6px;
 }
 
 .block.hidden .header {
-       border-bottom: none;
+    border-bottom: none;
 }
 
 .block .header h2 {
-       color: #fff;
-       font-size: 1.25em;
+    color: #fff;
+    font-size: 1.25em;
 }
 
 .editing .block .header .commands {
-       padding: 2px 10px;
+    padding: 2px 10px;
 }
 
 .block .header .block_action {
-       margin-top: 3px;
+    margin-top: 3px;
 }
 
 .block .content {
-       padding:10px;
+    padding:10px;
 }
 
 /* Course
 -------------------------------*/
 
 .course-content .main {
-       border: 1px solid #eee;
-       background: #eee;
+    border: 1px solid #eee;
+    background: #eee;
 }
 
 .course-content .current {
-       background: #f14e16;
-       color: #fff;
+    background: #f14e16;
+    color: #fff;
 }
 
 .course-content .main .content {
-       background: #fff;
+    background: #fff;
 }
 
 /* Forum 
 --------------------------*/
 
 .forumpost .topic {
-       background: #fb931c url([[pix:theme|header]]) repeat-x 0 50%;
-       color: #fff;
-       border: none;
-       padding: 0 10px;
-       -webkit-border-radius: 6px;
-       -moz-border-radius: 6px;
-       border-radius: 6px;
+    background: #fb931c url([[pix:theme|header]]) repeat-x 0 50%;
+    color: #fff;
+    border: none;
+    padding: 0 10px;
+    -webkit-border-radius: 6px;
+    -moz-border-radius: 6px;
+    border-radius: 6px;
 }
 
 .forumpost .subject {
-       font-size: 1.2em;
-       font-weight: bold;
+    font-size: 1.2em;
+    font-weight: bold;
 }
 
 .forumpost .author {
-       font-size: 0.85em;
-       font-style: italic;
+    font-size: 0.85em;
+    font-style: italic;
 }
 
 .forumpost .topic a:link,
 .forumpost .topic a:visited {
-       color: #fff;
-       text-decoration: underline;
+    color: #fff;
+    text-decoration: underline;
 }
 /* Footer
 --------------------------*/
 
 #page-footer {
-       color: #fff;
+    color: #fff;
 }
 
 /* Dock
 -----------------------------*/
 
 body.has_dock { 
-       margin: 0;
+    margin: 0;
 }
 
 #dock { 
-       left: 75px;
-       margin-left: -30px;
-       border-width: 0;
-       background-color: transparent;
+    left: 75px;
+    margin-left: -30px;
+    border-width: 0;
+    background-color: transparent;
 }
 
 #dock .controls { 
-       bottom: auto;
-       background-color: #fb931c;
-       -webkit-border-bottom-left-radius: 6px;
-       -moz-border-radius-bottomleft: 6px;
-       border-bottom-left-radius: 6px; 
+    bottom: auto;
+    background-color: #fb931c;
+    -webkit-border-bottom-left-radius: 6px;
+    -moz-border-radius-bottomleft: 6px;
+    border-bottom-left-radius: 6px;
 }
 
 #dock .dockeditem_container { 
-       position: relative;
+    position: relative;
 }
 
 #dock .dockeditem.firstdockitem { 
-       margin-top: 50px;
-       -webkit-border-top-left-radius: 6px;
-       -moz-border-radius-topleft: 6px;
-       border-top-left-radius: 6px;    
+    margin-top: 50px;
+    -webkit-border-top-left-radius: 6px;
+    -moz-border-radius-topleft: 6px;
+    border-top-left-radius: 6px;
 }
 
 #dock .dockeditem { 
-       background-color: #fff;
-       padding: 2px;
-       padding-right: 0px;
+    background-color: #fff;
+    padding: 2px;
+    padding-right: 0px;
 }
 
 #dock .dockedtitle { 
-       border-width: 0;
+    border-width: 0;
 }
 
 #dock .dockedtitle h2 { 
-       margin: 0;
-       padding: 10px 3px;
+    margin: 0;
+    padding: 10px 3px;
 }
 
 #dock .dockedtitle.activeitem { 
-       background-color: #fb931c;
-       width: 35px;
-       -webkit-border-top-left-radius: 6px;
-       -moz-border-radius-topleft: 6px;
-       border-top-left-radius: 6px;    
-       -webkit-border-bottom-left-radius: 6px;
-       -moz-border-radius-bottomleft: 6px;
-       border-bottom-left-radius: 6px; 
+    background-color: #fb931c;
+    width: 35px;
+    -webkit-border-top-left-radius: 6px;
+    -moz-border-radius-topleft: 6px;
+    border-top-left-radius: 6px;
+    -webkit-border-bottom-left-radius: 6px;
+    -moz-border-radius-bottomleft: 6px;
+    border-bottom-left-radius: 6px;
 }
 
 #dockeditempanel { 
-       margin-left: 4px;
+    margin-left: 4px;
 }
 
 #dockeditempanel .dockeditempanel_content { 
-       background-color: #fff;
-       margin: 0 3px;
-       position: relative;
-       min-height: 100px;
-       border-color: #fb931c;
-       -webkit-border-radius: 6px;
-       -webkit-border-top-left-radius: 0;
-       -moz-border-radius: 6px;
-       -moz-border-radius-topleft: 0;
-       border-radius: 6px;
-       border-top-left-radius: 0;
+    background-color: #fff;
+    margin: 0 3px;
+    position: relative;
+    min-height: 100px;
+    border-color: #fb931c;
+    -webkit-border-radius: 6px;
+    -webkit-border-top-left-radius: 0;
+    -moz-border-radius: 6px;
+    -moz-border-radius-topleft: 0;
+    border-radius: 6px;
+    border-top-left-radius: 0;
 }
 
 #dockeditempanel .dockeditempanel_hd { 
-       border-width: 0;
-       background: #fb931c;
-       padding: 2px;
+    border-width: 0;
+    background: #fb931c;
+    padding: 2px;
 }
 
 #dockeditempanel .dockeditempanel_hd h2 { 
-       font-size: 0.9em;
-       color: #fff;
+    font-size: 0.9em;
+    color: #fff;
 }
 
 .myclear {
 clear: both;
+}
+
+.has-custom-menu #page-header .headermain {
+    padding-bottom: 0.4em;
+}
+
+#custommenu .yui3-menu-horizontal .yui3-menu-content,
+#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content,
+#custommenu .yui3-menu-horizontal .yui3-menu-content ul,
+#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content ul,
+#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content li li:hover > a,
+#custommenu .yui3-menu-horizontal .yui3-menu-label, .yui3-skin-sam .yui3-menu-horizontal .yui3-menuitem-content {
+    border-width:0;
+}
+
+#custommenu .yui3-menu-horizontal .yui3-menu-content ul ul,
+#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content ul ul {
+    background-color:#F9F9F9;
+    border:1px solid #F14E16;
+    border-top-width:0;
+}
+
+#custommenu .yui3-menu-horizontal .yui3-menu-content .yui3-menu-label {
+    color:#FFF;
+}
+
+.yui3-skin-sam #custommenu .yui3-menu-content,
+.yui3-skin-sam #custommenu .yui3-menu .yui3-menu .yui3-menu-content {
+    padding:0;
+}
+
+#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content li li:hover,
+#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content li li:hover a,
+.yui3-skin-sam #custommenu .yui3-menu .yui3-menuitem.yui3-menuitem-active .yui3-menuitem-content {
+    background-color:#F14E16;
+    color:#FFF;
+}
+
+#custommenu .yui3-menu-horizontal .yui3-menu-content li a {
+    cursor:pointer;
 }
\ No newline at end of file