Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-22834 - First commit of theme

  • Loading branch information...
commit e4249c5b3284be25e67bc90bed6c47d26322d17c 1 parent a42dcde
authored June 22, 2010
228  theme/leatherbound/config.php
... ...
@@ -0,0 +1,228 @@
  1
+<?php
  2
+
  3
+$THEME->name = 'leatherbound';
  4
+
  5
+////////////////////////////////////////////////////
  6
+// Name of the theme. Most likely the name of
  7
+// the directory in which this file resides. 
  8
+////////////////////////////////////////////////////
  9
+
  10
+
  11
+$THEME->parents = array(
  12
+		'canvas',
  13
+		'base',
  14
+);
  15
+
  16
+/////////////////////////////////////////////////////
  17
+// Which existing theme(s) in the /theme/ directory
  18
+// do you want this theme to extend. A theme can 
  19
+// extend any number of themes. Rather than 
  20
+// creating an entirely new theme and copying all 
  21
+// of the CSS, you can simply create a new theme, 
  22
+// extend the theme you like and just add the 
  23
+// changes you want to your theme.
  24
+////////////////////////////////////////////////////
  25
+
  26
+
  27
+$THEME->sheets = array(
  28
+	'core',
  29
+);
  30
+
  31
+////////////////////////////////////////////////////
  32
+// Name of the stylesheet(s) you've including in 
  33
+// this theme's /styles/ directory.
  34
+////////////////////////////////////////////////////
  35
+
  36
+$THEME->parents_exclude_sheets = array(
  37
+    'base'=>array(
  38
+    		'navigation',
  39
+    		'browser',
  40
+    ),
  41
+);
  42
+
  43
+////////////////////////////////////////////////////
  44
+// An array of stylesheets not to inherit from the
  45
+// themes parents
  46
+////////////////////////////////////////////////////
  47
+
  48
+
  49
+$THEME->enable_dock = true;
  50
+
  51
+////////////////////////////////////////////////////
  52
+// Do you want to use the new navigation dock?
  53
+////////////////////////////////////////////////////
  54
+
  55
+
  56
+// $THEME->editor_sheets = array('editor');
  57
+
  58
+////////////////////////////////////////////////////
  59
+// An array of stylesheets to include within the 
  60
+// body of the editor.
  61
+////////////////////////////////////////////////////
  62
+
  63
+$THEME->layouts = array(
  64
+    'base' => array(
  65
+        'file' => 'general.php',
  66
+        'regions' => array('side-pre', 'side-post'),
  67
+        'defaultregion' => 'side-post',
  68
+    ),
  69
+    'general' => array(
  70
+        'file' => 'general.php',
  71
+        'regions' => array('side-pre', 'side-post'),
  72
+        'defaultregion' => 'side-post',
  73
+    ),
  74
+    'course' => array(
  75
+        'file' => 'general.php',
  76
+        'regions' => array('side-pre', 'side-post'),
  77
+        'defaultregion' => 'side-post'
  78
+    ),
  79
+    'coursecategory' => array(
  80
+        'file' => 'general.php',
  81
+        'regions' => array('side-pre', 'side-post'),
  82
+        'defaultregion' => 'side-post',
  83
+    ),
  84
+    'incourse' => array(
  85
+        'file' => 'general.php',
  86
+        'regions' => array('side-pre', 'side-post'),
  87
+        'defaultregion' => 'side-post',
  88
+    ),
  89
+    'frontpage' => array(
  90
+        'file' => 'frontpage.php',
  91
+        'regions' => array('side-pre', 'side-post'),
  92
+        'defaultregion' => 'side-post',
  93
+    ),
  94
+    'admin' => array(
  95
+        'file' => 'general.php',
  96
+        'regions' => array('side-pre'),
  97
+        'defaultregion' => 'side-pre',
  98
+    ),
  99
+    'mydashboard' => array(
  100
+        'file' => 'general.php',
  101
+        'regions' => array('side-pre', 'side-post'),
  102
+        'defaultregion' => 'side-post',
  103
+        'options' => array('langmenu'=>true),
  104
+    ),
  105
+    'mypublic' => array(
  106
+        'file' => 'general.php',
  107
+        'regions' => array('side-pre', 'side-post'),
  108
+        'defaultregion' => 'side-post',
  109
+    ),
  110
+    'login' => array(
  111
+        'file' => 'general.php',
  112
+        'regions' => array(),
  113
+        'options' => array('langmenu'=>true),
  114
+    ),
  115
+    'popup' => array(
  116
+        'file' => 'general.php',
  117
+        'regions' => array(),
  118
+        'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>true),
  119
+    ),
  120
+    'frametop' => array(
  121
+        'file' => 'general.php',
  122
+        'regions' => array(),
  123
+        'options' => array('nofooter'=>true),
  124
+    ),
  125
+    'maintenance' => array(
  126
+        'file' => 'general.php',
  127
+        'regions' => array(),
  128
+        'options' => array('nofooter'=>true, 'nonavbar'=>true),
  129
+    ),
  130
+    'embedded' => array(
  131
+    	'theme' => 'canvas',
  132
+        'file' => 'embedded.php',
  133
+        'regions' => array(),
  134
+        'options' => array('nofooter'=>true, 'nonavbar'=>true),
  135
+    ),
  136
+    
  137
+);
  138
