Browse files

Building theme

  • Loading branch information...
1 parent 2a56765 commit 4f68869bf6fa1f613b26ffa25529cec13f9fda91 Patrick Malley committed Apr 12, 2010
Showing with 168 additions and 47 deletions.
  1. +13 −2 theme/boxxie/config.php
  2. +66 −44 theme/boxxie/layout/general.php
  3. +89 −1 theme/boxxie/style/screen.css
View
15 theme/boxxie/config.php
@@ -35,11 +35,13 @@
// Do you want to use the new navigation dock?
////////////////////////////////////////////////////
+
$THEME->layouts = array(
'base' => array(
'theme' => 'boxxie',
'file' => 'general.php',
- 'regions' => array(),
+ 'regions' => array('side-pre', 'side-post'),
+ 'defaultregion' => 'side-post',
),
'general' => array(
'theme' => 'boxxie',
@@ -114,4 +116,13 @@
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true),
),
-);
+);
+
+///////////////////////////////////////////////////////////////
+// These are all of the possible layouts in Moodle. The
+// simplest way to do this is to keep the theme and file
+// variables the same for every layout. Including them
+// all in this way allows some flexibility down the road
+// if you want to add a different layout template to a
+// specific page.
+///////////////////////////////////////////////////////////////
View
110 theme/boxxie/layout/general.php
@@ -2,69 +2,91 @@
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
- <title><?php echo $PAGE->title; ?></title>
- <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
- <?php echo $OUTPUT->standard_head_html() ?>
+ <title><?php echo $PAGE->title; ?></title>
+ <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
+ <?php echo $OUTPUT->standard_head_html() ?>
</head>
<body id="<?php echo $PAGE->bodyid; ?>" class="<?php echo $PAGE->bodyclasses; ?>">
+
<?php echo $OUTPUT->standard_top_of_body_html() ?>
-<div id="page">
+
<?php if ($PAGE->heading || (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar())) { ?>
+
+<div id="page-wrapper">
+ <div id="page" class="clearfix">
+
<div id="page-header">
- <?php if ($PAGE->heading) { ?>
+ <?php if ($PAGE->heading) { ?>
<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 (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar()) { ?>
- <div class="navbar clearfix">
- <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
- <div class="navbutton"> <?php echo $PAGE->button; ?></div>
- </div>
- <?php } ?>
+ echo $OUTPUT->login_info();
+ if (!empty($PAGE->layout_options['langmenu'])) {
+ echo $OUTPUT->lang_menu();
+ }
+ echo $PAGE->headingmenu
+ ?></div><?php
+ } ?>
+
+ <?php if (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar()) { ?>
+ <div class="navbar clearfix">
+ <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
+ <div class="navbutton"> <?php echo $PAGE->button; ?></div>
+ </div>
+ <?php } ?>
</div>
+
<?php } ?>
-
+
<div id="page-content">
- <div id="regions">
- <div id="regions-mask">
- <div id="region-main">
- <div id="region-main-mask">
- <div class="region-content">
- <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
- </div>
- </div>
- </div>
- <div id="region-pre">
- <div class="region-content">
- <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
- </div>
- </div>
- <div id="region-post">
- <div class="region-content">
- <?php echo $OUTPUT->blocks_for_region('side-post') ?>
- </div>
- </div>
+ <div id="regions">
+ <div id="regions-mask">
+
+ <div id="region-main">
+ <div id="region-main-mask">
+ <div class="region-content">
+ <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
+ </div>
+ </div>
+ </div>
+
+ <div id="region-pre">
+ <div class="region-content">
+ <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
</div>
+ </div>
+
+ <div id="region-post">
+ <div class="region-content">
+ <?php echo $OUTPUT->blocks_for_region('side-post') ?>
+ </div>
+ </div>
+
</div>
+ </div>
</div>
-
- <?php if ($hasfooter) { ?>
+
+<?php if ($hasfooter) { ?>
+
<div id="page-footer" class="clearfix">
- <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
- <?php
+ <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>
- <?php } ?>
-</div>
+
+<?php }
+
+if ($PAGE->heading || (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar())) { ?>
+
+ </div> <!-- END #page -->
+</div> <!-- END #page-wrapper -->
+
+<?php } ?>
+
+
<?php echo $OUTPUT->standard_end_of_body_html() ?>
</body>
</html>
View
90 theme/boxxie/style/screen.css
@@ -1 +1,89 @@
-body {}
+html {
+ background: #6e8c45;
+}
+
+#page-wrapper {
+ margin: 10px 5%;
+ background: #5b7439;
+ padding: 5px;
+}
+
+#page {
+ background: #fff;
+ padding: 5px;
+ width: auto;
+}
+
+a:link,
+a:visited {
+ color: #69804e;
+ text-decoration: none;
+}
+
+a:hover,
+a:active {
+ text-decoration: underline;
+}
+
+/* Header */
+
+#page-header {
+ background: #3b4c25;
+ color: #fff;
+}
+
+#page-header a:link,
+#page-header a:visited {
+ color: #b3c79d;
+}
+
+#page-header h1.headermain {
+ color: #fff;
+ font-weight: normal;
+ margin:1em;
+}
+
+.sideblock {
+ border: none;
+}
+
+.sideblock .header {
+ background: #69804e;
+ padding:2px 5px;
+}
+
+.sideblock .header h2 {
+ color: #fff;
+}
+
+.sideblock .content {
+ background: #f3f8ed;
+ border-width: 1px;
+ border-color: #69804e;
+ border-style: solid;
+}
+
+/* Course */
+
+.coursebox {
+ border-bottom: 1px solid #eee;
+}
+
+.coursebox h3.name {
+ margin-top: 0;
+}
+
+.categorybox {
+ border: none;
+}
+
+h2.headingblock {
+ font-weight: normal;
+ border-bottom: 1px solid #eee;
+}
+
+/* Forum */
+
+.forumpost .topic {
+ background: #c9dfb2;
+}

0 comments on commit 4f68869

Please sign in to comment.