Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Adding new theme Overlay to 2.0 core, MDL-23857

  • Loading branch information...
commit b2214c5a8033780726eb04a47faab58fb917d758 1 parent 999b54a
epsd epsd authored
256 theme/overlay/config.php
... ... @@ -0,0 +1,256 @@
  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 + * Configuration for Moodle's overlay theme.
  20 + *
  21 + * DO NOT MODIFY THIS THEME!
  22 + * COPY IT FIRST, THEN RENAME THE COPY AND MODIFY IT INSTEAD.
  23 + *
  24 + * For full information about creating Moodle themes, see:
  25 + * http://docs.moodle.org/en/Development:Themes_2.0
  26 + *
  27 + * @package moodlecore
  28 + * @copyright 2008 NodeThirtyThree (http://nodethirtythree.com/)
  29 + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  30 + */
  31 +
  32 +$THEME->name = 'overlay';
  33 +
  34 +////////////////////////////////////////////////////
  35 +// Name of the theme. Most likely the name of
  36 +// the directory in which this file resides.
  37 +////////////////////////////////////////////////////
  38 +
  39 +
  40 +$THEME->parents = array(
  41 + 'canvas',
  42 + 'base',
  43 +);
  44 +
  45 +/////////////////////////////////////////////////////
  46 +// Which existing theme(s) in the /theme/ directory
  47 +// do you want this theme to extend. A theme can
  48 +// extend any number of themes. Rather than
  49 +// creating an entirely new theme and copying all
  50 +// of the CSS, you can simply create a new theme,
  51 +// extend the theme you like and just add the
  52 +// changes you want to your theme.
  53 +////////////////////////////////////////////////////
  54 +
  55 +
  56 +$THEME->sheets = array(
  57 + 'core',
  58 + 'settings',
  59 + 'pagelayout',
  60 +);
  61 +
  62 +////////////////////////////////////////////////////
  63 +// Name of the stylesheet(s) you've including in
  64 +// this theme's /styles/ directory.
  65 +////////////////////////////////////////////////////
  66 +
  67 +$THEME->parents_exclude_sheets = array(
  68 + 'base'=>array(
  69 + 'pagelayout',
  70 + ),
  71 + 'canvas'=>array(
  72 + 'pagelayout',
  73 + ),
  74 +);
  75 +
  76 +
  77 +$THEME->enable_dock = true;
  78 +
  79 +////////////////////////////////////////////////////
  80 +// Do you want to use the new navigation dock?
  81 +////////////////////////////////////////////////////
  82 +
  83 +
  84 +// $THEME->editor_sheets
  85 +
  86 +////////////////////////////////////////////////////
  87 +// An array of stylesheets to include within the
  88 +// body of the editor.
  89 +////////////////////////////////////////////////////
  90 +
  91 +$THEME->layouts = array(
  92 + 'base' => array(
  93 + 'file' => 'general.php',
  94 + 'regions' => array('side-pre', 'side-post'),
  95 + 'defaultregion' => 'side-post',
  96 + ),
  97 + 'standard' => array(
  98 + 'file' => 'general.php',
  99 + 'regions' => array('side-pre', 'side-post'),
  100 + 'defaultregion' => 'side-post',
  101 + ),
  102 + 'course' => array(
  103 + 'file' => 'general.php',
  104 + 'regions' => array('side-pre', 'side-post'),
  105 + 'defaultregion' => 'side-post'
  106 + ),
  107 + 'coursecategory' => array(
  108 + 'file' => 'general.php',
  109 + 'regions' => array('side-pre', 'side-post'),
  110 + 'defaultregion' => 'side-post',
  111 + ),
  112 + 'incourse' => array(
  113 + 'file' => 'general.php',
  114 + 'regions' => array('side-pre', 'side-post'),
  115 + 'defaultregion' => 'side-post',
  116 + ),
  117 + 'frontpage' => array(
  118 + 'file' => 'frontpage.php',
  119 + 'regions' => array('side-pre', 'side-post'),
  120 + 'defaultregion' => 'side-post',
  121 + ),
  122 + 'admin' => array(
  123 + 'file' => 'general.php',
  124 + 'regions' => array('side-pre'),
  125 + 'defaultregion' => 'side-pre',
  126 + ),
  127 + 'mydashboard' => array(
  128 + 'file' => 'general.php',
  129 + 'regions' => array('side-pre', 'side-post'),
  130 + 'defaultregion' => 'side-post',
  131 + 'options' => array('langmenu'=>true),
  132 + ),
  133 + 'mypublic' => array(
  134 + 'file' => 'general.php',
  135 + 'regions' => array('side-pre', 'side-post'),
  136 + 'defaultregion' => 'side-post',
  137 + ),
  138 + 'login' => array(
  139 + 'file' => 'general.php',
  140 + 'regions' => array(),
  141 + 'options' => array('langmenu'=>true),
  142 + ),
  143 + 'popup' => array(
  144 + 'file' => 'general.php',
  145 + 'regions' => array(),
  146 + 'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>true),
  147 + ),
  148 + 'frametop' => array(
  149 + 'file' => 'general.php',
  150 + 'regions' => array(),
  151 + 'options' => array('nofooter'=>true),
  152 + ),
  153 + 'maintenance' => array(
  154 + 'file' => 'general.php',
  155 + 'regions' => array(),
  156 + 'options' => array('nofooter'=>true, 'nonavbar'=>true),
  157 + ),
  158 + 'embedded' => array(
  159 + 'theme' => 'canvas',
  160 + 'file' => 'embedded.php',
  161 + 'regions' => array(),
  162 + 'options' => array('nofooter'=>true, 'nonavbar'=>true),
  163 + ),
  164 +
  165 +);
  166 +
  167 +///////////////////////////////////////////////////////////////
  168 +// These are all of the possible layouts in Moodle. The
  169 +// simplest way to do this is to keep the theme and file
  170 +// variables the same for every layout. Including them
  171 +// all in this way allows some flexibility down the road
  172 +// if you want to add a different layout template to a
  173 +// specific page.
  174 +///////////////////////////////////////////////////////////////
  175 +
  176 +$THEME->csspostprocess = 'overlay_process_css';
  177 +
  178 +////////////////////////////////////////////////////
  179 +// Allows the user to provide the name of a function
  180 +// that all CSS should be passed to before being
  181 +// delivered.
  182 +////////////////////////////////////////////////////
  183 +
  184 +// $THEME->filter_mediaplugin_colors
  185 +
  186 +////////////////////////////////////////////////////
  187 +// Used to control the colours used in the small
  188 +// media player for the filters
  189 +////////////////////////////////////////////////////
  190 +
  191 +// $THEME->javascripts
  192 +
  193 +////////////////////////////////////////////////////
  194 +// An array containing the names of JavaScript files
  195 +// located in /javascript/ to include in the theme.
  196 +// (gets included in the head)
  197 +////////////////////////////////////////////////////
  198 +
  199 +// $THEME->javascripts_footer
  200 +
  201 +////////////////////////////////////////////////////
  202 +// As above but will be included in the page footer.
  203 +////////////////////////////////////////////////////
  204 +
  205 +// $THEME->larrow
  206 +
  207 +////////////////////////////////////////////////////
  208 +// Overrides the left arrow image used throughout
  209 +// Moodle
  210 +////////////////////////////////////////////////////
  211 +
  212 +// $THEME->rarrow
  213 +
  214 +////////////////////////////////////////////////////
  215 +// Overrides the right arrow image used throughout Moodle
  216 +////////////////////////////////////////////////////
  217 +
  218 +// $THEME->layouts
  219 +
  220 +////////////////////////////////////////////////////
  221 +// An array setting the layouts for the theme
  222 +////////////////////////////////////////////////////
  223 +
  224 +// $THEME->parents_exclude_javascripts
  225 +
  226 +////////////////////////////////////////////////////
  227 +// An array of JavaScript files NOT to inherit from
  228 +// the themes parents
  229 +////////////////////////////////////////////////////
  230 +
  231 +// $THEME->parents_exclude_sheets
  232 +
  233 +////////////////////////////////////////////////////
  234 +// An array of stylesheets not to inherit from the
  235 +// themes parents
  236 +////////////////////////////////////////////////////
  237 +
  238 +// $THEME->plugins_exclude_sheets
  239 +
  240 +////////////////////////////////////////////////////
  241 +// An array of plugin sheets to ignore and not
  242 +// include.
  243 +////////////////////////////////////////////////////
  244 +
  245 +// $THEME->renderfactory
  246 +
  247 +////////////////////////////////////////////////////
  248 +// Sets a custom render factory to use with the
  249 +// theme, used when working with custom renderers.
  250 +////////////////////////////////////////////////////
  251 +
  252 +// $THEME->resource_mp3player_colors
  253 +
  254 +////////////////////////////////////////////////////
  255 +// Controls the colours for the MP3 player
  256 +////////////////////////////////////////////////////
41 theme/overlay/lang/en/theme_overlay.php
... ... @@ -0,0 +1,41 @@
  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_overlay', language 'en', branch 'MOODLE_20_STABLE'
  20 + *
  21 + * @package moodlecore
  22 + * @copyright 2010 John Stabinger
  23 + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  24 + */
  25 +
  26 +$string['pluginname'] = 'overlay';
  27 +$string['region-side-post'] = 'Right';
  28 +$string['region-side-pre'] = 'Left';
  29 +$string['choosereadme'] = '<div class="clearfix"><div class="theme_screenshot"><h2>overlay</h2><img src="overlay/pix/screenshot.jpg" /><h3>Theme Discussion Forum:</h3><p><a href="http://moodle.org/mod/forum/view.php?id=46">http://moodle.org/mod/forum/view.php?id=46</a></p><h3>Theme Credits</h3><p><a href="http://docs.moodle.org/en/Theme_credits">http://docs.moodle.org/en/Theme_credits</a></p><h3>Theme Documentation:</h3><p><a href="http://docs.moodle.org/en/Themes">http://docs.moodle.org/en/Themes</a></p><h3>Report a bug:</h3><p><a href="http://tracker.moodle.org">http://tracker.moodle.org</a></p></div><div class="theme_description"><h2>About</h2><p>overlay is a nontraditional, three-column, fluid-width theme for Moodle. It\'s nontraditional in the sense that it uses a fresh three-column layout that displays the content to the left of both block columns.<h2>Tweaks</h2><p>This theme is built upon both Base and Canvas, two parent themes included in the Moodle core. If you want to modify this theme, we recommend that you first duplicate it, then rename it before making your changes. This will prevent your customized theme from being overwritten by future Moodle upgrades, and you\'ll still have the original files if you make a mess. More information on modifying themes can be found in the <a href="http://docs.moodle.org/en/Theme">MoodleDocs</a>.</p><h3>License</h3><p>This, and all other themes included in the Moodle core, are licensed under the <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>.</div></div>';
  30 +
  31 +// Config
  32 +
  33 +$string['linkcolor'] = 'Link Color';
  34 +$string['linkcolordesc'] = 'This sets the link color for the theme.';
  35 +$string['configtitle'] = 'Overlay settings';
  36 +$string['customcss'] = 'Custom CSS';
  37 +$string['customcssdesc'] = 'Any CSS you enter here will be added to every page allowing your to easily customise this theme.';
  38 +$string['headercolor'] = 'Headercolor';
  39 +$string['headercolordesc'] = 'Header background color.';
  40 +$string['footertext'] = 'Footertext';
  41 +$string['footertextdesc'] = 'Set a footnote or footer text.';
134 theme/overlay/layout/frontpage.php
... ... @@ -0,0 +1,134 @@
  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 +
  7 +$hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
  8 +$hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
  9 +
  10 +$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
  11 +$showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
  12 +
  13 +$custommenu = $OUTPUT->custom_menu();
  14 +$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
  15 +
  16 +$bodyclasses = array();
  17 +if ($showsidepre && !$showsidepost) {
  18 + $bodyclasses[] = 'side-pre-only';
  19 +} else if ($showsidepost && !$showsidepre) {
  20 + $bodyclasses[] = 'side-post-only';
  21 +} else if (!$showsidepost && !$showsidepre) {
  22 + $bodyclasses[] = 'content-only';
  23 +}
  24 +
  25 +if (!empty($PAGE->theme->settings->footertext)) {
  26 + $footnote = $PAGE->theme->settings->footertext;
  27 +} else {
  28 + $footnote = '<!-- There was no custom footnote set -->';
  29 +}
  30 +
  31 +echo $OUTPUT->doctype() ?>
  32 +<html <?php echo $OUTPUT->htmlattributes() ?>>
  33 +<head>
  34 + <title><?php echo $PAGE->title ?></title>
  35 + <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
  36 + <meta name="description" content="<?php echo strip_tags(format_text($SITE->summary, FORMAT_HTML)) ?>" />
  37 + <?php echo $OUTPUT->standard_head_html() ?>
  38 +</head>
  39 +
  40 +<body id="<?php echo $PAGE->bodyid ?>" class="<?php echo $PAGE->bodyclasses.' '.join(' ', $bodyclasses) ?>">
  41 +<?php echo $OUTPUT->standard_top_of_body_html() ?>
  42 +
  43 +<div id="page">
  44 +
  45 +
  46 +<!-- START OF HEADER -->
  47 + <div id="page-header">
  48 + <div id="page-header-wrapper" class="wrapper clearfix">
  49 + <?php if ($hascustommenu) { ?>
  50 + <div id="custommenu"><?php echo $custommenu; ?></div>
  51 + <?php } ?>
  52 + <div class="headermenu">
  53 + <?php
  54 + echo $OUTPUT->login_info();
  55 + echo $OUTPUT->lang_menu();
  56 + echo $PAGE->headingmenu;
  57 + ?>
  58 + </div>
  59 + </div>
  60 + </div>
  61 +<!-- END OF HEADER -->
  62 +
  63 +<!-- START OF CONTENT -->
  64 +<div id="top">
  65 +
  66 + <div id="page-content-wrapper" class="wrapper clearfix">
  67 + <div id="page-content">
  68 + <div id="region-main-box">
  69 + <div id="region-post-box">
  70 +
  71 + <div id="region-main-wrap">
  72 +
  73 + <div id="region-main">
  74 + <div id="newheader">
  75 + <div id="newheaderleft"></div>
  76 + <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
  77 +
  78 + </div>
  79 + <div class="region-content">
  80 +
  81 +
  82 +
  83 + <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
  84 + </div>
  85 + </div>
  86 + </div>
  87 +
  88 + <?php if ($hassidepre) { ?>
  89 + <div id="region-pre" class="block-region">
  90 + <div class="region-content">
  91 + <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
  92 + </div>
  93 + </div>
  94 + <?php } ?>
  95 +
  96 + <?php if ($hassidepost) { ?>
  97 + <div id="region-post" class="block-region">
  98 + <div class="region-content">
  99 + <?php echo $OUTPUT->blocks_for_region('side-post') ?>
  100 + </div>
  101 + </div>
  102 + <?php } ?>
  103 +
  104 + </div>
  105 + </div>
  106 + </div>
  107 + </div>
  108 +
  109 +</div>
  110 +<!-- END OF CONTENT -->
  111 +
  112 +
  113 +</div>
  114 +<!-- START OF FOOTER -->
  115 +
  116 + <div id="page-footer" class="wrapper2">
  117 + <p class="helplink">
  118 + <?php echo page_doc_link(get_string('moodledocslink')) ?>
  119 + </p>
  120 +
  121 + <?php echo $footnote ?>
  122 +
  123 + <?php
  124 + echo $OUTPUT->login_info();
  125 + echo $OUTPUT->home_link();
  126 + echo $OUTPUT->standard_footer_html();
  127 + ?>
  128 + </div>
  129 +
  130 +<!-- END OF FOOTER -->
  131 +
  132 +<?php echo $OUTPUT->standard_end_of_body_html() ?>
  133 +</body>
  134 +</html>
147 theme/overlay/layout/general.php
... ... @@ -0,0 +1,147 @@
  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 +
  7 +$hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
  8 +$hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
  9 +
  10 +$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
  11 +$showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
  12 +
  13 +$custommenu = $OUTPUT->custom_menu();
  14 +$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
  15 +
  16 +$bodyclasses = array();
  17 +if ($showsidepre && !$showsidepost) {
  18 + $bodyclasses[] = 'side-pre-only';
  19 +} else if ($showsidepost && !$showsidepre) {
  20 + $bodyclasses[] = 'side-post-only';
  21 +} else if (!$showsidepost && !$showsidepre) {
  22 + $bodyclasses[] = 'content-only';
  23 +}
  24 +
  25 +if (!empty($PAGE->theme->settings->footertext)) {
  26 + $footnote = $PAGE->theme->settings->footertext;
  27 +} else {
  28 + $footnote = '<!-- There was no custom footnote set -->';
  29 +}
  30 +
  31 +echo $OUTPUT->doctype() ?>
  32 +<html <?php echo $OUTPUT->htmlattributes() ?>>
  33 +<head>
  34 + <title><?php echo $PAGE->title ?></title>
  35 + <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
  36 + <meta name="description" content="<?php echo strip_tags(format_text($SITE->summary, FORMAT_HTML)) ?>" />
  37 + <?php echo $OUTPUT->standard_head_html() ?>
  38 +</head>
  39 +
  40 +<body id="<?php echo $PAGE->bodyid ?>" class="<?php echo $PAGE->bodyclasses.' '.join(' ', $bodyclasses) ?>">
  41 +<?php echo $OUTPUT->standard_top_of_body_html() ?>
  42 +
  43 +<div id="page">
  44 +
  45 +
  46 +<!-- START OF HEADER -->
  47 + <div id="page-header">
  48 + <div id="page-header-wrapper" class="wrapper clearfix">
  49 + <?php if ($hascustommenu) { ?>
  50 + <div id="custommenu"><?php echo $custommenu; ?></div>
  51 + <?php } ?>
  52 + <div class="headermenu">
  53 + <?php
  54 + echo $OUTPUT->login_info();
  55 + echo $OUTPUT->lang_menu();
  56 + echo $PAGE->headingmenu;
  57 + ?>
  58 + </div>
  59 + </div>
  60 + </div>
  61 +<!-- END OF HEADER -->
  62 +
  63 +<!-- START OF CONTENT -->
  64 +<div id="top">
  65 +
  66 + <div id="page-content-wrapper" class="wrapper clearfix">
  67 + <div id="page-content">
  68 + <div id="region-main-box">
  69 + <div id="region-post-box">
  70 +
  71 + <div id="region-main-wrap">
  72 +
  73 + <div id="region-main">
  74 + <div id="newheader">
  75 + <div id="newheaderleft"></div>
  76 + <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
  77 + <?php if ($hasnavbar) { ?>
  78 + <div class="navbutton"> <?php echo $PAGE->button; ?></div>
  79 + <?php } ?>
  80 +
  81 + </div>
  82 +
  83 + <?php if ($hasnavbar) { ?>
  84 + <div class="navbar">
  85 + <div class="wrapper clearfix">
  86 + <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
  87 +
  88 + </div>
  89 + </div>
  90 + <?php } ?>
  91 +
  92 + <div class="region-content">
  93 +
  94 +
  95 +
  96 + <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
  97 + </div>
  98 + </div>
  99 + </div>
  100 +
  101 + <?php if ($hassidepre) { ?>
  102 + <div id="region-pre" class="block-region">
  103 + <div class="region-content">
  104 + <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
  105 + </div>
  106 + </div>
  107 + <?php } ?>
  108 +
  109 + <?php if ($hassidepost) { ?>
  110 + <div id="region-post" class="block-region">
  111 + <div class="region-content">
  112 + <?php echo $OUTPUT->blocks_for_region('side-post') ?>
  113 + </div>
  114 + </div>
  115 + <?php } ?>
  116 +
  117 + </div>
  118 + </div>
  119 + </div>
  120 + </div>
  121 +
  122 +</div>
  123 +<!-- END OF CONTENT -->
  124 +
  125 +
  126 +</div>
  127 +<!-- START OF FOOTER -->
  128 +
  129 + <div id="page-footer" class="wrapper2">
  130 + <p class="helplink">
  131 + <?php echo page_doc_link(get_string('moodledocslink')) ?>
  132 + </p>
  133 +
  134 + <?php echo $footnote ?>
  135 +
  136 + <?php
  137 + echo $OUTPUT->login_info();
  138 + echo $OUTPUT->home_link();
  139 + echo $OUTPUT->standard_footer_html();
  140 + ?>
  141 + </div>
  142 +
  143 +<!-- END OF FOOTER -->
  144 +
  145 +<?php echo $OUTPUT->standard_end_of_body_html() ?>
  146 +</body>
  147 +</html>
69 theme/overlay/lib.php
... ... @@ -0,0 +1,69 @@
  1 +<?php
  2 +function overlay_set_linkcolor($css, $linkcolor) {
  3 + $tag = '[[setting:linkcolor]]';
  4 + $replacement = $linkcolor;
  5 + if (is_null($replacement)) {
  6 + $replacement = '#428ab5';
  7 + }
  8 + $css = str_replace($tag, $replacement, $css);
  9 +
  10 +
  11 + return $css;
  12 +}
  13 +
  14 +function overlay_set_headercolor($css, $headercolor) {
  15 + $tag = '[[setting:headercolor]]';
  16 + $replacement = $headercolor;
  17 + if (is_null($replacement)) {
  18 + $replacement = '#2a4c7b';
  19 + }
  20 + $css = str_replace($tag, $replacement, $css);
  21 +
  22 +
  23 + return $css;
  24 +}
  25 +
  26 +
  27 +function overlay_set_customcss($css, $customcss) {
  28 + $tag = '[[setting:customcss]]';
  29 + $replacement = $customcss;
  30 + if (is_null($replacement)) {
  31 + $replacement = '';
  32 + }
  33 + $css = str_replace($tag, $replacement, $css);
  34 + return $css;
  35 +}
  36 +
  37 +
  38 +
  39 +
  40 +
  41 +function overlay_process_css($css, $theme) {
  42 +
  43 + if (!empty($theme->settings->linkcolor)) {
  44 + $linkcolor = $theme->settings->linkcolor;
  45 + } else {
  46 + $linkcolor = null;
  47 + }
  48 + $css = overlay_set_linkcolor($css, $linkcolor);
  49 +
  50 + if (!empty($theme->settings->headercolor)) {
  51 + $headercolor = $theme->settings->headercolor;
  52 + } else {
  53 + $headercolor = null;
  54 + }
  55 + $css = overlay_set_headercolor($css, $headercolor);
  56 +
  57 + if (!empty($theme->settings->customcss)) {
  58 + $customcss = $theme->settings->customcss;
  59 + } else {
  60 + $customcss = null;
  61 + }
  62 + $css = overlay_set_customcss($css, $customcss);
  63 +
  64 + return $css;
  65 +
  66 +
  67 +
  68 +}
  69 +
BIN  theme/overlay/pix/favicon.ico
Binary file not shown
BIN  theme/overlay/pix/header.png
BIN  theme/overlay/pix/screenshot.png
40 theme/overlay/settings.php
... ... @@ -0,0 +1,40 @@
  1 +<?php
  2 +
  3 +// Create our admin page
  4 +$temp = new admin_settingpage('theme_overlay', get_string('configtitle','theme_overlay'));
  5 +
  6 +// link color setting
  7 +$name = 'theme_overlay/linkcolor';
  8 +$title = get_string('linkcolor','theme_overlay');
  9 +$description = get_string('linkcolordesc', 'theme_overlay');
  10 +$default = '#428ab5';
  11 +$previewconfig = NULL;
  12 +$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
  13 +$temp->add($setting);
  14 +
  15 +
  16 +// Tag line setting
  17 +$name = 'theme_overlay/headercolor';
  18 +$title = get_string('headercolor','theme_overlay');
  19 +$description = get_string('headercolordesc', 'theme_overlay');
  20 +$default = '#2a4c7b';
  21 +$previewconfig = NULL;
  22 +$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
  23 +$temp->add($setting);
  24 +
  25 +// Foot note setting
  26 +$name = 'theme_overlay/footertext';
  27 +$title = get_string('footertext','theme_overlay');
  28 +$description = get_string('footertextdesc', 'theme_overlay');
  29 +$setting = new admin_setting_confightmleditor($name, $title, $description, '');
  30 +$temp->add($setting);
  31 +
  32 +// Custom CSS file
  33 +$name = 'theme_overlay/customcss';
  34 +$title = get_string('customcss','theme_overlay');
  35 +$description = get_string('customcssdesc', 'theme_overlay');
  36 +$setting = new admin_setting_configtextarea($name, $title, $description, '');
  37 +$temp->add($setting);
  38 +
  39 +// Add our page to the structure of the admin tree
  40 +$ADMIN->add('themes', $temp);
257 theme/overlay/style/core.css
... ... @@ -0,0 +1,257 @@
  1 +/* Global
  2 +--------------------------*/
  3 +
  4 +body {
  5 + background: #fff;
  6 + margin: 0;
  7 + padding: 0;
  8 + color: #281f18;
  9 +}
  10 +
  11 +html {
  12 + height: 100%;
  13 +}
  14 +body {
  15 + margin: 0;
  16 + padding: 0;
  17 + height: 100%;
  18 +}
  19 +
  20 +body,h1,h2,h3,h4,h5,h6,p,ul,ol,dl,input,textarea {
  21 + font-family: 'Myriad Pro', 'Myriad', helvetica, arial, sans-serif;
  22 +}
  23 +
  24 +.wrapper {
  25 + margin: 0 35px;
  26 + min-width: 910px;
  27 +}
  28 +
  29 +a:hover,a:active {
  30 + color: #000;
  31 +}
  32 +
  33 +a img {
  34 + border: none;
  35 +}
  36 +
  37 +a:active {
  38 + outline: none;
  39 +}
  40 +
  41 +/* Header
  42 +---------------------------*/
  43 +
  44 +#page-header {
  45 + background: #333;
  46 + color: #fff;
  47 + height: 30px;
  48 + z-index: 99999;
  49 + position: relative;
  50 +}
  51 +
  52 +#page-header div.headermenu {
  53 + height: 30px;
  54 + padding-bottom: 0px;
  55 + margin-bottom: 0px;
  56 + padding-top: 0px;
  57 + margin-top: 0px;
  58 + line-height: 30px;
  59 +}
  60 +#page-header a:link,
  61 +#page-header a:visited {
  62 + color: #fff;
  63 + text-decoration: underline;
  64 +}
  65 +
  66 +
  67 +#newheader {
  68 + height: 100px;
  69 + position: relative;
  70 +}
  71 +
  72 +#newheaderleft {
  73 + height: 100px;
  74 + width: 50px;
  75 + position: absolute;
  76 + left: -50px;
  77 +}
  78 +h1.headermain {
  79 + margin-left: 0px;
  80 + padding-left: 0px;
  81 + color: #fff;
  82 + margin-top: 35px;
  83 + font-family: 'Myriad Pro', 'Myriad', helvetica, arial, sans-serif;
  84 + text-shadow: 2px 3px 3px #292929;
  85 + letter-spacing: -1px;
  86 + -webkit-text-stroke: 1px white;
  87 +}
  88 +
  89 +#region-main-box {
  90 + background: #eee;
  91 +}
  92 +
  93 +#region-post-box {
  94 + background: #fff;
  95 +}
  96 +
  97 +#page-footer {
  98 + background: #333;
  99 + color: #fff;
  100 +}
  101 +
  102 +#page-content, #region-main-box, #region-main-wrap, #page-content-wrapper, #top, div.region-content {
  103 + min-height: 100%;
  104 + position: relative;
  105 +}
  106 +
  107 +#region-main-box {
  108 + -webkit-box-shadow: 6px 0px 8px #ccc;
  109 + -moz-box-shadow: 6px 0px 8px #ccc;
  110 + box-shadow: 6px 0px 8px #ccc;
  111 + }
  112 +
  113 + #region-main {
  114 + -webkit-box-shadow: 6px 0px 8px #ccc;
  115 + -moz-box-shadow: 6px 0px 8px #ccc;
  116 + box-shadow: 6px 0px 8px #ccc;
  117 + }
  118 +
  119 +.side-pre-only #region-main, .content-only #region-main, .content-only #region-main-box {
  120 + -webkit-box-shadow: none;
  121 + -moz-box-shadow: none;
  122 + box-shadow: none;
  123 + }
  124 +
  125 +/* Navbar
  126 +--------------------------*/
  127 +
  128 +.navbar {
  129 + margin-top: 10px;
  130 +
  131 +}
  132 +
  133 +.navbar .wrapper {
  134 + margin-left: 0px !important;
  135 + padding-left: 0px !important;
  136 +
  137 +}
  138 +
  139 +.breadcrumb .sep {
  140 + color: #777;
  141 + font-size: 0.8em;
  142 +}
  143 +
  144 +.navbutton {
  145 + margin-top: 40px;
  146 + margin-right: 10px;
  147 + font-size: 12px;
  148 +}
  149 +
  150 +
  151 +/* Blocks
  152 +---------------------------*/
  153 +
  154 +.block {
  155 + border: none;
  156 + margin-bottom: 25px;
  157 +}
  158 +
  159 +.block .header {
  160 + border-bottom:none;
  161 + text-transform: uppercase;
  162 +}
  163 +
  164 +.block.hidden .header {
  165 + border-top: 1px solid #dadada;
  166 + border-bottom: 1px solid #dadada;
  167 +}
  168 +.block .title h2 {
  169 + font-weight: normal;
  170 + font-size: 1.1em;
  171 + margin: 0;
  172 +}
  173 +
  174 +.block .content {
  175 + font-size: 0.95em;
  176 +}
  177 +
  178 +.
  179 +/* Forums
  180 +---------------------------*/
  181 +
  182 +.forumpost .subject {
  183 + font-size: 1.2em;
  184 +}
  185 +
  186 +.forumpost .author {
  187 + font-size: 0.9em;
  188 +}
  189 +
  190 +.forumpost .content {
  191 + border-bottom:5px solid #aaa;
  192 + padding:5px 7px 10px 7px;
  193 +}
  194 +
  195 +.forumpost .topic {
  196 + background: #eee;
  197 + border-bottom: 1px solid #aaa;
  198 +}
  199 +
  200 +/* Course
  201 +-------------------------------*/
  202 +
  203 +.course-content .main {
  204 + border: 1px solid #eee;
  205 + background: #eee;
  206 +}
  207 +
  208 +.course-content .current {
  209 + background: #1f5480;
  210 + color: #fff;
  211 +}
  212 +
  213 +.course-content .main .content {
  214 + background: #fff;
  215 +}
  216 +
  217 +/* YUI Menu
  218 +-------------------------------*/
  219 +
  220 +#custommenu {
  221 + width: 70%;
  222 + float: left;
  223 +}
  224 +
  225 +div.yui3-menu-content {
  226 + border: none !important;
  227 +}
  228 +
  229 +.yui3-menu-content li a {
  230 + font-size: 11px;
  231 + font-weight: 200;
  232 + line-height: 30px;
  233 + text-transform: uppercase;
  234 + cursor: pointer;
  235 + border-right: none !important;
  236 + border-top: none !important;
  237 + border-bottom: none !important;
  238 + text-decoration: none !important;
  239 + margin-left: 0px !important;
  240 + padding-left: 0px !important;
  241 + margin-right: 10px !important;
  242 +}
  243 +
  244 +.yui3-menu-content li a:hover {
  245 + text-decoration: underline;
  246 +}
  247 +
  248 +div.custom_menu_submenu li a {
  249 + line-height: 30px;
  250 + text-shadow: none !important;
  251 + color: #333 !important;
  252 + margin-left: 5px !important;
  253 +}
  254 +
  255 +div.firstdockitem {
  256 + margin-top: 30px;
  257 +}
140 theme/overlay/style/pagelayout.css
... ... @@ -0,0 +1,140 @@
  1 +/** Path: theme pagelayout **/
  2 +
  3 +
  4 +
  5 +body {margin:auto 0px;width:auto; height: 100%}
  6 +#page {width:100%;overflow:hidden; min-height: 100%;}
  7 +#page-content {
  8 + clear: both;
  9 + position: relative;
  10 + width: 100%;min-height: 100%;
  11 +}
  12 +
  13 +#page-content #region-main-box {
  14 + float: left;
  15 + margin-left: -200px;
  16 + position: relative;
  17 + width: 200%;
  18 + right: 100%;min-height: 100%;
  19 +}
  20 +
  21 +#page-content #region-main-box #region-post-box {
  22 + float: left;
  23 + margin-left: -200px;
  24 + width: 100%;min-height: 100%;
  25 +}
  26 +
  27 +#page-content #region-main-box #region-post-box #region-main-wrap {
  28 + float: left;
  29 + width: 50%;min-height: 100%;
  30 +}
  31 +
  32 +#page-content #region-main-box #region-post-box #region-main-wrap #region-main {
  33 +
  34 + position: relative;
  35 + margin-left: 400px;
  36 + left: 100%;min-height: 100%;
  37 +}
  38 +
  39 +#page-content #region-main-box #region-post-box #region-pre {
  40 + float: right;
  41 + position: relative;
  42 + width: 200px;
  43 + left: 200px;
  44 + min-height: 100%;
  45 +
  46 +}
  47 +
  48 +#page-content #region-main-box #region-post-box #region-post {
  49 + float: right;
  50 + position: relative;
  51 + left: 600px;
  52 + width: 200px;min-height: 100%;
  53 +}
  54 +
  55 +#page-content #region-main-box #region-post-box #region-main-wrap #region-main .region-content {
  56 + overflow: hidden;
  57 + padding: 20px 20px 20px 0;min-height: 100%;
  58 +}
  59 +
  60 +#page-content #region-main-box #region-post-box #region-pre .region-content,
  61 +#page-content #region-main-box #region-post-box #region-post .region-content {
  62 + overflow: hidden;
  63 + padding: 20px 10px;min-height: 100%;
  64 +}
  65 +
  66 +#page-footer {
  67 + clear: both;
  68 + float: left;
  69 + width: 100%;
  70 +}
  71 +
  72 +/** Only side pre **/
  73 +
  74 +.side-pre-only #page-content #region-main-box {
  75 + margin-left: 0px;
  76 +}
  77 +
  78 +.side-pre-only #page-content #region-main-box #region-post-box {
  79 + margin-left: -200px;
  80 +}
  81 +
  82 +.side-pre-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {
  83 + margin-left: 200px;
  84 +}
  85 +
  86 +.side-pre-only #page-content #region-main-box #region-post-box #region-pre {
  87 + left: 200px;
  88 + width: 200px;
  89 +}
  90 +
  91 +.side-pre-only #page-content #region-main-box #region-post-box #region-post {
  92 + width: 0%;
  93 +}
  94 +
  95 +/** Only side post **/
  96 +
  97 +.side-post-only #page-content #region-main-box {
  98 + margin-left: 0px;
  99 +
  100 +}
  101 +
  102 +.side-post-only #page-content #region-main-box #region-post-box {
  103 + margin-left: -200px;
  104 +}
  105 +
  106 +.side-post-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {
  107 + margin-left: 200px;
  108 +
  109 +}
  110 +
  111 +.side-post-only #page-content #region-main-box #region-post-box #region-post {
  112 + left: 400px;
  113 + width: 200px;
  114 +}
  115 +
  116 +.has_dock.side-post-only .page-middle #region-main-box #region-post-box #region-main-wrap #region-main {
  117 + margin-left: 200px;
  118 +}
  119 +
  120 +/** No blocks whatsoever **/
  121 +
  122 +.content-only #page-content #region-main-box {
  123 + margin-left: 0px;
  124 +}
  125 +
  126 +.content-only #page-content #region-main-box #region-post-box {
  127 + margin-left: 0px;
  128 +}
  129 +
  130 +.content-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {
  131 + margin-left: 0px;
  132 +}
  133 +
  134 +.content-only #page-content #region-main-box #region-post-box #region-pre {
  135 + width: 0px;
  136 +}
  137 +
  138 +.content-only #page-content #region-main-box #region-post-box #region-post {
  139 + width: 0px;
  140 +}
10 theme/overlay/style/settings.css
... ... @@ -0,0 +1,10 @@
  1 +#newheaderleft, #newheader {
  2 + background: [[setting:headercolor]] url([[pix:theme|header]]) repeat-x 0 100%;
  3 +}
  4 +
  5 +a:link,a:visited {
  6 + color: [[setting:linkcolor]];
  7 +}
  8 +
  9 +/** Custom CSS **/
  10 +[[setting:customcss]]

0 comments on commit b2214c5

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