+
  139
+///////////////////////////////////////////////////////////////
  140
+// These are all of the possible layouts in Moodle. The
  141
+// simplest way to do this is to keep the theme and file
  142
+// variables the same for every layout. Including them
  143
+// all in this way allows some flexibility down the road
  144
+// if you want to add a different layout template to a
  145
+// specific page.
  146
+///////////////////////////////////////////////////////////////
  147
+
  148
+// $THEME->csspostprocess
  149
+	
  150
+////////////////////////////////////////////////////
  151
+// Allows the user to provide the name of a function 
  152
+// that all CSS should be passed to before being 
  153
+// delivered.
  154
+////////////////////////////////////////////////////
  155
+
  156
+// $THEME->filter_mediaplugin_colors
  157
+
  158
+////////////////////////////////////////////////////
  159
+// Used to control the colours used in the small 
  160
+// media player for the filters
  161
+////////////////////////////////////////////////////
  162
+
  163
+// $THEME->javascripts	
  164
+
  165
+////////////////////////////////////////////////////
  166
+// An array containing the names of JavaScript files
  167
+// located in /javascript/ to include in the theme. 
  168
+// (gets included in the head)
  169
+////////////////////////////////////////////////////
  170
+
  171
+// $THEME->javascripts_footer	
  172
+
  173
+////////////////////////////////////////////////////
  174
+// As above but will be included in the page footer.
  175
+////////////////////////////////////////////////////
  176
+
  177
+// $THEME->larrow	
  178
+
  179
+////////////////////////////////////////////////////
  180
+// Overrides the left arrow image used throughout 
  181
+// Moodle
  182
+////////////////////////////////////////////////////
  183
+
  184
+// $THEME->rarrow	
  185
+
  186
+////////////////////////////////////////////////////
  187
+// Overrides the right arrow image used throughout Moodle
  188
+////////////////////////////////////////////////////
  189
+
  190
+// $THEME->layouts	
  191
+
  192
+////////////////////////////////////////////////////
  193
+// An array setting the layouts for the theme
  194
+////////////////////////////////////////////////////
  195
+
  196
+// $THEME->parents_exclude_javascripts
  197
+
  198
+////////////////////////////////////////////////////
  199
+// An array of JavaScript files NOT to inherit from
  200
+// the themes parents
  201
+////////////////////////////////////////////////////
  202
+
  203
+// $THEME->parents_exclude_sheets	
  204
+
  205
