mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Updated to use the new standardsheets variable
This commit is contained in:
parent
f21330e3a0
commit
a3f293d2c8
2 changed files with 50 additions and 21 deletions
|
@ -1,18 +1,31 @@
|
||||||
<?PHP // $Id$
|
<?PHP // $Id$
|
||||||
|
|
||||||
$THEME->body = "#FFF8EF"; // Main page color
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
$THEME->cellheading = "#A7B1B7"; // Standard headings of big tables
|
/// This file contains a few configuration variables that control
|
||||||
$THEME->cellheading2 = "#849DBC"; // Highlight headings of tables
|
/// how Moodle uses this theme.
|
||||||
$THEME->cellcontent = "#FFFFFF"; // For areas with text
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
$THEME->cellcontent2 = "#A7B1B7"; // Alternate colour
|
|
||||||
$THEME->borders = "##A7B1B7"; // Table borders
|
|
||||||
$THEME->highlight = "#849DBC"; // Highlighted text (eg after a search)
|
|
||||||
$THEME->hidden = "#979EA8"; // To color things that are hidden
|
|
||||||
$THEME->autolink = "#FFF8EF"; // To color auto-generated links (eg glossary)
|
|
||||||
|
|
||||||
$THEME->custompix = false; // If true, then this theme must have a "pix"
|
$THEME->custompix = false;
|
||||||
// subdirectory that contains copies of all
|
|
||||||
// files from the moodle/pix directory
|
/// If true, then this theme must have a "pix"
|
||||||
// See "cordoroyblue" for an up-to-date example.
|
/// subdirectory that contains copies of all
|
||||||
|
/// files from the moodle/pix directory, plus a
|
||||||
|
/// "pix/mod" directory containing all the icons
|
||||||
|
/// for all the activity modules.
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
$THEME->standardsheets = array('styles_layout', 'styles_fonts', 'styles_color');
|
||||||
|
|
||||||
|
/// This variable can be set to an array containing
|
||||||
|
/// filenames from the *STANDARD* theme. If the
|
||||||
|
/// array exists, it will be used to choose the
|
||||||
|
/// files to include in the standard style sheet.
|
||||||
|
/// When false, then no files are used.
|
||||||
|
/// When true or NON-EXISTENT, then ALL standard files are used.
|
||||||
|
/// This parameter can be used, for example, to prevent
|
||||||
|
/// having to override too many classes.
|
||||||
|
/// Note that the trailing '.css' should not be included
|
||||||
|
/// eg $THEME->standardsheets = array('styles_layout', 'styles_fonts',
|
||||||
|
/// 'styles_color', 'styles_moz');
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<?PHP /* $Id$ */
|
<?PHP /* $Id$ */
|
||||||
|
|
||||||
/// We use PHP so we can do value substitutions into the styles
|
/// This PHP script is used because it provides a place for setting
|
||||||
|
/// up any necessary variables, and lets us include raw CSS files.
|
||||||
|
/// The output of this script should be a completely standard CSS file.
|
||||||
|
|
||||||
if (!isset($themename)) {
|
if (!isset($themename)) {
|
||||||
$themename = NULL;
|
$themename = NULL;
|
||||||
|
@ -8,10 +10,24 @@
|
||||||
|
|
||||||
$nomoodlecookie = true;
|
$nomoodlecookie = true;
|
||||||
require_once("../../config.php");
|
require_once("../../config.php");
|
||||||
$themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename);
|
|
||||||
|
|
||||||
include ("./styles_layout.css");
|
$subsheets = array('styles_layout', 'styles_font', 'styles_color');
|
||||||
include ("./styles_font.css");
|
|
||||||
include ("./styles_color.css");
|
/// There should be no need to touch the following
|
||||||
// include ("./styles_block.css");
|
|
||||||
?>
|
$lastmodified = filemtime('styles.php');
|
||||||
|
|
||||||
|
foreach ($subsheets as $subsheet) {
|
||||||
|
$lastmodifiedsub = filemtime($subsheet.'.css');
|
||||||
|
if ($lastmodifiedsub > $lastmodified) {
|
||||||
|
$lastmodified = $lastmodifiedsub;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$themeurl = style_sheet_setup($lastmodifiedsub, 600, $themename);
|
||||||
|
|
||||||
|
foreach ($subsheets as $subsheet) {
|
||||||
|
include_once($subsheet.'.css');
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue