theme-splash MDL-23674 Cleanup of the themes, numerous small changes to the back end code, no notable changes to the front end.
This commit is contained in:
+30
-11
@@ -1,5 +1,28 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Config for the splash theme
|
||||
*
|
||||
* @package theme_splash
|
||||
* @copyright 2010 Caroline Kennedy of Synergy Learning
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$THEME->name = 'splash';
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
@@ -8,8 +31,8 @@ $THEME->name = 'splash';
|
||||
|
||||
|
||||
$THEME->parents = array(
|
||||
'canvas',
|
||||
'base',
|
||||
'canvas',
|
||||
'base',
|
||||
);
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
@@ -18,7 +41,11 @@ $THEME->parents = array(
|
||||
|
||||
|
||||
$THEME->sheets = array(
|
||||
'green','blue','orange','sl','ie',
|
||||
'sl',
|
||||
'green',
|
||||
'blue',
|
||||
'orange',
|
||||
'ie',
|
||||
);
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
@@ -127,12 +154,4 @@ $THEME->csspostprocess = 'splash_process_css';
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Splash Theme Specific settings for Administrators to customise
|
||||
// css.
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
$THEME->javascripts = array('styleswitcher');
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Referencing the javascript files required for theme elements.
|
||||
///////////////////////////////////////////////////////////////
|
||||
@@ -1,64 +0,0 @@
|
||||
function setActiveStyleSheet(title) {
|
||||
var i, a, main;
|
||||
for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
|
||||
if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
|
||||
a.disabled = true;
|
||||
if(a.getAttribute("title") == title) a.disabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getActiveStyleSheet() {
|
||||
var i, a;
|
||||
for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
|
||||
if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function getPreferredStyleSheet() {
|
||||
var i, a;
|
||||
for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
|
||||
if(a.getAttribute("rel").indexOf("style") != -1
|
||||
&& a.getAttribute("rel").indexOf("alt") == -1
|
||||
&& a.getAttribute("title")
|
||||
) return a.getAttribute("title");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function createCookie(name,value,days) {
|
||||
if (days) {
|
||||
var date = new Date();
|
||||
date.setTime(date.getTime()+(days*24*60*60*1000));
|
||||
var expires = "; expires="+date.toGMTString();
|
||||
}
|
||||
else expires = "";
|
||||
document.cookie = name+"="+value+expires+"; path=/";
|
||||
}
|
||||
|
||||
function readCookie(name) {
|
||||
var nameEQ = name + "=";
|
||||
var ca = document.cookie.split(';');
|
||||
for(var i=0;i < ca.length;i++) {
|
||||
var c = ca[i];
|
||||
while (c.charAt(0)==' ') c = c.substring(1,c.length);
|
||||
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
window.onload = function(e) {
|
||||
var cookie = readCookie("style");
|
||||
var title = cookie ? cookie : getPreferredStyleSheet();
|
||||
setActiveStyleSheet(title);
|
||||
}
|
||||
|
||||
window.onunload = function(e) {
|
||||
var title = getActiveStyleSheet();
|
||||
createCookie("style", title, 365);
|
||||
}
|
||||
|
||||
var cookie = readCookie("style");
|
||||
var title = cookie ? cookie : getPreferredStyleSheet();
|
||||
setActiveStyleSheet(title);
|
||||
@@ -16,30 +16,28 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Strings for component 'theme_standard', language 'en', branch 'MOODLE_20_STABLE'
|
||||
* Strings for component 'theme_splash', language 'en'
|
||||
*
|
||||
* @package theme_standard
|
||||
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
|
||||
* @copyright 2010 Caroline Kennedy of Synergy Learning
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['pluginname'] = 'Splash';
|
||||
$string['choosereadme'] = 'Splash, a Moodle 2.0 theme by Caroline Kennedy of Synergy Learning)';
|
||||
|
||||
$string['choosereadme'] = 'Splash, a Moodle 2.0 theme by Caroline Kennedy of Synergy Learning';
|
||||
$string['configtitle'] = 'Splash Theme Settings';
|
||||
$string['customcss'] = 'Custom CSS';
|
||||
$string['customcssdesc'] = 'Any CSS you enter here will be added to every page allowing your to easily customise this theme.';
|
||||
$string['defaulttagline'] = 'Virtual learning center';
|
||||
$string['footnote'] = 'Footnote';
|
||||
$string['footnotedesc'] = 'The content from this textarea will be displayed in the footer of every page. E.g: your copyright info.';
|
||||
$string['tagline'] = 'Tagline';
|
||||
$string['taglinedesc'] = 'The content from this textarea will be displayed under the Site logo on the Homepage';
|
||||
$string['hide_tagline'] = 'Hide Tagline';
|
||||
$string['hide_taglinedesc'] = 'Check this box to hide the tagline under the logo.';
|
||||
|
||||
|
||||
$string['loginhere'] = "Login here!";
|
||||
$string['logo'] = 'Logo';
|
||||
$string['logodesc'] = 'Enter the URL to an image to use as the logo for this site. E.g: http://www.yoursite.com/path/to/logo.png. The logo should be max 230px wide.';
|
||||
|
||||
|
||||
$string['welcome'] = "Welcome";
|
||||
$string['loginhere'] = "Login here!";
|
||||
$string['pluginname'] = 'Splash';
|
||||
$string['tagline'] = 'Tagline';
|
||||
$string['taglinedesc'] = 'The content from this textarea will be displayed under the Site logo on the Homepage';
|
||||
$string['usergreeting'] = 'Hi {$a}!';
|
||||
$string['welcome'] = 'Welcome, {$a}';
|
||||
+119
-190
@@ -9,7 +9,11 @@ $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
|
||||
$custommenu = $OUTPUT->custom_menu();
|
||||
$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
|
||||
|
||||
splash_check_colourswitch();
|
||||
splash_initialise_colourswitcher($PAGE);
|
||||
|
||||
$bodyclasses = array();
|
||||
$bodyclasses[] = 'splash-'.splash_get_colour();
|
||||
if ($hassidepre && !$hassidepost) {
|
||||
$bodyclasses[] = 'side-pre-only';
|
||||
} else if ($hassidepost && !$hassidepre) {
|
||||
@@ -18,219 +22,144 @@ if ($hassidepre && !$hassidepost) {
|
||||
$bodyclasses[] = 'content-only';
|
||||
}
|
||||
|
||||
if (!empty($PAGE->theme->settings->logo)) {
|
||||
$logourl = $PAGE->theme->settings->logo;
|
||||
} else {
|
||||
$logourl = NULL;
|
||||
}
|
||||
$haslogo = (!empty($PAGE->theme->settings->logo));
|
||||
$hasfootnote = (!empty($PAGE->theme->settings->footnote));
|
||||
$hidetagline = (!empty($PAGE->theme->settings->hide_tagline) && $PAGE->theme->settings->hide_tagline == 1);
|
||||
|
||||
if (!empty($PAGE->theme->settings->tagline)) {
|
||||
$tagline = $PAGE->theme->settings->tagline;
|
||||
} else {
|
||||
$tagline = "Virtual Learning Center";
|
||||
$tagline = get_string('defaulttagline', 'theme_splash');
|
||||
}
|
||||
|
||||
if (!empty($PAGE->theme->settings->footnote)) {
|
||||
$footnote = $PAGE->theme->settings->footnote;
|
||||
} else {
|
||||
$footnote = "";
|
||||
}
|
||||
|
||||
if (!empty($PAGE->theme->settings->hide_tagline) && $PAGE->theme->settings->hide_tagline == 1)
|
||||
{
|
||||
$hidetagline = $PAGE->theme->settings->hide_tagline;
|
||||
} else {
|
||||
$hidetagline = "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
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')?>" />
|
||||
<meta name="description" content="<?php echo strip_tags(format_text($SITE->summary, FORMAT_HTML)) ?>" />
|
||||
<?php echo $OUTPUT->standard_head_html() ?>
|
||||
|
||||
<link rel="alternate stylesheet" type="text/css" href="<?php echo $CFG->wwwroot .'/theme/'. current_theme() ?>/style/green.css" title="green" media="screen" />
|
||||
|
||||
<link rel="alternate stylesheet" type="text/css" href="<?php echo $CFG->wwwroot .'/theme/'. current_theme() ?>/style/blue.css" title="blue" media="screen" />
|
||||
<link rel="alternate stylesheet" type="text/css" href="<?php echo $CFG->wwwroot .'/theme/'. current_theme() ?>/style/orange.css" title="orange" media="screen" />
|
||||
|
||||
<noscript>
|
||||
<style type="text/css">
|
||||
#colourswitcher
|
||||
{
|
||||
display:none;
|
||||
}
|
||||
</style>
|
||||
</noscript>
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body id="<?php echo $PAGE->bodyid ?>" class="<?php echo $PAGE->bodyclasses.' '.join(' ', $bodyclasses) ?>">
|
||||
<?php echo $OUTPUT->standard_top_of_body_html() ?>
|
||||
|
||||
|
||||
<div id="page">
|
||||
|
||||
<?php if ($hasheading || $hasnavbar) { ?>
|
||||
<div id="page-header">
|
||||
<div id="page-header-wrapper" class="wrapper clearfix">
|
||||
<?php if ($hasheading) { ?>
|
||||
|
||||
<div id="headermenu">
|
||||
<?php
|
||||
if (isloggedin())
|
||||
{
|
||||
|
||||
echo '<div id="userdetails"><h1>Hi '.$USER->firstname.'!</h1>';
|
||||
echo '<p class="prolog"><a href="'.$CFG->wwwroot.'/user/profile.php?id='.$USER->id.'">'.get_string('myprofile').'</a> | <a href="'.$CFG->wwwroot.'/login/logout.php?sesskey='.sesskey().'">'.get_string('logout').'</a></p></div>';
|
||||
echo '<div id="userimg">'.$OUTPUT->user_picture($USER, array('size'=>55)).'</div>';
|
||||
|
||||
} else {
|
||||
echo '<div id="userdetails_loggedout"><h1>Welcome,
|
||||
<a href="'.$CFG->wwwroot.'/login/index.php?">Login here!</a></h1></div>';
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<div class="clearer"></div>
|
||||
<div id="colourswitcher" align="right">
|
||||
<ul>
|
||||
<li><img src="<?php echo $CFG->wwwroot .'/theme/'. current_theme().'/pix/colour.jpg' ?>" /></li>
|
||||
<li><a onclick="setActiveStyleSheet('sl'); return false;" href="<?php echo $CFG->wwwroot ?>" rel="sl" class="styleswitch"><img src="<?php echo $OUTPUT->pix_url('red-theme2', 'theme'); ?>" /></a></li>
|
||||
<li><a onclick="setActiveStyleSheet('green'); return false;" href="<?php echo $CFG->wwwroot ?>" rel="green" class="styleswitch"><img src="<?php echo $OUTPUT->pix_url('green-theme2', 'theme'); ?>" /></a></li>
|
||||
<li><a onclick="setActiveStyleSheet('blue'); return false;" href="<?php echo $CFG->wwwroot ?>" rel="blue" class="styleswitch"><img src="<?php echo $OUTPUT->pix_url('blue-theme2', 'theme'); ?>" /></a></li>
|
||||
<li><a onclick="setActiveStyleSheet('orange'); return false;" href="<?php echo $CFG->wwwroot?>" rel="orange" class="styleswitch"><img src="<?php echo $OUTPUT->pix_url('orange-theme2', 'theme'); ?>" /></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="logobox">
|
||||
<?php if ($logourl == NULL) { ?>
|
||||
<a class="nologoimage" href="<?php echo $CFG->wwwroot ?>">
|
||||
<?php echo $PAGE->heading ?>
|
||||
<?php } else { ?>
|
||||
<a href="<?php echo $CFG->wwwroot ?>">
|
||||
<img src="<?php echo $logourl ?>" />
|
||||
<?php } ?>
|
||||
</a>
|
||||
|
||||
<?php if ($hidetagline == 0) { ?>
|
||||
<h4><?php echo $tagline ?></h4>
|
||||
<?php } ?>
|
||||
|
||||
<?php echo $OUTPUT->standard_top_of_body_html() ?>
|
||||
<div id="page">
|
||||
<?php if ($hasheading || $hasnavbar) { ?>
|
||||
<div id="page-header">
|
||||
<div id="page-header-wrapper" class="wrapper clearfix">
|
||||
<?php if ($hasheading) { ?>
|
||||
<div id="headermenu">
|
||||
<?php if (isloggedin()) {
|
||||
echo html_writer::start_tag('div', array('id'=>'userdetails'));
|
||||
echo html_writer::tag('h1', get_string('usergreeting', 'theme_splash', $USER->firstname));
|
||||
echo html_writer::start_tag('p', array('class'=>'prolog'));
|
||||
echo html_writer::link(new moodle_url('/user/profile.php', array('id'=>$USER->id)), get_string('myprofile')).' | ';
|
||||
echo html_writer::link(new moodle_url('/login/logout.php', array('sesskey'=>sesskey())), get_string('logout'));
|
||||
echo html_writer::end_tag('p');
|
||||
echo html_writer::end_tag('div');
|
||||
echo html_writer::tag('div', $OUTPUT->user_picture($USER, array('size'=>55)), array('class'=>'userimg'));
|
||||
} else {
|
||||
echo html_writer::start_tag('div', array('id'=>'userdetails_loggedout'));
|
||||
$loginlink = html_writer::link(new moodle_url('/login/'), get_string('loginhere', 'theme_splash'));
|
||||
echo html_writer::tag('h1', get_string('welcome', 'theme_splash', $loginlink));
|
||||
echo html_writer::end_tag('div');;
|
||||
} ?>
|
||||
<div class="clearer"></div>
|
||||
<div id="colourswitcher">
|
||||
<ul>
|
||||
<li><img src="<?php echo $OUTPUT->pix_url('colour', 'theme'); ?>" alt="colour" /></li>
|
||||
<li><a href="<?php echo new moodle_url($PAGE->url, array('splashcolour'=>'red')); ?>" class="styleswitch colour-red"><img src="<?php echo $OUTPUT->pix_url('red-theme2', 'theme'); ?>" alt="red" /></a></li>
|
||||
<li><a href="<?php echo new moodle_url($PAGE->url, array('splashcolour'=>'green')); ?>" class="styleswitch colour-green"><img src="<?php echo $OUTPUT->pix_url('green-theme2', 'theme'); ?>" alt="green" /></a></li>
|
||||
<li><a href="<?php echo new moodle_url($PAGE->url, array('splashcolour'=>'blue')); ?>" class="styleswitch colour-blue"><img src="<?php echo $OUTPUT->pix_url('blue-theme2', 'theme'); ?>" alt="blue" /></a></li>
|
||||
<li><a href="<?php echo new moodle_url($PAGE->url, array('splashcolour'=>'orange')); ?>" class="styleswitch colour-orange"><img src="<?php echo $OUTPUT->pix_url('orange-theme2', 'theme'); ?>" alt="orange" /></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php echo $OUTPUT->lang_menu();?>
|
||||
</div>
|
||||
|
||||
<div class="clearer"></div>
|
||||
<?php if ($logourl == NULL) { ?>
|
||||
<h4 class="headermain inside"> </h4>
|
||||
<?php } else { ?>
|
||||
<h4 class="headermain inside"><?php echo $PAGE->heading ?></h4>
|
||||
<?php } ?>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- DROP DOWN MENU -->
|
||||
<div class="clearer"></div>
|
||||
<div id="dropdownmenu">
|
||||
<?php if ($hascustommenu) { ?>
|
||||
<div id="custommenu"><?php echo $custommenu; ?></div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="navbar">
|
||||
<div class="wrapper clearfix">
|
||||
<div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
|
||||
<div class="navbutton"> <?php echo $PAGE->button; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- END DROP DOWN MENU -->
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- END OF HEADER -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- START OF CONTENT -->
|
||||
|
||||
<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 id="logobox">
|
||||
<?php if ($haslogo) {
|
||||
echo html_writer::link(new moodle_url('/'), "<img src='".$PAGE->theme->settings->logo."' alt='logo' />");
|
||||
} else {
|
||||
echo html_writer::link(new moodle_url('/'), $PAGE->heading, array('class'=>'nologoimage'));
|
||||
} ?>
|
||||
<?php if (!$hidetagline) { ?>
|
||||
<h4><?php echo $tagline ?></h4>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
<?php if ($haslogo) { ?>
|
||||
<h4 class="headermain inside"> </h4>
|
||||
<?php } else { ?>
|
||||
<h4 class="headermain inside"><?php echo $PAGE->heading ?></h4>
|
||||
<?php } ?>
|
||||
<?php } // End of if ($hasheading)?>
|
||||
<!-- DROP DOWN MENU -->
|
||||
<div class="clearer"></div>
|
||||
<div id="dropdownmenu">
|
||||
<?php if ($hascustommenu) { ?>
|
||||
<div id="custommenu"><?php echo $custommenu; ?></div>
|
||||
<?php } ?>
|
||||
<div class="navbar">
|
||||
<div class="wrapper clearfix">
|
||||
<div class="breadcrumb"><?php if ($hasnavbar) echo $OUTPUT->navbar(); ?></div>
|
||||
<div class="navbutton"> <?php echo $PAGE->button; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($hassidepre) { ?>
|
||||
<div id="region-pre" class="block-region">
|
||||
<div class="region-content">
|
||||
<?php echo $OUTPUT->blocks_for_region('side-pre') ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?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 } ?>
|
||||
|
||||
<!-- END DROP DOWN MENU -->
|
||||
</div>
|
||||
</div>
|
||||
<?php } // if ($hasheading || $hasnavbar) ?>
|
||||
<!-- END OF HEADER -->
|
||||
<!-- START OF CONTENT -->
|
||||
<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>
|
||||
|
||||
<?php if ($hassidepre) { ?>
|
||||
<div id="region-pre" class="block-region">
|
||||
<div class="region-content">
|
||||
<?php echo $OUTPUT->blocks_for_region('side-pre') ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?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>
|
||||
<!-- END OF CONTENT -->
|
||||
<div class="clearfix"></div>
|
||||
<!-- END OF #Page -->
|
||||
</div>
|
||||
|
||||
|
||||
<!-- END OF CONTENT -->
|
||||
<div class="clearfix"></div>
|
||||
<!-- END OF #Page -->
|
||||
</div>
|
||||
|
||||
<!-- START OF FOOTER -->
|
||||
<?php if ($hasfooter) { ?>
|
||||
<div id="page-footer">
|
||||
<!-- START OF FOOTER -->
|
||||
<?php if ($hasfooter) { ?>
|
||||
<div id="page-footer">
|
||||
<div id="footer-wrapper">
|
||||
<?php if ($footnote != "") { ?>
|
||||
<div id="footnote"><?php echo $footnote; ?></div>
|
||||
<?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>
|
||||
</div>
|
||||
<?php if ($hasfootnote) { ?>
|
||||
<div id="footnote"><?php echo $PAGE->theme->settings->footnote; ?></div>
|
||||
<?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>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php echo $OUTPUT->standard_end_of_body_html() ?>
|
||||
</body>
|
||||
</html>
|
||||
+66
-1
@@ -1,5 +1,34 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Library functions for the Splash theme
|
||||
*
|
||||
* @package theme_splash
|
||||
* @copyright 2010 Caroline Kennedy of Synergy Learning
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
/**
|
||||
* Splash theme post process function for CSS
|
||||
* @param string $css Incoming CSS to process
|
||||
* @param stdClass $theme The theme object
|
||||
* @return string The processed CSS
|
||||
*/
|
||||
function splash_process_css($css, $theme) {
|
||||
|
||||
if (!empty($theme->settings->regionwidth)) {
|
||||
@@ -59,4 +88,40 @@ function splash_set_customcss($css, $customcss) {
|
||||
return $css;
|
||||
}
|
||||
|
||||
?>
|
||||
/**
|
||||
* Adds the JavaScript for the colour switcher to the page.
|
||||
*
|
||||
* The colour switcher is a YUI moodle module that is located in
|
||||
* theme/splash/yui/splash/splash.js
|
||||
*
|
||||
* @param moodle_page $page
|
||||
*/
|
||||
function splash_initialise_colourswitcher(moodle_page $page) {
|
||||
user_preference_allow_ajax_update('theme_splash_chosen_colour', PARAM_ALPHA);
|
||||
$page->requires->yui_module('moodle-theme_splash-colourswitcher', 'M.theme_splash.initColourSwitcher', array(array('div'=>'#colourswitcher')));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the colour the user has selected, or the default if they have never changed
|
||||
*
|
||||
* @param string $default The default colour to use, normally red
|
||||
* @return string The colour the user has selected
|
||||
*/
|
||||
function splash_get_colour($default='red') {
|
||||
return get_user_preferences('theme_splash_chosen_colour', $default);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the user is switching colours with a refresh (JS disabled)
|
||||
*
|
||||
* If they are this updates the users preference in the database
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function splash_check_colourswitch() {
|
||||
$changecolour = optional_param('splashcolour', null, PARAM_ALPHA);
|
||||
if (in_array($changecolour, array('red','green','blue','orange'))) {
|
||||
return set_user_preference('theme_splash_chosen_colour', $changecolour);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -1,7 +1,27 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Settings for the splash theme
|
||||
*
|
||||
* @package theme_splash
|
||||
* @copyright 2010 Caroline Kennedy of Synergy Learning
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
// Create our admin page
|
||||
@@ -18,7 +38,7 @@ $temp->add($setting);
|
||||
$name = 'theme_splash/tagline';
|
||||
$title = get_string('tagline','theme_splash');
|
||||
$description = get_string('taglinedesc', 'theme_splash');
|
||||
$setting = new admin_setting_configtextarea($name, $title, $description, 'Virtual Learning Center');
|
||||
$setting = new admin_setting_configtextarea($name, $title, $description, get_string('defaulttagline', 'theme_splash'));
|
||||
$temp->add($setting);
|
||||
|
||||
$name = 'theme_splash/hide_tagline';
|
||||
@@ -52,5 +72,4 @@ $setting = new admin_setting_configtextarea($name, $title, $description, '');
|
||||
$temp->add($setting);
|
||||
|
||||
// Add our page to the structure of the admin tree
|
||||
$ADMIN->add('themes', $temp);
|
||||
?>
|
||||
$ADMIN->add('themes', $temp);
|
||||
+53
-65
@@ -10,119 +10,107 @@
|
||||
/* Global
|
||||
------------------------*/
|
||||
|
||||
body { /* Define margins and background colour/image */
|
||||
background: url(../pix/bgblue.jpg) top left repeat-x #f4f4f4;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
|
||||
body.splash-blue { /* Define margins and background colour/image */
|
||||
background: url([[pix:theme|bgblue]]) top left repeat-x #fff;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
a:link { /* Defining all link styles*/
|
||||
color: #3d6276;
|
||||
.splash-blue a:link { /* Defining all link styles*/
|
||||
color: #3d6276;
|
||||
}
|
||||
|
||||
a:visited { /* Setting all visited link styles */
|
||||
color: #3d6276;
|
||||
.splash-blue a:visited { /* Setting all visited link styles */
|
||||
color: #3d6276;
|
||||
}
|
||||
|
||||
a:hover { /* Setting all rollover link styles */
|
||||
color: #294b5d;
|
||||
.splash-blue a:hover { /* Setting all rollover link styles */
|
||||
color: #294b5d;
|
||||
}
|
||||
|
||||
a:active { /* Setting all active link styles */
|
||||
color: #3d6276;
|
||||
.splash-blue a:active { /* Setting all active link styles */
|
||||
color: #3d6276;
|
||||
}
|
||||
|
||||
|
||||
/* Header
|
||||
-----------------------*/
|
||||
#page-header { /* Set height for header */
|
||||
.splash-blue #page-header { /* Set height for header */
|
||||
float: none;
|
||||
padding: 0;
|
||||
margin:0;
|
||||
color: #fff;
|
||||
height: 308px;
|
||||
background: url(../pix/pageheaderbgblue.jpg) top center no-repeat;
|
||||
padding: 0;
|
||||
margin:0;
|
||||
color: #fff;
|
||||
height: 308px;
|
||||
background: url([[pix:theme|pageheaderbgblue]]) top center no-repeat;
|
||||
|
||||
}
|
||||
|
||||
#logobox{ /* holder background for logo*/
|
||||
height: 185px;
|
||||
width: 252px;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
background: url(../pix/lbgv2blue.jpg) no-repeat;
|
||||
float: left;
|
||||
.splash-blue #logobox{ /* holder background for logo*/
|
||||
height: 185px;
|
||||
width: 252px;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
background: url([[pix:theme|lbgv2blue]]) no-repeat;
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
#colourswitcher p{
|
||||
color:#3d6276
|
||||
.splash-blue #colourswitcher p{
|
||||
color:#3d6276
|
||||
}
|
||||
|
||||
|
||||
/* Custom Menu
|
||||
-----------------------*/
|
||||
#custommenu .yui3-menu-content ul.first-of-type li{
|
||||
border-right: 1px solid #bfced7;
|
||||
.splash-blue #custommenu .yui3-menu-content ul.first-of-type li{
|
||||
border-right: 1px solid #bfced7;
|
||||
}
|
||||
|
||||
#custommenu div.yui3-menu.custom_menu_submenu .yui3-menu-content{
|
||||
background:#3d6276;
|
||||
border:1px solid #fff;
|
||||
color: #fff;
|
||||
.splash-blue #custommenu div.yui3-menu.custom_menu_submenu .yui3-menu-content{
|
||||
background:#3d6276;
|
||||
border:1px solid #fff;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Content
|
||||
-----------------------*/
|
||||
|
||||
.coursebox{
|
||||
padding-left:5px;
|
||||
border-bottom: 1px dashed #cbd3d6;
|
||||
|
||||
|
||||
.splash-blue .coursebox{
|
||||
padding-left:5px;
|
||||
border-bottom: 1px dashed #cbd3d6;
|
||||
}
|
||||
|
||||
ul.topics li#section-0, ul.weeks li#section-0 {
|
||||
background: #386377;
|
||||
border: 1px solid #ccc;
|
||||
|
||||
.splash-blue ul.topics li#section-0, ul.weeks li#section-0 {
|
||||
background: #386377;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
/* Sideblocks
|
||||
-----------------------*/
|
||||
|
||||
#region-pre .block .header { /*-- right block header --*/
|
||||
background: url(../pix/sbheaderbg2blue.jpg) center no-repeat;
|
||||
padding: 12px 5px 5px;
|
||||
color: #fff;
|
||||
.splash-blue #region-pre .block .header,
|
||||
.splash-blue #region-post .block .header { /*-- right block header --*/
|
||||
background: url([[pix:theme|sbheaderbg2blue]]) center no-repeat;
|
||||
padding: 12px 5px 5px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
#region-post .block .header { /*-- right block header --*/
|
||||
background: url(../pix/sbheaderbg2blue.jpg) center no-repeat;
|
||||
padding: 12px 5px 5px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Mini Calendar
|
||||
------------------------*/
|
||||
|
||||
.block .minicalendar td.weekend { /* setting weekend date colour */
|
||||
color:#3d6276;
|
||||
.splash-blue .block .minicalendar td.weekend { /* setting weekend date colour */
|
||||
color:#3d6276;
|
||||
}
|
||||
|
||||
|
||||
/* Forum
|
||||
------------------------*/
|
||||
|
||||
.forumpost .topic .subject { /* forum subject section inside topic header */
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
padding-left: 5px;
|
||||
background: #3d6276;
|
||||
color: #fff;
|
||||
.splash-blue .forumpost .topic .subject { /* forum subject section inside topic header */
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
padding-left: 5px;
|
||||
background: #3d6276;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@@ -10,123 +10,111 @@
|
||||
/* Global
|
||||
------------------------*/
|
||||
|
||||
body { /* Define margins and background colour/image */
|
||||
background: url(../pix/bggreen.jpg) top left repeat-x #f4f4f4;
|
||||
body.splash-green { /* Define margins and background colour/image */
|
||||
background: url([[pix:theme|bggreen]]) top left repeat-x #f4f4f4;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
a:link { /* Defining all link styles*/
|
||||
color: #446e4c;
|
||||
.splash-green a:link { /* Defining all link styles*/
|
||||
color: #446e4c;
|
||||
}
|
||||
|
||||
a:visited { /* Setting all visited link styles */
|
||||
color: #446e4c;
|
||||
.splash-green a:visited { /* Setting all visited link styles */
|
||||
color: #446e4c;
|
||||
}
|
||||
|
||||
a:hover { /* Setting all rollover link styles */
|
||||
color: #335a3a;
|
||||
.splash-green a:hover { /* Setting all rollover link styles */
|
||||
color: #335a3a;
|
||||
}
|
||||
|
||||
a:active { /* Setting all active link styles */
|
||||
color: #446e4c;
|
||||
.splash-green a:active { /* Setting all active link styles */
|
||||
color: #446e4c;
|
||||
}
|
||||
|
||||
/* Header
|
||||
-----------------------*/
|
||||
|
||||
#page-header { /* Set height for header */
|
||||
float: none;
|
||||
padding: 0;
|
||||
margin:0;
|
||||
color: #fff;
|
||||
height: 308px;
|
||||
background: url(../pix/pageheaderbggreen.jpg) top center no-repeat;
|
||||
|
||||
.splash-green #page-header { /* Set height for header */
|
||||
float: none;
|
||||
padding: 0;
|
||||
margin:0;
|
||||
color: #fff;
|
||||
height: 308px;
|
||||
background: url([[pix:theme|pageheaderbggreen]]) top center no-repeat;
|
||||
}
|
||||
|
||||
|
||||
#logobox{ /* holder background for logo*/
|
||||
height: 185px;
|
||||
width: 252px;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
background: url(../pix/lbgv2green.jpg) no-repeat;
|
||||
float: left;
|
||||
.splash-green #logobox{ /* holder background for logo*/
|
||||
height: 185px;
|
||||
width: 252px;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
background: url([[pix:theme|lbgv2green]]) no-repeat;
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#colourswitcher p{
|
||||
color:#446e4c;
|
||||
.splash-green #colourswitcher p{
|
||||
color:#446e4c;
|
||||
}
|
||||
|
||||
|
||||
/* Custom Menu
|
||||
-----------------------*/
|
||||
#custommenu .yui3-menu-content ul.first-of-type li{
|
||||
border-right: 1px solid #d5e1d7;
|
||||
.splash-green #custommenu .yui3-menu-content ul.first-of-type li{
|
||||
border-right: 1px solid #d5e1d7;
|
||||
}
|
||||
|
||||
#custommenu div.yui3-menu.custom_menu_submenu .yui3-menu-content{
|
||||
background:#446e4c;
|
||||
border:1px solid #fff;
|
||||
color: #fff;
|
||||
.splash-green #custommenu div.yui3-menu.custom_menu_submenu .yui3-menu-content{
|
||||
background:#446e4c;
|
||||
border:1px solid #fff;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Content
|
||||
-----------------------*/
|
||||
ul.topics li#section-0, ul.weeks li#section-0 {
|
||||
background: #386c4c;
|
||||
border: 1px solid #ccc;
|
||||
.splash-green ul.topics li#section-0, ul.weeks li#section-0 {
|
||||
background: #386c4c;
|
||||
border: 1px solid #ccc;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.coursebox{
|
||||
padding-left:5px;
|
||||
border-bottom: 1px dashed #dae0dc;
|
||||
|
||||
.splash-green .coursebox{
|
||||
padding-left:5px;
|
||||
border-bottom: 1px dashed #dae0dc;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* Sideblocks
|
||||
-----------------------*/
|
||||
|
||||
#region-pre .block .header { /*-- right block header --*/
|
||||
background: url(../pix/sbheaderbg2green.jpg) center no-repeat;
|
||||
padding: 12px 5px 5px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
#region-post .block .header { /*-- right block header --*/
|
||||
background: url(../pix/sbheaderbg2green.jpg) center no-repeat;
|
||||
padding: 12px 5px 5px;
|
||||
color: #fff;
|
||||
.splash-green #region-pre .block .header, /*-- right block header --*/
|
||||
.splash-green #region-post .block .header { /*-- right block header --*/
|
||||
background: url([[pix:theme|sbheaderbg2green]]) center no-repeat;
|
||||
padding: 12px 5px 5px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Mini Calendar
|
||||
------------------------*/
|
||||
|
||||
.block .minicalendar td.weekend { /* setting weekend date colour */
|
||||
color:#446e4c;
|
||||
.splash-green .block .minicalendar td.weekend { /* setting weekend date colour */
|
||||
color:#446e4c;
|
||||
}
|
||||
|
||||
|
||||
/* Forum
|
||||
------------------------*/
|
||||
|
||||
.forumpost .topic .subject { /* forum subject section inside topic header */
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
padding-left: 5px;
|
||||
background: #446e4c;
|
||||
color: #fff;
|
||||
.splash-green .forumpost .topic .subject { /* forum subject section inside topic header */
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
padding-left: 5px;
|
||||
background: #446e4c;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
+16
-16
@@ -11,56 +11,56 @@
|
||||
/** IE styling */
|
||||
|
||||
.ie6 .block .block_tree {
|
||||
width: 160px;
|
||||
overflow-x: scroll;
|
||||
width: 160px;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
|
||||
.ie6 .block_tree .tree_item {
|
||||
width: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ie6 #dock, .ie7 #dock, .ie8 #dock {
|
||||
position: absolute;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.ie6 #dock hr {
|
||||
display: none;
|
||||
margin: 0px;
|
||||
height: 0px;
|
||||
padding: 0px;
|
||||
display: none;
|
||||
margin: 0px;
|
||||
height: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.ie6 #dock li p {
|
||||
background-color: inherit;
|
||||
background-color: inherit;
|
||||
}
|
||||
|
||||
.ie6 #dock .bd.oversized_content .content, .ie7 #dock .bd.oversized_content .content, .ie8 #dock .bd.oversized_content .content {
|
||||
padding-bottom: 0px;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
.ie6 .block_js_expansion.mouseover .content, .ie7 .block_js_expansion.mouseover .content, .ie8 .block_js_expansion.mouseover .content {
|
||||
padding-bottom: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
.ie6 #dock .bd.oversized_content,
|
||||
.ie7 #dock .bd.oversized_content,
|
||||
.ie8 #dock .bd.oversized_content {
|
||||
width: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ie6 .red-theme, .ie6 .blue-theme, .ie6 .green-theme, .ie6 .orange-theme, .ie7 .red-theme, .ie7 .green-theme, .ie7 .blue-theme, .ie7 .orange-theme{
|
||||
margin-top:3px;
|
||||
margin-top:3px;
|
||||
}
|
||||
|
||||
.ie7 .headermain, ie8 .headermain{
|
||||
padding-left:15px;
|
||||
padding-left:15px;
|
||||
}
|
||||
|
||||
.ie7 #custommenu, ie8 #custommenu{
|
||||
padding-top: 15px;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
ie7 .loginpanel, ie8 .loginpanel{
|
||||
padding-top: 20px;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,121 +10,103 @@
|
||||
/* Global
|
||||
------------------------*/
|
||||
|
||||
body { /* Define margins and background colour/image */
|
||||
background: url(../pix/bgorange.jpg) top left repeat-x #f4f4f4;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
|
||||
body.splash-orange { /* Define margins and background colour/image */
|
||||
background: url([[pix:theme|bgorange]]) top left repeat-x #f4f4f4;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
a:link { /* Defining all link styles*/
|
||||
color: #7c7165;
|
||||
.splash-orange a:link { /* Defining all link styles*/
|
||||
color: #7c7165;
|
||||
}
|
||||
|
||||
a:visited { /* Setting all visited link styles */
|
||||
color: #7c7165;
|
||||
.splash-orange a:visited { /* Setting all visited link styles */
|
||||
color: #7c7165;
|
||||
}
|
||||
|
||||
a:hover { /* Setting all rollover link styles */
|
||||
color: #5f564c;
|
||||
.splash-orange a:hover { /* Setting all rollover link styles */
|
||||
color: #5f564c;
|
||||
}
|
||||
|
||||
a:active { /* Setting all active link styles */
|
||||
color: #7c7165;
|
||||
.splash-orange a:active { /* Setting all active link styles */
|
||||
color: #7c7165;
|
||||
}
|
||||
|
||||
|
||||
/* Header
|
||||
-----------------------*/
|
||||
|
||||
#page-header { /* Set height for header */
|
||||
float: none;
|
||||
padding: 0;
|
||||
margin:0;
|
||||
color: #fff;
|
||||
height: 308px;
|
||||
background: url(../pix/pageheaderbgorange.jpg) top center no-repeat;
|
||||
|
||||
.splash-orange #page-header { /* Set height for header */
|
||||
float: none;
|
||||
padding: 0;
|
||||
margin:0;
|
||||
color: #fff;
|
||||
height: 308px;
|
||||
background: url([[pix:theme|pageheaderbgorange]]) top center no-repeat;
|
||||
}
|
||||
|
||||
#logobox{ /* holder background for logo*/
|
||||
height: 185px;
|
||||
width: 252px;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
background: url(../pix/lbgv2orange.jpg) no-repeat;
|
||||
float: left;
|
||||
.splash-orange #logobox{ /* holder background for logo*/
|
||||
height: 185px;
|
||||
width: 252px;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
background: url([[pix:theme|lbgv2orange]]) no-repeat;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#colourswitcher p{
|
||||
color: #cb8f47;
|
||||
.splash-orange #colourswitcher p{
|
||||
color: #cb8f47;
|
||||
}
|
||||
|
||||
|
||||
/* Custom Menu
|
||||
-----------------------*/
|
||||
#custommenu .yui3-menu-content ul.first-of-type li{
|
||||
border-right: 1px solid #dbcfc0;
|
||||
.splash-orange #custommenu .yui3-menu-content ul.first-of-type li{
|
||||
border-right: 1px solid #dbcfc0;
|
||||
}
|
||||
|
||||
#custommenu div.yui3-menu.custom_menu_submenu .yui3-menu-content{
|
||||
background:#cb8f47;
|
||||
border:1px solid #fff;
|
||||
color: #fff;
|
||||
.splash-orange #custommenu div.yui3-menu.custom_menu_submenu .yui3-menu-content{
|
||||
background:#cb8f47;
|
||||
border:1px solid #fff;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Content
|
||||
-----------------------*/
|
||||
ul.topics li#section-0, ul.weeks li#section-0 {
|
||||
background: #df9a55;
|
||||
border: 1px solid #ccc;
|
||||
|
||||
.splash-orange ul.topics li#section-0, ul.weeks li#section-0 {
|
||||
background: #df9a55;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.coursebox{
|
||||
padding-left:5px;
|
||||
border-bottom: 1px dashed #f0e7de;
|
||||
|
||||
|
||||
.splash-orange .coursebox{
|
||||
padding-left:5px;
|
||||
border-bottom: 1px dashed #f0e7de;
|
||||
}
|
||||
|
||||
/* Sideblocks
|
||||
-----------------------*/
|
||||
|
||||
#region-pre .block .header { /*-- right block header --*/
|
||||
background: url(../pix/sbheaderbg2orange.jpg) center no-repeat;
|
||||
padding: 12px 5px 5px;
|
||||
color: #fff;
|
||||
.splash-orange #region-pre .block .header, /*-- right block header --*/
|
||||
.splash-orange #region-post .block .header { /*-- right block header --*/
|
||||
background: url([[pix:theme|sbheaderbg2orange]]) center no-repeat;
|
||||
padding: 12px 5px 5px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
#region-post .block .header { /*-- right block header --*/
|
||||
background: url(../pix/sbheaderbg2orange.jpg) center no-repeat;
|
||||
padding: 12px 5px 5px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
/* Mini Calendar
|
||||
------------------------*/
|
||||
|
||||
.block .minicalendar td.weekend { /* setting weekend date colour */
|
||||
color:#cb8f47;
|
||||
.splash-orange .block .minicalendar td.weekend { /* setting weekend date colour */
|
||||
color:#cb8f47;
|
||||
}
|
||||
|
||||
/* Forum
|
||||
------------------------*/
|
||||
|
||||
.forumpost .topic .subject { /* forum subject section inside topic header */
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
padding-left: 5px;
|
||||
background: #cb8f47;
|
||||
color: #fff;
|
||||
.splash-orange .forumpost .topic .subject { /* forum subject section inside topic header */
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
padding-left: 5px;
|
||||
background: #cb8f47;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
+359
-401
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,63 @@
|
||||
YUI.add('moodle-theme_splash-colourswitcher', function(Y) {
|
||||
|
||||
// Available colours
|
||||
var COLOURS = ['red','green','blue','orange'];
|
||||
|
||||
/**
|
||||
* Splash theme colour switcher class.
|
||||
* Initialise this class by calling M.theme_splash.init
|
||||
*/
|
||||
var ColourSwitcher = function() {
|
||||
ColourSwitcher.superclass.constructor.apply(this, arguments);
|
||||
}
|
||||
ColourSwitcher.prototype = {
|
||||
/**
|
||||
* Constructor for this class
|
||||
* @param {object} config
|
||||
*/
|
||||
initializer : function(config) {
|
||||
var i, c;
|
||||
// Attach events to the links to change colours so we can do it with
|
||||
// JavaScript without refreshing the page
|
||||
for (i in COLOURS) {
|
||||
c = COLOURS[i];
|
||||
// Check if this is the current colour
|
||||
if (Y.one(document.body).hasClass('splash-'+c)) {
|
||||
this.set('colour', c);
|
||||
}
|
||||
Y.all(config.div+' .colour-'+c).on('click', this.setColour, this, c);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Sets the colour being used for the splash theme
|
||||
* @param {Y.Event} e The event that fired
|
||||
* @param {string} colour The new colour
|
||||
*/
|
||||
setColour : function(e, colour) {
|
||||
// Prevent the event from refreshing the page
|
||||
e.preventDefault();
|
||||
// Switch over the CSS classes on the body
|
||||
Y.one(document.body).replaceClass('splash-'+this.get('colour'), 'splash-'+colour);
|
||||
// Update the current colour
|
||||
this.set('colour', colour);
|
||||
// Store the users selection (Uses AJAX to save to the database)
|
||||
M.util.set_user_preference('theme_splash_chosen_colour', colour);
|
||||
}
|
||||
}
|
||||
// Make the colour switcher a fully fledged YUI module
|
||||
Y.extend(ColourSwitcher, Y.Base, ColourSwitcher.prototype, {
|
||||
NAME : 'Splash theme colour switcher',
|
||||
ATTRS : {
|
||||
colour : {
|
||||
value : 'red'
|
||||
}
|
||||
}
|
||||
});
|
||||
// Our splash theme namespace
|
||||
M.theme_splash = M.theme_splash || {}
|
||||
// Initialisation function for the colour switcher
|
||||
M.theme_splash.initColourSwitcher = function(cfg) {
|
||||
return new ColourSwitcher(cfg);
|
||||
}
|
||||
|
||||
}, '@VERSION@', {requires:['base','node']});
|
||||
Reference in New Issue
Block a user