+////////////////////////////////////////////////////
  206
+// An array of stylesheets not to inherit from the
  207
+// themes parents
  208
+////////////////////////////////////////////////////
  209
+
  210
+// $THEME->plugins_exclude_sheets
  211
+
  212
+////////////////////////////////////////////////////
  213
+// An array of plugin sheets to ignore and not 
  214
+// include.
  215
+////////////////////////////////////////////////////
  216
+
  217
+// $THEME->renderfactory
  218
+
  219
+////////////////////////////////////////////////////
  220
+// Sets a custom render factory to use with the 
  221
+// theme, used when working with custom renderers.
  222
+////////////////////////////////////////////////////
  223
+
  224
+// $THEME->resource_mp3player_colors
  225
+
  226
+////////////////////////////////////////////////////
  227
+// Controls the colours for the MP3 player 	
  228
+////////////////////////////////////////////////////
29  theme/leatherbound/lang/en/theme_leatherbound.php
... ...
@@ -0,0 +1,29 @@
  1
+<?php
  2
+
  3
+// This file is part of Moodle - http://moodle.org/
  4
+//
  5
+// Moodle is free software: you can redistribute it and/or modify
  6
+// it under the terms of the GNU General Public License as published by
  7
+// the Free Software Foundation, either version 3 of the License, or
  8
+// (at your option) any later version.
  9
+//
  10
+// Moodle is distributed in the hope that it will be useful,
  11
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
  12
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13
+// GNU General Public License for more details.
  14
+//
  15
+// You should have received a copy of the GNU General Public License
  16
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
  17
+
  18
+/**
  19
+ * Strings for component 'theme_formfactor', language 'en', branch 'MOODLE_20_STABLE'
  20
+ *
  21
+ * @package   theme_boxxie
  22
+ * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
  23
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  24
+ */
  25
+
  26
+$string['pluginname'] = 'leatherbound';
  27
+$string['region-side-post'] = 'Right';
  28
+$string['region-side-pre'] = 'Left';
  29
+$string['choosereadme'] = 'Leatherbound, a Moodle 2.0 theme by Patrick Malley (<a href="http://newschoollearning.com/">newschoollearning.com</a>)';
105  theme/leatherbound/layout/frontpage.php
... ...
@@ -0,0 +1,105 @@
  1
+<?php
  2
+
  3
+$hasheading = ($PAGE->heading);
  4
+$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
  5
+$hasfooter = (empty($PAGE->layout_options['nofooter']));
  6
+$hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
  7
+$hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
  8
+
  9
+$bodyclasses = array();
  10
+if ($hassidepre && !$hassidepost) {
  11
+    $bodyclasses[] = 'side-pre-only';
  12
+} else if ($hassidepost && !$hassidepre) {
  13
+    $bodyclasses[] = 'side-post-only';
  14
+} else if (!$hassidepost && !$hassidepre) {
  15
+    $bodyclasses[] = 'content-only';
  16
+}
  17
+
  18
+echo $OUTPUT->doctype() ?>
  19
+<html <?php echo $OUTPUT->htmlattributes() ?>>
  20
+<head>
  21
+    <title><?php echo $PAGE->title ?></title>
  22
+    <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
  23
+    <meta name="description" content="<?php echo strip_tags(format_text($SITE->summary, FORMAT_HTML)) ?>" />
  24
+    <?php echo $OUTPUT->standard_head_html() ?>
  25
+</head>
  26
+
  27
+<body id="<?php echo $PAGE->bodyid ?>" class="<?php echo $PAGE->bodyclasses.' '.join(' ', $bodyclasses) ?>">
  28
+<?php echo $OUTPUT->standard_top_of_body_html() ?>
  29
+
  30
+<div id="page">
  31
+
  32
+<!-- START OF HEADER -->
  33
+    <div id="page-header">
  34
+		<div id="page-header-wrapper" class="wrapper clearfix">
  35
+	        <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
  36
