Permalink
Browse files

This is in principle the theme I've shown in the forums. I changed th…

…e colors and made it XHTML 1.0 suitable. It relies on the new DIV framework I added to the course, forum and the wiki pages. The layout-table with named cells is used for the course pages.

For an overvies of the DIV framework and the DIVs in the header and footer please look at http://moodle.org/mod/wiki/view.php?id=2935&userid=0&groupid=0&wikipage=CoursePage

The CSS is not yet well structured - it's just working for a starting. For the offical release I'll have to rebuild the CSS to match the final needs. It's lacking an easy CSS for beginners too.

Please tell me, if you find some bugs or have some remarks - or if you just like it ;-)

Thank you
Urs
  • Loading branch information...
urs_hunkler
urs_hunkler committed Jan 21, 2005
1 parent f3f7d9e commit 17be5671915b05111899c92c9ca41d4dd27d2fcb
@@ -0,0 +1,18 @@
+<?PHP // $Id$
+
+$THEME->body = "#FFF8EF"; // Main page color
+$THEME->cellheading = "#A7B1B7"; // Standard headings of big tables
+$THEME->cellheading2 = "#849DBC"; // Highlight headings of tables
+$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"
+ // subdirectory that contains copies of all
+ // files from the moodle/pix directory
+ // See "cordoroyblue" for an up-to-date example.
+
+?>
View
Binary file not shown.
@@ -0,0 +1,88 @@
+<attach event="ondocumentready" handler="parseStylesheets" />
+<script language="JScript">
+/**
+ * PSUEDOS - V1.21.041022 - hover & active
+ * ---------------------------------------------
+ * Peterned - http://www.xs4all.nl/~peterned/
+ * (c) 2004 - Peter Nederlof
+ *
+ * Credits - Arnoud Berendsen
+ * - Martin Reurings
+ * for inspiring me and finding really sick bugs
+ *
+ * howto: body { behavior:url("csshover.htc"); }
+ * ---------------------------------------------
+ */
+
+var currentSheet, doc = window.document;
+var activators = {
+ onhover:{on:'onmouseover', off:'onmouseout'},
+ onactive:{on:'onmousedown', off:'onmouseup'}
+}
+
+function parseStylesheets() {
+ var sheets = doc.styleSheets, l = sheets.length;
+ for(var i=0; i<l; i++)
+ parseStylesheet(sheets[i]);
+}
+ function parseStylesheet(sheet) {
+ var l, rules, imports;
+ if(sheet.imports) {
+ imports = sheet.imports, l = imports.length;
+ for(var i=0; i<l; i++)
+ parseStylesheet(sheet.imports[i]);
+ }
+
+ rules = (currentSheet = sheet).rules, l = rules.length;
+ for(var j=0; j<l; j++) parseCSSRule(rules[j]);
+ }
+
+ function parseCSSRule(rule) {
+ var select = rule.selectorText, style = rule.style.cssText;
+ if(!(/(^|\s)(([^a]([^ ]+)?)|(a([^#.][^ ]+)+)):(hover|active)/i).test(select) || !style) return;
+
+ var pseudo = select.replace(/[^:]+:([a-z-]+).*/i, 'on$1');
+ var newSelect = select.replace(/(\.([a-z0-9_-]+):[a-z]+)|(:[a-z]+)/gi, '.$2' + pseudo);
+ var className = (/\.([a-z0-9_-]*on(hover|active))/i).exec(newSelect)[1];
+ var affected = select.replace(/:hover.*$/, '');
+ var elements = getElementsBySelect(affected);
+
+ currentSheet.addRule(newSelect, style);
+ for(var i=0; i<elements.length; i++)
+ new HoverElement(elements[i], className, activators[pseudo]);
+ }
+
+function HoverElement(node, className, events) {
+ if(!node.hovers) node.hovers = {};
+ if(node.hovers[className]) return;
+ node.hovers[className] = true;
+ node.attachEvent(events.on,
+ function() { node.className += ' ' + className; });
+ node.attachEvent(events.off,
+ function() { node.className =
+ node.className.replace(new RegExp('\\s+'+className, 'g'),''); });
+}
+
+function getElementsBySelect(rule) {
+ var parts, nodes = [doc];
+ parts = rule.split(' ');
+ for(var i=0; i<parts.length; i++) {
+ nodes = getSelectedNodes(parts[i], nodes);
+ } return nodes;
+}
+ function getSelectedNodes(select, elements) {
+ var result, node, nodes = [];
+ var classname = (/\.([a-z0-9_-]+)/i).exec(select);
+ var identify = (/\#([a-z0-9_-]+)/i).exec(select);
+ var tagName = (/^[a-z0-9]+/i).exec(select.toUpperCase()) || '*';
+ for(var i=0; i<elements.length; i++) {
+ result = elements[i].getElementsByTagName(tagName);
+ for(var j=0; j<result.length; j++) {
+ node = result[j];
+ if((identify && node.id != identify[1]) || (classname && !(new RegExp('\\b' +
+ classname[1] + '\\b').exec(node.className)))) continue;
+ nodes[nodes.length] = node;
+ }
+ } return nodes;
+ }
+</script>
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,15 @@
+
+</div> <!-- end div containerContent -->
+<!-- START OF FOOTER -->
+<div id="footer">
+<p class="logininfo"><?php echo $loggedinas ?></p>
+<p class="homelink"><?php echo $homelink ?></p>
+<p>
+<a href="http://validator.w3.org/check?verbose=1&amp;ss=1&amp;uri=<?php echo urlencode(qualified_me()) ?>"><img src="<?php echo "$CFG->wwwroot/theme/$CFG->theme" ?>/xhtml_1_0.gif" /></a>
+<a href="http://jigsaw.w3.org/css-validator/validator?uri=<?php echo urlencode(qualified_me()) ?>&warning=1&profile=css2&usermedium=all"><img src="<?php echo "$CFG->wwwroot/theme/$CFG->theme" ?>/css.gif" /></a>
+<a href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=-1&amp;url1=<?php echo urlencode(qualified_me()) ?>"><img src="<?php echo "$CFG->wwwroot/theme/$CFG->theme" ?>/section_508.gif" /></a>
+</p>
+</div>
+</div>
+</body>
+</html>
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html<?php echo $direction ?>>
+<head>
+ <?php echo $meta ?>
+ <meta name="keywords" content="moodle, <?php echo $title ?> " />
+ <title><?php echo $title ?></title>
+ <link rel="stylesheet" type="text/css" href="<?php echo $styles ?>" />
+ <link rel="shortcut icon" href="<?php echo "$CFG->wwwroot/theme/$CFG->theme" ?>/favicon.ico" />
+ <?php include("$CFG->javascript"); ?>
+</head>
+
+<body<?php
+ echo " $bodytags";
+ if ($focus) {
+ echo " onload=\"setfocus()\"";
+ }
+ echo " bgcolor=\"$THEME->body\">";
+ ?>
+
+<div id="wrapper">
+
+<?php if ($home) { // This is what gets printed on the home page only
+?>
+ <div id="header-home">
+ <div class="headermain"><?php echo $heading ?></div>
+ <div class="headermenu"><?php echo $menu ?></div>
+ </div>
+ <div class="clearer"></div>
+ <div id="nav-bar">
+ <div id="breadcrumb">&nbsp;</div>
+ <div id="navbutton">&nbsp;</div>
+ </div>
+<?php } else if ($heading) { // This is what gets printed on any other page with a heading
+?>
+ <div id="header">
+ <div class="headermain"><?php echo $heading ?></div>
+ <div class="headermenu"><?php echo $menu ?></div>
+ </div>
+<?php } ?>
+ <div class="clearer"></div>
+<?php if ($navigation) { // This is the navigation table with breadcrumbs ?>
+ <div id="nav-bar">
+ <div id="breadcrumb"><?php print_navigation("$navigation"); ?></div>
+ <div id="navbutton"><?php echo $button; ?></div>
+ </div>
+<?php } ?>
+ <div class="clearer"></div>
+ <!-- END OF HEADER -->
+ <div id="containerContent">
@@ -0,0 +1,9 @@
+*, body, p, td,
+h1, h2, h3, h4, h5, h6
+{
+ font-style:inherit;
+ font-family:inherit;
+ font-size:100%;
+ background-color:#FFFFFF;
+ color:#000000;
+}
Binary file not shown.
@@ -0,0 +1,17 @@
+<?PHP /* $Id$ */
+
+/// We use PHP so we can do value substitutions into the styles
+
+ if (!isset($themename)) {
+ $themename = NULL;
+ }
+
+ $nomoodlecookie = true;
+ require_once("../../config.php");
+ $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename);
+
+ include ("./styles_layout.css");
+ include ("./styles_typography.css");
+ include ("./styles_color.css");
+
+?>
Oops, something went wrong.

0 comments on commit 17be567

Please sign in to comment.