]> git.mjollnir.org Git - moodle.git/commitdiff
theme-anomaly MDL-20175 Updated anomaly theme to work with Moodle 2.0
authorSam Hemelryk <sam@moodle.com>
Thu, 24 Dec 2009 03:06:39 +0000 (03:06 +0000)
committerSam Hemelryk <sam@moodle.com>
Thu, 24 Dec 2009 03:06:39 +0000 (03:06 +0000)
It is still along way off finished however I will wait until the remaining theme changes are complete before fixing remaining issues.

37 files changed:
theme/anomaly/changelog.txt [deleted file]
theme/anomaly/config.php
theme/anomaly/footer.html [deleted file]
theme/anomaly/header.html [deleted file]
theme/anomaly/lang/en_utf8/theme_anomaly.php [new file with mode: 0644]
theme/anomaly/layout/general.php [new file with mode: 0644]
theme/anomaly/layout/home.php [new file with mode: 0644]
theme/anomaly/meta.php [deleted file]
theme/anomaly/pix/favicon.ico [moved from theme/anomaly/favicon.ico with 100% similarity]
theme/anomaly/pix/footer_b.jpg [moved from theme/anomaly/images/footer_b.jpg with 100% similarity]
theme/anomaly/pix/footer_l.jpg [moved from theme/anomaly/images/footer_l.jpg with 100% similarity]
theme/anomaly/pix/footer_r.jpg [moved from theme/anomaly/images/footer_r.jpg with 100% similarity]
theme/anomaly/pix/header_l.jpg [moved from theme/anomaly/images/header_l.jpg with 100% similarity]
theme/anomaly/pix/header_r.jpg [moved from theme/anomaly/images/header_r.jpg with 100% similarity]
theme/anomaly/pix/header_t.jpg [moved from theme/anomaly/images/header_t.jpg with 100% similarity]
theme/anomaly/pix/logo.jpg [moved from theme/anomaly/images/logo.jpg with 100% similarity]
theme/anomaly/pix/screenshot.jpg [moved from theme/anomaly/screenshot.jpg with 100% similarity]
theme/anomaly/pix/sideblock-y_b.jpg [moved from theme/anomaly/images/sideblock-y_b.jpg with 100% similarity]
theme/anomaly/pix/sideblock-y_t.jpg [moved from theme/anomaly/images/sideblock-y_t.jpg with 100% similarity]
theme/anomaly/pix/sideblock_b.jpg [moved from theme/anomaly/images/sideblock_b.jpg with 100% similarity]
theme/anomaly/pix/sideblock_t.jpg [moved from theme/anomaly/images/sideblock_t.jpg with 100% similarity]
theme/anomaly/pix/source_anomaly.png [moved from theme/anomaly/images/source_anomaly.png with 100% similarity]
theme/anomaly/pix/wrapper_b.jpg [moved from theme/anomaly/images/wrapper_b.jpg with 100% similarity]
theme/anomaly/pix/wrapper_bl.jpg [moved from theme/anomaly/images/wrapper_bl.jpg with 100% similarity]
theme/anomaly/pix/wrapper_br.jpg [moved from theme/anomaly/images/wrapper_br.jpg with 100% similarity]
theme/anomaly/pix/wrapper_l.jpg [moved from theme/anomaly/images/wrapper_l.jpg with 100% similarity]
theme/anomaly/pix/wrapper_r.jpg [moved from theme/anomaly/images/wrapper_r.jpg with 100% similarity]
theme/anomaly/pix/wrapper_t.jpg [moved from theme/anomaly/images/wrapper_t.jpg with 100% similarity]
theme/anomaly/pix/wrapper_tl.jpg [moved from theme/anomaly/images/wrapper_tl.jpg with 100% similarity]
theme/anomaly/pix/wrapper_tr.jpg [moved from theme/anomaly/images/wrapper_tr.jpg with 100% similarity]
theme/anomaly/style/styles.css [moved from theme/anomaly/styles.css with 91% similarity]
theme/anomaly/style/styles_ie6.css [moved from theme/anomaly/styles_ie6.css with 100% similarity, mode: 0644]
theme/anomaly/style/styles_ie7.css [moved from theme/anomaly/styles_ie7.css with 100% similarity, mode: 0644]
theme/anomaly/style/styles_layout.css [new file with mode: 0644]
theme/anomaly/style/styles_select.css [new file with mode: 0644]
theme/anomaly/styles.php [deleted file]
theme/anomaly/styles_select.css [deleted file]

diff --git a/theme/anomaly/changelog.txt b/theme/anomaly/changelog.txt
deleted file mode 100644 (file)
index e69de29..0000000
index d2a58404f86775b88cce4c14266e320978240e8b..b9fee81f003d935bea381b485685e14b69222cf8 100644 (file)
@@ -5,31 +5,14 @@
 /// how Moodle uses this theme.
 ////////////////////////////////////////////////////////////////////////////////
 
+$THEME->name = 'anomaly';
 
-$THEME->sheets = array('styles', 'styles_select');
-
+$THEME->sheets = array('styles', 'styles_layout', 'styles_select');
 /// This variable is an array containing the names of all the
 /// stylesheet files you want included in this theme, and in what order
 ////////////////////////////////////////////////////////////////////////////////
 
-
-$THEME->standardsheets = true;
-
-/// 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');
-////////////////////////////////////////////////////////////////////////////////
-
-
-$THEME->parent = '';
-
+$THEME->parents = array('standard');
 /// This variable can be set to the name of a parent theme
 /// which you want to have included before the current theme.
 /// This can make it easy to make modifications to another