+    	    <div class="headermenu">
  37
+        		<?php
  38
+	        	    echo $OUTPUT->login_info();
  39
+    	        	echo $OUTPUT->lang_menu();
  40
+	        	    echo $PAGE->headingmenu;
  41
+		        ?>	    
  42
+	    	</div>
  43
+	    </div>
  44
+    </div>
  45
+        
  46
+<!-- END OF HEADER -->
  47
+
  48
+<!-- START OF CONTENT -->
  49
+
  50
+<div id="page-content-wrapper" class="wrapper clearfix">
  51
+    <div id="page-content">
  52
+        <div id="region-main-box">
  53
+            <div id="region-post-box">
  54
+            
  55
+                <div id="region-main-wrap">
  56
+                    <div id="region-main">
  57
+                        <div class="region-content">
  58
+                            <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
  59
+                        </div>
  60
+                    </div>
  61
+                </div>
  62
+                
  63
+                <?php if ($hassidepre) { ?>
  64
+                <div id="region-pre">
  65
+                    <div class="region-content">
  66
+                        <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
  67
+                    </div>
  68
+                </div>
  69
+                <?php } ?>
  70
+                
  71
+                <?php if ($hassidepost) { ?>
  72
+                <div id="region-post">
  73
+                    <div class="region-content">
  74
+                        <?php echo $OUTPUT->blocks_for_region('side-post') ?>
  75
+                    </div>
  76
+                </div>
  77
+                <?php } ?>
  78
+                
  79
+            </div>
  80
+        </div>
  81
+    </div>
  82
+</div>
  83
+
  84
+<!-- END OF CONTENT -->
  85
+
  86
+<!-- START OF FOOTER -->
  87
+
  88
+    <div id="page-footer" class="wrapper">
  89
+        <p class="helplink">
  90
+        <?php echo page_doc_link(get_string('moodledocslink')) ?>
  91
+        </p>
  92
+
  93
+        <?php
  94
+        echo $OUTPUT->login_info();
  95
+        echo $OUTPUT->home_link();
  96
+        echo $OUTPUT->standard_footer_html();
  97
+        ?>
  98
+    </div>
  99
+
  100
+<!-- END OF FOOTER -->
  101
+
  102
+</div>
  103
+<?php echo $OUTPUT->standard_end_of_body_html() ?>
  104
+</body>
  105
+</html>
105  theme/leatherbound/layout/general.php
... ...
@@ -0,0 +1,105 @@
  1
+<?php
  2
+
  3
+$hasheading = ($PAGE->heading);
  4
+$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
  5
+$hasfooter = (empty($PAGE->layout_options['nofooter']));
  6
+$hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
  7
+$hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
  8
+
  9
+$bodyclasses = array();
  10
+if ($hassidepre && !$hassidepost) {
  11
+    $bodyclasses[] = 'side-pre-only';
  12
+} else if ($hassidepost && !$hassidepre) {
  13
+    $bodyclasses[] = 'side-post-only';
  14
+} else if (!$hassidepost && !$hassidepre) {
  15
+    $bodyclasses[] = 'content-only';
  16
+}
  17
+
  18
+echo $OUTPUT->doctype() ?>
  19
+<html <?php echo $OUTPUT->htmlattributes() ?>>
  20
+<head>
  21
+    <title><?php echo $PAGE->title ?></title>
  22
+    <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
  23
+    <?php echo $OUTPUT->standard_head_html() ?>
  24
+</head>
  25
+
  26
+<body id="<?php echo $PAGE->bodyid ?>" class="<?php echo $PAGE->bodyclasses.' '.join(' ', $bodyclasses) ?>">
  27
+<?php echo $OUTPUT->standard_top_of_body_html() ?>
  28
+
  29
+<div id="page">
  30
