Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Moving XHTML_CSS_UH to orangewhite
  • Loading branch information
moodler committed Jan 28, 2005
1 parent 93dcb13 commit e768789
Show file tree
Hide file tree
Showing 15 changed files with 2,056 additions and 0 deletions.
31 changes: 31 additions & 0 deletions theme/orangewhite/config.php
@@ -0,0 +1,31 @@
<?PHP // $Id$

////////////////////////////////////////////////////////////////////////////////
/// This file contains a few configuration variables that control
/// how Moodle uses this theme.
////////////////////////////////////////////////////////////////////////////////

$THEME->custompix = false;

/// If true, then this theme must have a "pix"
/// 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');
////////////////////////////////////////////////////////////////////////////////

Binary file added theme/orangewhite/css.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
88 changes: 88 additions & 0 deletions theme/orangewhite/csshover.htc
@@ -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>
102 changes: 102 additions & 0 deletions theme/orangewhite/docstyles.php
@@ -0,0 +1,102 @@
<?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);

///
/// You can hardcode colours in this file if you
/// don't care about this.

?>
body {
background-color:#FFFFFF;
}
p, a {
font-size:90%;
}

h1, h2, h3 {
padding-left:0px;
background-color:transparent;
color:#000000;
}

h1 {
font-size:1.7em;
margin:0.5em 0 0;
}

h2 {
font-size:1.4em;
margin:0.5em 0 0;
}

h3 {
font-size:1.2em;
margin:0.5em 0 0;
}


li {
margin-bottom: 10px;
}

ul {
margin-top: 10px;
}

.question {
font-size: medium;
font-weight: bold;
border: 1px dotted;
padding: 10px;
background-color: #EEEEEE;
}

.answer {
font-size: medium;
border: none;
padding-left: 40px;
}

.normaltext {
font-size: medium;
border: none;
margin-left: 30px;
}

.answercode {
font-family: "Courier New", Courier, mono;
font-size: small;
border: none;
padding-left: 60px;
}

.questionlink {
font-size: medium;
border: none;
padding-left: 40px;
}

.examplecode {
font-family: "Courier New", Courier, mono;
font-size: small;
border: thin dashed #999999;
background-color: #FBFBFB;
margin: auto;
margin-top: 0.5em;
padding: 30px;
height: auto;
width: auto;
}

.spaced {
margin-bottom: 30px;
}
Binary file added theme/orangewhite/farbstreifen_moodle.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added theme/orangewhite/favicon.ico
Binary file not shown.
15 changes: 15 additions & 0 deletions theme/orangewhite/footer.html
@@ -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" alt="XHTML Validator" /></a>
<a href="http://jigsaw.w3.org/css-validator/validator?uri=<?php echo urlencode(qualified_me()) ?>&amp;warning=1&amp;profile=css2&amp;usermedium=all"><img src="<?php echo "$CFG->wwwroot/theme/$CFG->theme" ?>/css.gif" alt="CSS Validator" /></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" alt="Section 508 Validator" /></a>
</p>
</div>
</div>
</body>
</html>
48 changes: 48 additions & 0 deletions theme/orangewhite/header.html
@@ -0,0 +1,48 @@
<!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()\"";
};
?>

<div id="page">

<?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="content">
9 changes: 9 additions & 0 deletions theme/orangewhite/nostyle.css
@@ -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 added theme/orangewhite/section_508.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions theme/orangewhite/styles.php
@@ -0,0 +1,33 @@
<?PHP /* $Id$ */

/// 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)) {
$themename = NULL;
}

$nomoodlecookie = true;
require_once("../../config.php");

$subsheets = array('styles_layout', 'styles_font', 'styles_color');

/// There should be no need to touch the following

$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');
}

?>

0 comments on commit e768789

Please sign in to comment.