@@ -38,76 +21,12 @@ $THEME->parent = '';
 /// is not used.
 ////////////////////////////////////////////////////////////////////////////////
 
-
-$THEME->parentsheets = false;
-
-/// This variable can be set to an array containing
-/// filenames from a chosen *PARENT* 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->parentsheets = array('styles_layout','styles_fonts','styles_color');
-////////////////////////////////////////////////////////////////////////////////
-
-$THEME->pluginsheets = array('mod', 'block', 'format', 'gradereport');
-
-/// All the plugins of the given types will be searched for a file called
-/// styles.php and, if found, these will be included with the CSS for this theme.
-
-
-$THEME->metainclude = false;
-
-/// When this is enabled (or not set!) then Moodle will try
-/// to include a file meta.php from this theme into the
-/// <head></head> part of the page.
-
-
-$THEME->standardmetainclude = true;
-
-
-/// When this is enabled (or not set!) then Moodle will try
-/// to include a file meta.php from the standard theme into the
-/// <head></head> part of the page.
-
-
-$THEME->parentmetainclude = false;
-
-/// When this is enabled (or not set!) then Moodle will try
-/// to include a file meta.php from the parent theme into the
-/// <head></head> part of the page.
-
-
-$THEME->block_l_max_width = 200;
-$THEME->block_r_max_width = 200;
-/// Deprecated, but needed until this themes is updated to use layout.php
-
-
-$THEME->navmenuwidth = 50;
-
-/// You can use this to control the cutoff point for strings
-/// in the navmenus (list of activities in popup menu etc)
-/// Default is 50 characters wide.
-
-
-$THEME->makenavmenulist = false;
-
-/// By setting this to true, then you will have access to a
-/// new variable in your header.html and footer.html called
-/// $navmenulist ... this contains a simple XHTML menu of
-/// all activities in the current course, mostly useful for
-/// creating popup navigation menus and so on.
-
-
+$THEME->parents_exclude_sheets = array('standard'=>array('styles_moz'));
 
 $THEME->resource_mp3player_colors =
  'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
  'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
  'font=Arial&fontColour=3333FF&buffer=10&waitForPlay=no&autoPlay=yes';
-
 /// With this you can control the colours of the "big" MP3 player
 /// that is used for MP3 resources.
 
@@ -116,31 +35,81 @@ $THEME->filter_mediaplugin_colors =
  'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
  'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
  'waitForPlay=yes';
-
 /// ...And this controls the small embedded player
 