+<?php if ($hasheading || $hasnavbar) { ?>
  31
+    <div id="page-header">
  32
+		<div id="page-header-wrapper" class="wrapper clearfix">
  33
+	        <?php if ($hasheading) { ?>
  34
+    		    <h1 class="headermain inside"><?php echo $PAGE->heading ?></h1>
  35
+		        <div class="headermenu"><?php
  36
+        	    	echo $OUTPUT->login_info();
  37
+            			if (!empty($PAGE->layout_options['langmenu'])) {
  38
+	        	        	echo $OUTPUT->lang_menu();
  39
+	    		        }
  40
+		            echo $PAGE->headingmenu ?>
  41
+	            </div>
  42
+	        <?php } ?>
  43
+	    </div>
  44
+    </div>
  45
+
  46
+        <?php if ($hasnavbar) { ?>
  47
+            <div class="navbar">
  48
+            	<div class="wrapper clearfix">
  49
+	                <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
  50
+    	            <div class="navbutton"> <?php echo $PAGE->button; ?></div>
  51
+    	        </div>
  52
+            </div>
  53
+        <?php } ?>
  54
+
  55
+<?php } ?>
  56
+<!-- END OF HEADER -->
  57
+<div id="page-content-wrapper" class="wrapper clearfix">
  58
+    <div id="page-content">
  59
+        <div id="region-main-box">
  60
+            <div id="region-post-box">
  61
+            
  62
+                <div id="region-main-wrap">
  63
+                    <div id="region-main">
  64
+                        <div class="region-content">
  65
+                            <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
  66
+                        </div>
  67
+                    </div>
  68
+                </div>
  69
+                
  70
+                <?php if ($hassidepre) { ?>
  71
+                <div id="region-pre">
  72
+                    <div class="region-content">
  73
+                        <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
  74
+                    </div>
  75
+                </div>
  76
+                <?php } ?>
  77
+                
  78
+                <?php if ($hassidepost) { ?>
  79
+                <div id="region-post">
  80
+                    <div class="region-content">
  81
+                        <?php echo $OUTPUT->blocks_for_region('side-post') ?>
  82
+                    </div>
  83
+                </div>
  84
+                <?php } ?>
  85
+                
  86
+            </div>
  87
+        </div>
  88
+    </div>
  89
+</div>
  90
+
  91
+<!-- START OF FOOTER -->
  92
+    <?php if ($hasfooter) { ?>
  93
+    <div id="page-footer" class="wrapper">
  94
+        <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
  95
+        <?php
  96
+        echo $OUTPUT->login_info();
  97
+        echo $OUTPUT->home_link();
  98
+        echo $OUTPUT->standard_footer_html();
  99
+        ?>
  100
+    </div>
  101
+    <?php } ?>
  102
+</div>
  103
+<?php echo $OUTPUT->standard_end_of_body_html() ?>
  104
+</body>
  105
+</html>
BIN  theme/leatherbound/pix/header.jpg
170  theme/leatherbound/style/core.css
... ...
@@ -0,0 +1,170 @@
  1
+/********************************************************
  2
+**
  3
+** Theme name: Leatherbound
  4
+** Description: A GPL theme for the Moodle core.
  5
+** Creation Date: 11/24/09
  6
+** Author: Patrick Malley
  7
+** Author URI: http://newschoollearning.com
  8
+**
  9
+** Customize, edit, poke, prod, and adapt to your needs.
  10
+**
  11
+*********************************************************/
  12
+
  13
+/* Global 
  14
+------------------------*/
  15
+
  16
+body {
  17
+	background: #fff;
  18
+	margin: 0;
  19
+	padding: 0;
  20
+	color: #281f18;
  21
+}
  22
+
  23
+body,h1,h2,h3,h4,h5,h6,p,ul,ol,dl,input,textarea {
  24
+	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  25
+}
  26
+
  27
+.wrapper {
  28
+	margin: 0 25px;
  29
+}
  30
+
  31
+a:link,a:visited {
  32
+	color: #DA5013;
  33
+}
  34