-
-$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->rarrow = '&#x25BA;' //OR '&rarr;';
-///$THEME->larrow = '&#x25C4;' //OR '&larr;';
-///$CFG->block_search_button = link_arrow_right(get_string('search'), $url='', $accesshide=true);
-///
-/// Accessibility: Right and left arrow-like characters are
-/// used in the breadcrumb trail, course navigation menu
-/// (previous/next activity), calendar, and search forum block.
-///
-/// If the theme does not set characters, appropriate defaults
-/// are set by (lib/weblib.php:check_theme_arrows). The suggestions
-/// above are 'silent' in a screen-reader like JAWS. Please DO NOT
-/// use &lt; &gt; &raquo; - these are confusing for blind users.
-////////////////////////////////////////////////////////////////////////////////
-
-
+$THEME->editor_sheets = array('styles_tinymce');
+
+$THEME->layouts = array(
+    // Most pages - if we encounter an unknown or a missing page type, this one is used.
+    'normal' => array(
+        'theme' => 'anomaly',
+        'file' => 'general.php',
+        'regions' => array('side-pre', 'side-post'),
+        'defaultregion' => 'side-post'
+    ),
+    // Course page
+    'course' => array(
+        'theme' => 'anomaly',
+        'file' => 'general.php',
+        'regions' => array('side-pre', 'side-post'),
+        'defaultregion' => 'side-post'
+    ),
+    // The site home page.
+    'home' => array(
+        'theme' => 'anomaly',
+        'file' => 'home.php',
+        'regions' => array('side-pre', 'side-post'),
+        'defaultregion' => 'side-post'
+    ),
+    // Server administration scripts.
+    'admin' => array(
+        'theme' => 'anomaly',
+        'file' => 'general.php',
+        'regions' => array('side-pre'),
+        'defaultregion' => 'side-pre'
+    ),
+    // My moodle page
+    'my' => array(
+        'theme' => 'anomaly',
+        'file' => 'general.php',
+        'regions' => array('side-pre', 'side-post'),
+        'defaultregion' => 'side-post'
+    ),
+
+    // Settings form pages, like course of module settings.
+    'form' => array(
+        'theme' => 'anomaly',
+        'file' => 'general.php',
+        'regions' => array(),
+    ),
+    // Pages that appear in pop-up windows - no navigation, no blocks, no header.
+    'popup' => array(
+        'theme' => 'anomaly',
+        'file' => 'general.php',
+        'regions' => array(),
+        'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>true),
+    ),
+    // No blocks and minimal footer - used for legacy frame layouts only!
+    'frametop' => array(
+        'theme' => 'anomaly',
+        'file' => 'general.php',
+        'regions' => array(),
+        'options' => array('nofooter', 'noblocks'=>true),
+    ),
+    // Embeded pages, like iframe embeded in moodleform
+    'embedded' => array(
+        'theme' => 'anomaly',
+        'file' => 'general.php',
+        'regions' => array(),
+        'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>true),
+    ),
+    // Used during upgrade and install, and for the 'This site is undergoing maintenance' message.
+    // This must not have any blocks, and it is good idea if it does not have links to
+    // other places - for example there should not be a home link in the footer...
+    'maintenance' => array(
+        'theme' => 'anomaly',
+        'file' => 'general.php',
+        'regions' => array(),
+        'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>true),
+    ),
+);
\ No newline at end of file
diff --git a/theme/anomaly/footer.html b/theme/anomaly/footer.html
deleted file mode 100644 (file)
index 2f9d6f9..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-<?php
-
-    echo $OUTPUT->container_end(); // content container
-
-    echo $OUTPUT->container_start('footer');
-
-?>
-
-<div id="footer-b" class="clearfix">
-    <div id="footer-l">
-        <div id="footer-r">
-            <div id="footer-m" class="clearfix">
-
-                <div id="footer-logo">
-                    <a href="http://moodle.org" target="_blank"><img src="<?php echo $CFG->themewww .'/'. current_theme() ?>/images/logo.jpg" title="Moodle <?php echo $CFG->release ?>" /></a>
-                </div>
-
-                <div id="footer-helplink">
-                    <?php echo page_doc_link(get_string('moodledocslink')); ?>
-                </div>
-
-                <div id="footer-loggedinas">
-                    <?php echo $loggedinas; ?>
-                </div>
-
-            </div>
-        </div>
-    </div>
-</div>
-<?php echo $OUTPUT->container_end(); ?>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</div> <!-- end #page -->
-<?php if (!empty($performanceinfo)) {
-        echo $performanceinfo;
-    }
-
-    if (debugging()) {
-        echo '<div class="performanceinfo">This page is: ' . $this->page->debug_summary() . '</div>';
-    }
-    if (debugging()) { ?>
-            <div class="validators"><ul>
-          <li><a href="http://validator.w3.org/check?verbose=1&amp;ss=1&amp;uri=<?php echo urlencode(qualified_me()) ?>">Validate HTML</a></li>
-          <li><a href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=-1&amp;url1=<?php echo urlencode(qualified_me()) ?>">Section 508 Check</a></li>
-          <li><a href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=0&amp;warnp2n3e=1&amp;url1=<?php echo urlencode(qualified_me()) ?>">WCAG 1 (2,3) Check</a></li>
-        </ul></div>
-<?php } ?>
-
-<script type="text/javascript" charset="utf-8">
-/* <![CDATA[ */
-    var CSSClass={};CSSClass.is=function(e,c){if(typeof e=="string")e=document.getElementById(e);var classes=e.className;if(!classes)return false;if(classes==c)return true;return e.className.search("\\b"+c+"\\b")!=-1;};CSSClass.add=function(e,c){if(typeof e=="string")e=document.getElementById(e);if(CSSClass.is(e,c))return;if(e.className)c=" "+c;e.className+=c;};CSSClass.remove=function(e,c){if(typeof e=="string")e=document.getElementById(e);e.className=e.className.replace(new RegExp("\\b"+c+"\\b\\s*","g"),"");};
-
-    var jsscript = {
-
-        corrections: function () {
-
-            // check for layouttabel and add haslayouttable class to body
-            function setbodytag () {
-                var bd = document.getElementsByTagName('body')[0];
-                if (bd) {
-                    var tagname = 'nolayouttable';
-                    if (document.getElementById('middle-column')) {
-                        var lc = document.getElementById('left-column');
-                        var rc = document.getElementById('right-column');
-                        if ( lc && rc ) {
-                            tagname = 'haslayouttable rightandleftcolumn';
-                        } else if (lc) {
-                            tagname = 'haslayouttable onlyleftcolumn';
-                        } else if (rc) {
-                            tagname = 'haslayouttable onlyrightcolumn';
-                        } else {
-                            tagname = 'haslayouttable onlymiddlecolumn';
-                        }
-                    }
-                    CSSClass.add(bd, tagname);
-                } else {
-                    setTimeout(function() { setbodytag() }, 10);
-                }
-            };
-
-            setbodytag();
-        },
-
-        init: function() {
-            jsscript.corrections();
-        }
-    };
-
-    jsscript.init();
-/* ]]> */
-</script>
-
-</body>
-</html>
diff --git a/theme/anomaly/header.html b/theme/anomaly/header.html
deleted file mode 100644 (file)
index 6754ecd..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html<?php echo $direction ?>>
-<head>
-    <?php echo $meta ?>
-    <meta name="keywords" content="moodle, <?php echo $title ?> " />
-    <title><?php echo $title ?></title>
-    <link rel="shortcut icon" href="<?php echo $CFG->themewww .'/'. current_theme() ?>/favicon.ico" />
-    <?php include("$CFG->javascript"); ?>
-</head>
-
-<body<?php
-    echo " $bodytags";
-    if ($focus) {
-        echo " onload=\"setfocus()\"";
-    }
-    ?>>
-
-<div id="page">
-
-<!-- First, let's wrap the sides -->
-    <div id="wrapper-t">
-        <div id="wrapper-l">
-            <div id="wrapper-r">
-                <div id="wrapper-b">
-
-                <!-- Now, let's cap the corners -->
-
-                    <div id="wrapper-tl">
-                        <div id="wrapper-tr">
-                            <div id="wrapper-bl">
-                                <div id="wrapper-br">
-
-<?php //Accessibility: 'headermain' is now H1, see theme/standard/styles_layout.css: .headermain
-      if ($home) {  // This is what gets printed on the home page only
-?>
-    <?php echo $OUTPUT->container_start('clearfix header-home'); ?>
-
-    <div id="header-t">
-        <div id="header-r">
-            <div id="header-l">
-                <div id="header-m" class="clearfix home">
-                    <h1 class="headermain"><?php echo $heading ?><br />
-                    <span><?php echo $COURSE->summary //Retrieves Site Description from Front Page -> Front Page Settings ?></span>
-                        </h1>
-                <div class="headermenu"><?php echo $menu ?></div>
-                  </div>
-            </div>
-        </div>
-    </div>
-
-    <?php echo $OUTPUT->container_end(); ?>
-<?php } else if ($heading) {  // This is what gets printed on any other page with a heading
-?>
-    <?php echo $OUTPUT->container_start('clearfix header'); ?>
-    <div id="header-t">
-        <div id="header-r">
-            <div id="header-l">
-                <div id="header-m" class="clearfix">
-                <h1 class="headermain"><?php echo $heading ?></h1>
-                <div class="headermenu"><?php echo $menu ?></div>
-                    </div>
-                </div>
-            </div>
-        </div>
-    <?php echo $OUTPUT->container_end(); ?>
-<?php } ?>
-<?php //Accessibility: breadcrumb trail/navbar now a DIV, not a table.
-      if ($navigation) { // This is the navigation bar with breadcrumbs  ?>
-    <div class="navbar clearfix">
-        <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
-        <div class="navbutton"><?php echo $button; ?></div>
-    </div>
-<?php } else if ($heading) { // If no navigation, but a heading, then print a line
-?>
-<?php } ?>
-    <!-- END OF HEADER -->
-    <?php echo $OUTPUT->container_start('content'); ?>
diff --git a/theme/anomaly/lang/en_utf8/theme_anomaly.php b/theme/anomaly/lang/en_utf8/theme_anomaly.php
new file mode 100644 (file)
index 0000000..0d62e96
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+
+$string['choosereadme'] = '<div style=\"text-align:center;\">
+<h2 style=\"margin-bottom:2px;\">Anomaly Theme Pack</h2>
+<h3 style=\"margin:0\">by <a href=\"http://newschoollearning.com\" title=\"NewSchool Learning: Standards Based Moodle Designs\">Patrick Malley</a></h3><h4 style=\"margin:3px\">Version: 20090119</h4>
+</div>
+<div>&nbsp;
+</div>
+<h3 style=\"margin-bottom:5px; margin-top:5px;\">Changing Your Color Preference</h3>
+<p>To assist you in making color changes, I have separated all color attributes into separate CSS documents named styles_[color].css where [color] is actually the name of the different color variants.</p>
+<p>The default color for this theme is green. To select a different color variant: </p>
+<ol>
+<li>Remane styles_select.css to styles_green.css.</li>
+<li>Rename the styles_[color].css variant that you would like to use to styles_select.css.</li>
+<li>That\'s it. Where you expecting something trickier?</li>
+</ol>
+<h3 style=\"margin-bottom:5px; margin-top:5px;\">Editing your Site Tagline</h3>
+<p>This theme uses PHP code in header.html that automatically pulls the site description that you have entered in Admin > Front page > Front page settings and places it directly below your site name at the top of the front page.</p>
+<p>Here\'s the code in header.html that is responsible for this (highlighted in red; found on line 58):</p>
+<code style=\"display:block; padding:10px; margin:10px; background:#f6f6f6; border:1px solid #eee;\">
+    &lt;h1 class=&quot;headermain&quot;&gt;&lt;?php echo \$heading ?&gt;<span style=\"color:#ff0000\">&lt;br /&gt;&lt;span&gt;&lt;?php echo \$COURSE-&gt;summary //Retrieves Site Description from Front Page -&gt; Front Page Settings ?&gt;&lt;/span&gt;</span>&lt;/h1&gt;
+</code>
+<p>If you don\'t want to show a tagline, simply delete the code highlighted in red above from header.html and save.</p>
+<p>If you want to show a tagline, BUT would prefer your tagline to be something other than your site description, you can manually enter your Tagline into header.html in the same sort of way.</p>
+<p>For example, if I wanted to display my tagline - Standards Based Moodle Designs - I would edit the above code as follows:</p>
+<code style=\"display:block; padding:10px; margin:10px; background:#f6f6f6; border:1px solid #eee;\">
+&lt;h1 class=&quot;headermain&quot;&gt;&lt;?php echo \$heading ?&gt;&lt;br /&gt;&lt;span&gt;<span style=\"color:#ff0000;\">Standards Based Moodle Designs</span>&lt;/span&gt;&lt;/h1&gt;
+</code>
+<h3 style=\"margin-bottom:5px; margin-top:5px;\">Licensing</h3>
+<p>This theme is licensed under <a href=\"http://docs.moodle.org/en/License\">Moodle\'s GNU General Public License</a>. Feel free to use it, share it and edit it as you see fit. All that I ask is that you give me credit for the work, and do not ever take credit for making it yourself.</p>
+<p>Please enjoy the theme.</p>';
\ No newline at end of file
diff --git a/theme/anomaly/layout/general.php b/theme/anomaly/layout/general.php
new file mode 100644 (file)
index 0000000..c16a7f0
--- /dev/null
@@ -0,0 +1,153 @@
+<?php
+
+$regionsinfo = 'pagelayout';
+if ($PAGE->blocks->region_has_content('side-pre', $OUTPUT)) {
+    $regionsinfo .= '-pre';
+}
+if ($PAGE->blocks->region_has_content('side-post', $OUTPUT)) {
+    $regionsinfo .= '-post';
+}
+
+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')?>" />
+    <?php echo $OUTPUT->standard_head_html() ?>
+</head>
+<body id="<?php echo $PAGE->pagetype ?>" class="<?php echo $PAGE->bodyclasses ?>">
+<?php echo $OUTPUT->standard_top_of_body_html(); ?>
+<div id="page" class="<?php echo $regionsinfo ?>">
+<!-- First, let's wrap the sides -->
+    <div id="wrapper-t">
+        <div id="wrapper-l">
+            <div id="wrapper-r">
+                <div id="wrapper-b">
+                <!-- Now, let's cap the corners -->
+                    <div id="wrapper-tl">
+                        <div id="wrapper-tr">
+                            <div id="wrapper-bl">
+                                <div id="wrapper-br">
+                                    <div class="clearfix" id="header">
+                                        <div id="header-t">
+                                            <div id="header-r">
+                                                <div id="header-l">
+                                                    <div id="header-m" class="clearfix header">
+                                                        <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
+                                                        <div class="headermenu"><?php echo $PAGE->headingmenu ?></div>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                                    
+                                <?php if (empty($PAGE->layout_options['nonavbar']) and $PAGE->has_navbar()) { // This is the navigation bar with breadcrumbs  ?>
+                                <div class="navbar clearfix">
+                                    <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
+                                    <div class="navbutton"><?php echo $PAGE->button; ?></div>
+                                </div>
+                                <?php } ?>
+                                <!-- END OF HEADER -->
+                                <div id="content">
+                                    <table id="layout-table" summary="layout">
+                                        <tr>
+                                            <?php if (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT)) { ?>
+                                            <td id="region-side-pre" class="block-region">
+                                                <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
+                                            </td>
+                                            <?php } ?>
+                                            <td id="content" class="content">
+                                                <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
+                                            </td>
+                                            <?php if (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-post', $OUTPUT)) { ?>
+                                            <td id="region-side-post" class="block-region">
+                                                <?php echo $OUTPUT->blocks_for_region('side-post') ?>
+                                            </td>
+                                            <?php } ?>
+                                        </tr>
+                                    </table>
+                                </div>
+                                <!-- END OF CONTENT -->
+
+                                <?php if (empty($PAGE->layout_options['nofooter'])) { ?>
+                                <div class="footer" id="footer">
+                                    <div id="footer-b" class="clearfix">
+                                        <div id="footer-l">
+                                            <div id="footer-r">
+                                                <div id="footer-m" class="clearfix">
+
+                                                    <div id="footer-logo">
+                                                        <a href="http://moodle.org" target="_blank"><img src="<?php echo $OUTPUT->pix_url('logo','theme');?>" title="Moodle <?php echo $CFG->release ?>" /></a>
+                                                    </div>
+
+                                                    <div id="footer-helplink">
+                                                        <?php echo page_doc_link(get_string('moodledocslink')) ?>
+                                                    </div>
+
+                                                    <div id="footer-loggedinas">
+                                                        <?php echo $OUTPUT->login_info(); ?>
+                                                    </div>
+                                                    
+                                                    <?php echo $OUTPUT->standard_footer_html(); ?>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                                <?php } ?>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+<!-- end #page -->
+<script type="text/javascript" charset="utf-8">
+/* <![CDATA[ */
+    var CSSClass={};CSSClass.is=function(e,c){if(typeof e=="string")e=document.getElementById(e);var classes=e.className;if(!classes)return false;if(classes==c)return true;return e.className.search("\\b"+c+"\\b")!=-1;};CSSClass.add=function(e,c){if(typeof e=="string")e=document.getElementById(e);if(CSSClass.is(e,c))return;if(e.className)c=" "+c;e.className+=c;};CSSClass.remove=function(e,c){if(typeof e=="string")e=document.getElementById(e);e.className=e.className.replace(new RegExp("\\b"+c+"\\b\\s*","g"),"");};
+
+    var jsscript = {
+
+        corrections: function () {
+
+            // check for layouttabel and add haslayouttable class to body
+            function setbodytag () {
+                var bd = document.getElementsByTagName('body')[0];
+                if (bd) {
+                    var tagname = 'nolayouttable';
+                    if (document.getElementById('middle-column')) {
+                        var lc = document.getElementById('left-column');
+                        var rc = document.getElementById('right-column');
+                        if ( lc && rc ) {
+                            tagname = 'haslayouttable rightandleftcolumn';
+                        } else if (lc) {
+                            tagname = 'haslayouttable onlyleftcolumn';
+                        } else if (rc) {
+                            tagname = 'haslayouttable onlyrightcolumn';
+                        } else {
+                            tagname = 'haslayouttable onlymiddlecolumn';
+                        }
+                    }
+                    CSSClass.add(bd, tagname);
+                } else {
+                    setTimeout(function() { setbodytag() }, 10);
+                }
+            };
+
+            setbodytag();
+        },
+
+        init: function() {
+            jsscript.corrections();
+        }
+    };
+
+    jsscript.init();
+/* ]]> */
+</script>
+<?php echo $OUTPUT->standard_end_of_body_html() ?>
+</body>
+</html>
\ No newline at end of file
diff --git a/theme/anomaly/layout/home.php b/theme/anomaly/layout/home.php
new file mode 100644 (file)
index 0000000..8dcb5fc
--- /dev/null
@@ -0,0 +1,152 @@
+<?php
+
+$regionsinfo = 'pagelayout';
+if ($PAGE->blocks->region_has_content('side-pre', $OUTPUT)) {
+    $regionsinfo .= '-pre';
+}
+if ($PAGE->blocks->region_has_content('side-post', $OUTPUT)) {
+    $regionsinfo .= '-post';
+}
+
+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')?>" />
+    <?php echo $OUTPUT->standard_head_html() ?>
+</head>
+<body id="<?php echo $PAGE->pagetype ?>" class="<?php echo $PAGE->bodyclasses ?>">
+<?php echo $OUTPUT->standard_top_of_body_html(); ?>
+<div id="page" class="<?php echo $regionsinfo ?>">
+<!-- First, let's wrap the sides -->
+    <div id="wrapper-t">
+        <div id="wrapper-l">
+            <div id="wrapper-r">
+                <div id="wrapper-b">
+                <!-- Now, let's cap the corners -->
+                    <div id="wrapper-tl">
+                        <div id="wrapper-tr">
+                            <div id="wrapper-bl">
+                                <div id="wrapper-br">
+                                    <div class="clearfix" id="header-home">
+                                        <div id="header-t">
+                                            <div id="header-r">
+                                                <div id="header-l">
+                                                    <div id="header-m" class="clearfix home">
+                                                        <h1 class="headermain"><?php echo $PAGE->heading;?><br /><span><?php echo $COURSE->summary;?></span></h1>
+                                                        <div class="headermenu"><?php echo $PAGE->headingmenu ?></div>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                                <?php if (empty($PAGE->layout_options['nonavbar']) and $PAGE->has_navbar()) { // This is the navigation bar with breadcrumbs  ?>
+                                <div class="navbar clearfix">
+                                    <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
+                                    <div class="navbutton"><?php echo $PAGE->button; ?></div>
+                                </div>
+                                <?php } ?>
+                                <!-- END OF HEADER -->
+                                <div id="content">
+                                    <table id="layout-table" summary="layout">
+                                        <tr>
+                                            <?php if ($PAGE->blocks->region_has_content('side-pre', $OUTPUT)) { ?>
+                                            <td id="region-side-pre" class="block-region">
+                                                <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
+                                            </td>
+                                            <?php } ?>
+                                            <td id="content" class="content">
+                                                <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
+                                            </td>
+                                            <?php if ($PAGE->blocks->region_has_content('side-post', $OUTPUT)) { ?>
+                                            <td id="region-side-post" class="block-region">
+                                                <?php echo $OUTPUT->blocks_for_region('side-post') ?>
+                                            </td>
+                                            <?php } ?>
+                                        </tr>
+                                    </table>
+                                </div>
+                                <!-- END OF CONTENT -->
+
+                                <?php if (empty($PAGE->layout_options['nofooter'])) { ?>
+                                <div id="footer" class="footer">
+                                    <div id="footer-b" class="clearfix">
+                                        <div id="footer-l">
+                                            <div id="footer-r">
+                                                <div id="footer-m" class="clearfix">
+
+                                                    <div id="footer-logo">
+                                                        <a href="http://moodle.org" target="_blank"><img src="<?php echo $OUTPUT->pix_url('logo','theme');?>" title="Moodle <?php echo $CFG->release ?>" /></a>
+                                                    </div>
+
+                                                    <div id="footer-helplink">
+                                                        <?php echo page_doc_link(get_string('moodledocslink')) ?>
+                                                    </div>
+
+                                                    <div id="footer-loggedinas">
+                                                        <?php echo $OUTPUT->login_info(); ?>
+                                                    </div>
+
+                                                    <?php echo $OUTPUT->standard_footer_html(); ?>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                                <?php } ?>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+<!-- end #page -->
+<script type="text/javascript" charset="utf-8">
+/* <![CDATA[ */
+    var CSSClass={};CSSClass.is=function(e,c){if(typeof e=="string")e=document.getElementById(e);var classes=e.className;if(!classes)return false;if(classes==c)return true;return e.className.search("\\b"+c+"\\b")!=-1;};CSSClass.add=function(e,c){if(typeof e=="string")e=document.getElementById(e);if(CSSClass.is(e,c))return;if(e.className)c=" "+c;e.className+=c;};CSSClass.remove=function(e,c){if(typeof e=="string")e=document.getElementById(e);e.className=e.className.replace(new RegExp("\\b"+c+"\\b\\s*","g"),"");};
+
+    var jsscript = {
+
+        corrections: function () {
+
+            // check for layouttabel and add haslayouttable class to body
+            function setbodytag () {
+                var bd = document.getElementsByTagName('body')[0];
+                if (bd) {
+                    var tagname = 'nolayouttable';
+                    if (document.getElementById('middle-column')) {
+                        var lc = document.getElementById('left-column');
+                        var rc = document.getElementById('right-column');
+                        if ( lc && rc ) {
+                            tagname = 'haslayouttable rightandleftcolumn';
+                        } else if (lc) {
+                            tagname = 'haslayouttable onlyleftcolumn';
+                        } else if (rc) {
+                            tagname = 'haslayouttable onlyrightcolumn';
+                        } else {
+                            tagname = 'haslayouttable onlymiddlecolumn';
+                        }
+                    }
+                    CSSClass.add(bd, tagname);
+                } else {
+                    setTimeout(function() { setbodytag() }, 10);
+                }
+            };
+
+            setbodytag();
+        },
+
+        init: function() {
+            jsscript.corrections();
+        }
+    };
+
+    jsscript.init();
+/* ]]> */
+</script>
+<?php echo $OUTPUT->standard_end_of_body_html() ?>
+</body>
+</html>
\ No newline at end of file
diff --git a/theme/anomaly/meta.php b/theme/anomaly/meta.php
deleted file mode 100644 (file)
index 51d294f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<!--[if IE 7]>
-    <link rel="stylesheet" type="text/css" href="<?php echo $CFG->httpsthemewww ?>/anomaly/styles_ie7.css" />
-<![endif]-->
-<!--[if IE 6]>
-    <link rel="stylesheet" type="text/css" href="<?php echo $CFG->httpsthemewww ?>/anomaly/styles_ie6.css" />
-<![endif]-->
similarity index 91%
rename from theme/anomaly/styles.css
rename to theme/anomaly/style/styles.css
index ad9c71077d186a3878bbe376222bfba3dabb280d..aa08c55e73b9f66126237397af7914529fbf8484 100644 (file)
@@ -1,9 +1,7 @@
-
 /* Core */