+
  35
+a:hover,a:active {
  36
+	color: #251c17;
  37
+}
  38
+
  39
+a img {
  40
+	border: none;
  41
+}
  42
+
  43
+a:active {
  44
+	outline: none;
  45
+}
  46
+
  47
+/* Header 
  48
+-----------------------*/
  49
+
  50
+#page-header {
  51
+	float: none;
  52
+	padding: 10px 0 0;
  53
+	background: url([[pix:theme|header]]);
  54
+	border-bottom: 5px solid #DA5013;
  55
+	color: #fff;
  56
+}
  57
+
  58
+#page-header h1 {
  59
+	font-size: 2.25em;
  60
+	margin: 30px 0 20px;
  61
+}
  62
+
  63
+#page-header h1.inside {
  64
+	font-size: 1.8em;
  65
+	margin: 20px 0 10px;
  66
+}
  67
+
  68
+.headermenu {
  69
+	margin: 0;
  70
+	font-size: 0.9em;
  71
+}
  72
+
  73
+/* Navbar
  74
+-----------------------*/
  75
+
  76
+.navbar {
  77
+	border-width: 0 0 1px 0;
  78
+	border-color: #ddddd7;
  79
+	background: #f7f6f1;
  80
+	margin: 0;
  81
+	padding: 5px 0;
  82
+}
  83
+
  84
+.navbar .navbutton {
  85
+	margin-top: 0;
  86
+}
  87
+
  88
+.breadcrumb .sep {
  89
+	font-size: 0.8em;
  90
+	color: #999;
  91
+}
  92
+
  93
+/* Content
  94
+-----------------------*/
  95
+
  96
+#page-content-wrapper {
  97
+	float: none;
  98
+	margin-top: 5px;
  99
+}
  100
+
  101
+/* Blocks
  102
+-----------------------*/
  103
+
  104
+.block {
  105
+	margin-bottom: 20px;
  106
+	border: none;
  107
+}
  108
+
  109
+.block .header {
  110
+	border-top: 2px solid #da5013;
  111
+	background: #f7f6f1;
  112
+	padding: 4px 5px 5px;
  113
+}
  114
+
  115
+.block .title h2 {
  116
+	color: #35251B;
  117
+	font-weight: normal;
  118
+	font-size: 1.2em;
  119
+	margin: 0;
  120
+}
  121
+
  122
+/* Forum
  123
+------------------------*/
  124
+
  125
+.forumpost .topic {
  126
+	background: #dbd6c7;
  127
+	border-bottom-color: #da5013;
  128
+}
  129
+
  130
+.forumpost .topic .subject {
  131
+	font-weight: bold;
  132
+	font-size: 1.1em;
  133
+}
  134
+
  135
+.forumpost .topic .author {
  136
+	font-size: 0.9em;
  137
+}
  138
+
  139
+.forumpost .content {
  140
+	background: #f7f5f1;
  141
+	border-width: 0 1px 1px;
  142
+	border-style: solid;
  143
+	border-color: #d9d8d4;
  144
+}
  145
+
  146
+/* Course
  147
+---------------------------*/
  148
+
  149
+h2.headingblock {
  150
+	border-width: 0 0 1px 0;
  151
+	padding: 5px 5px 2px;
  152
+	font-weight: normal;
  153
+	font-size: 1.2em;
  154
+	background: #f7f5f1;
  155
+	color: #251c17;
  156
+}
  157
+
  158
+.course-content .section.main {
  159
+	background: #f7f5f1;
  160
+	border: 1px solid #ddd
  161
+}
  162
+
  163
+.course-content .section.current {
  164
+	background: #da5013;
  165
+	color: #fff;
  166
+}
  167
+
  168
+.course-content .section.main .content {
  169
+	background: #fff;
  170
+}

0 notes on commit e4249c5

Please sign in to comment.
Something went wrong with that request. Please try again.