-
-body {
-  padding:0;
-  margin:0;
+html, body {
+    text-align: left;
+    background:#C8C9C7;
 }
 
 body, p, th, td, li {
@@ -19,6 +17,7 @@ p {
 
 #page {
   margin:25px 4%;
+  background: #fff;
 }
 
 #layout-table {
@@ -79,7 +78,6 @@ h1.headermain span p {
 
 #content {
   margin:0 11px;
-  background: #fff;
   padding:10px 0 25px;
 }
 
@@ -103,7 +101,7 @@ h2.headingblock {
 .sideblock .header {
   padding:7px 8px 0;
   border:none;
-  background:url(images/sideblock_t.jpg) no-repeat 0 0;
+  background:url([[pix:theme|sideblock_t]]) no-repeat 0 0;
 }
 
 .sideblock .title h2 {
@@ -118,12 +116,12 @@ h2.headingblock {
 }
 
 .sideblock {
-  background:url(images/sideblock_b.jpg) no-repeat 0 100%;
+  background:url([[pix:theme|sideblock_b]]) no-repeat 0 100%;
   padding-bottom:11px;
 }
 
 .block_login .header {
-  background:url(images/sideblock-y_t.jpg) no-repeat 0 0;
+  background:url([[pix:theme|sideblock-y_t]]) no-repeat 0 0;
 }
 
 .block_login .content {
@@ -132,7 +130,7 @@ h2.headingblock {
 }
 
 .block_login {
-  background:url(images/sideblock-y_b.jpg) no-repeat 0 100%;
+  background:url([[pix:theme|sideblock-y_b]]) no-repeat 0 100%;
 }
 
 #right-column .hidden .header,
@@ -254,7 +252,6 @@ h2.headingblock {
 }
 
 /* Tables */
-
 #participants th,
 #user-grade th,
 .logtable th,
@@ -264,7 +261,6 @@ h2.headingblock {
 .forumheaderlist th {
   background:#f2f2f2;
   border-bottom:1px solid #bbb;
-
 }
 
 /* Login */
@@ -291,8 +287,8 @@ h2.headingblock {
 /* Footer */
 
 #footer {
-  margin:0 !important;
   color:#ccc;
+  margin:0 !important;
 }
 #footer-logo {
   float:left;
@@ -326,3 +322,7 @@ h2.headingblock {
 .admin #page {
   min-width: 700px;
 }
+
+#region-side-pre, #region-side-post {
+    width:200px;
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from theme/anomaly/styles_ie6.css
rename to theme/anomaly/style/styles_ie6.css
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from theme/anomaly/styles_ie7.css
rename to theme/anomaly/style/styles_ie7.css
diff --git a/theme/anomaly/style/styles_layout.css b/theme/anomaly/style/styles_layout.css
new file mode 100644 (file)
index 0000000..8efc183
--- /dev/null
@@ -0,0 +1,11 @@
+td,
+th {
+    padding:0px;
+}
+table.minicalendar {
+    border-width:0px;
+}
+table.minicalendar th {
+    padding:0px;
+    border-width:0px;
+}
\ No newline at end of file
diff --git a/theme/anomaly/style/styles_select.css b/theme/anomaly/style/styles_select.css
new file mode 100644 (file)
index 0000000..a588342
--- /dev/null
@@ -0,0 +1,111 @@
+a:link,
+a:visited,
+.tabtree ul li ul li a span {
+  color:#4C6B30;
+}
+
+a:hover {
+  color:#702B33;
+}
+
+.headermenu a:link,
+.headermenu a:visited {
+  color:#697F55;
+}
+
+h2.headingblock,
+.forumpost .content {
+  border-color:#697f55;
+}
+
+.navbar,
+.course-view .weeks .current,
+.course-view .topics .current,
+.course-view .current td.side {
+  background:#697f55;
+}
+
+.navbar a:link,
+.navbar a:visited {
+  color:#fff;
+}
+
+.navbar a:hover {
+  color:#000;
+}
+
+.navbar .breadcrumb .sep {
+  color:#333;
+}
+
+#header-m {
+  background:#222;
+  padding:0 10px;
+}
+
+#header-m.home {
+  border-bottom:5px solid #697F55;
+}
+
+#wrapper-t {
+  background:url([[pix:theme|wrapper_t]]) repeat-x 0 0;
+}
+
+#wrapper-l {
+  background:url([[pix:theme|wrapper_l]]) repeat-y 0 0;
+}
+
+#wrapper-r {
+  background:url([[pix:theme|wrapper_r]]) repeat-y 100% 0;
+}
+
+#wrapper-b {
+  background:url([[pix:theme|wrapper_b]]) repeat-x 100% 100%;
+}
+
+#wrapper-tl {
+  background:url([[pix:theme|wrapper_tl]]) no-repeat 0 0;
+}
+
+#wrapper-tr {
+  background:url([[pix:theme|wrapper_tr]]) no-repeat 100% 0;
+}
+
+#wrapper-bl {
+  background:url([[pix:theme|wrapper_bl]]) no-repeat 0 100%;
+}
+
+#wrapper-br {
+  background:url([[pix:theme|wrapper_br]]) no-repeat 100% 100%;
+}
+
+#header-t {
+  background:url([[pix:theme|header_t]]) repeat-x 0 0;
+}
+
+#header-r {
+  background:url([[pix:theme|header_r]]) no-repeat 100% 0;
+}
+
+#header-l {
+  background:url([[pix:theme|header_l]]) no-repeat 0 0;
+  padding:11px 0 0;
+}
+
+#footer-b {
+  background:url([[pix:theme|footer_b]]) repeat-x 0 100%;
+}
+
+#footer-l {
+  background:url([[pix:theme|footer_l]]) no-repeat 0 100%;
+}
+
+#footer-r {
+  background:url([[pix:theme|footer_r]]) no-repeat 100% 100%;
+  padding-bottom: 11px;
+}
+
+#footer-m {
+  background:#000;
+  padding-top:11px;
+}
diff --git a/theme/anomaly/styles.php b/theme/anomaly/styles.php
deleted file mode 100644 (file)
index 94a76f9..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?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/>.
-
-/**
- * Serve the CSS for this theme. Every theme must contain a copy of this file
- * DO NOT MODIFY THIS FILE IT IS IMPORTANT TO THE WORKING OF THE MOODLE THEMES SYSTEM.
- * If you are are trying to change something, you should probably be looking at config.php.
- *
- * @package   moodlecore
- * @copyright 2009 Tim Hunt
- * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-die('Not converted yet...');
diff --git a/theme/anomaly/styles_select.css b/theme/anomaly/styles_select.css
deleted file mode 100644 (file)
index 43e5ca7..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-body {
-  background:#C8C9C7;
-}
-
-a:link,
-a:visited,
-.tabtree ul li ul li a span {
-  color:#4C6B30;
-}
-
-a:hover {
-  color:#702B33;
-}
-
-.headermenu a:link,
-.headermenu a:visited {
-  color:#697F55;
-}
-
-h2.headingblock,
-.forumpost .content {
-  border-color:#697f55;
-}
-
-.navbar,
-#course-view .weeks .current td.side,
-#course-view .topics .current td.side {
-  background:#697f55;
-}
-
-.navbar a:link,
-.navbar a:visited {
-  color:#fff;
-}
-
-.navbar a:hover {
-  color:#000;
-}
-
-.navbar .breadcrumb .sep {
-  color:#333;
-}
-
-#wrapper-t {
-  background:url(images/wrapper_t.jpg) repeat-x 0 0;
-}
-
-#wrapper-l {
-  background:url(images/wrapper_l.jpg) repeat-y 0 0;
-}
-
-#wrapper-r {
-  background:url(images/wrapper_r.jpg) repeat-y 100% 0;
-}
-
-#wrapper-b {
-  background:url(images/wrapper_b.jpg) repeat-x 100% 100%;
-}
-
-#wrapper-tl {
-  background:url(images/wrapper_tl.jpg) no-repeat 0 0;
-}
-
-#wrapper-tr {
-  background:url(images/wrapper_tr.jpg) no-repeat 100% 0;
-}
-
-#wrapper-bl {
-  background:url(images/wrapper_bl.jpg) no-repeat 0 100%;
-}
-
-#wrapper-br {
-  background:url(images/wrapper_br.jpg) no-repeat 100% 100%;
-}
-
-#header-t {
-  background:url(images/header_t.jpg) repeat-x 0 0;
-}
-
-#header-r {
-  background:url(images/header_r.jpg) no-repeat 100% 0;
-}
-
-#header-l {
-  background:url(images/header_l.jpg) no-repeat 0 0;
-  padding:11px 0 0;
-}
-
-#header-m {
-  background:#222;
-  padding:0 10px;
-}
-
-#header-m.home {
-  border-bottom:5px solid #697F55;
-}
-
-
-#footer-b {
-  background:url(images/footer_b.jpg) repeat-x 0 100%;
-}
-
-#footer-l {
-  background:url(images/footer_l.jpg) no-repeat 0 100%;
-}
-
-#footer-r {
-  background:url(images/footer_r.jpg) no-repeat 100% 100%;
-  padding-bottom: 11px;
-}
-
-#footer-m {
-  background:#000;
-  padding-top:11px;
-}