From: Petr Skoda Date: Tue, 29 Dec 2009 22:11:52 +0000 (+0000) Subject: MDL-20204 just a little blue theme experiment for testing of theme development proces... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=00db2a3551fbcec28ce778a2007042bd8d89c71e;p=moodle.git MDL-20204 just a little blue theme experiment for testing of theme development process ;-) --- diff --git a/theme/base/config.php b/theme/base/config.php index 8733dc11c3..850ec80a4e 100644 --- a/theme/base/config.php +++ b/theme/base/config.php @@ -129,7 +129,7 @@ $THEME->layouts = array( 'theme' => 'base', 'file' => 'general.php', 'regions' => array(), - 'options' => array('nofooter'), + 'options' => array('nofooter'=>true), ), // Embeded pages, like iframe/object embeded in moodleform - it needs as much space as possible 'embedded' => array( diff --git a/theme/experiment/config.php b/theme/experiment/config.php new file mode 100644 index 0000000000..e0c8faeb99 --- /dev/null +++ b/theme/experiment/config.php @@ -0,0 +1,149 @@ +. + + +/** + * Configuration for Moodle's standard theme. + * + * DO NOT COPY THIS INTO NEW THEMES! Instead use some other theme as a base + * for your experiments. + * + * Options related to theme customisations can be found at + * http://phpdocs.moodle.org/HEAD/moodlecore/theme_config.html + * + * For an overview of how Moodle themes work, Please see + * http://docs.moodle.org/en/Developement:How_Moodle_outputs_HTML + * + * @package moodlecore + * @copyright 2009 Tim Hunt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + + +$THEME->parents = array('base'); + +$THEME->sheets = array( + 'core', + 'block_calendar_month', +); + +$THEME->editor_sheets = array(); + + +$THEME->layouts = array( + // Most backwards compatible layout without the blocks - this is the layout used by default + 'base' => array( + 'theme' => 'experiment', + 'file' => 'general.php', + 'regions' => array(), + ), + // Standard layout with blocks, this is recommended for most pages with general information + 'standard' => array( + 'theme' => 'experiment', + 'file' => 'general.php', + 'regions' => array('side-pre', 'side-post'), + 'defaultregion' => 'side-post', + ), + // Main course page + 'course' => array( + 'theme' => 'experiment', + 'file' => 'general.php', + 'regions' => array('side-pre', 'side-post'), + 'defaultregion' => 'side-post', + 'options' => array('langmenu'=>true), + ), + 'coursecategory' => array( + 'theme' => 'experiment', + 'file' => 'general.php', + 'regions' => array('side-pre', 'side-post'), + 'defaultregion' => 'side-post', + ), + // part of course, typical for modules - default page layout if $cm specified in require_login() + 'incourse' => array( + 'theme' => 'experiment', + 'file' => 'general.php', + 'regions' => array('side-pre', 'side-post'), + 'defaultregion' => 'side-post', + ), + // The site home page. + 'frontpage' => array( + 'theme' => 'experiment', + 'file' => 'frontpage.php', + 'regions' => array('side-pre', 'side-post'), + 'defaultregion' => 'side-post', + ), + // Server administration scripts. + 'admin' => array( + 'theme' => 'experiment', + 'file' => 'general.php', + 'regions' => array('side-pre'), + 'defaultregion' => 'side-pre', + ), + // My dashboard page + 'mydashboard' => array( + 'theme' => 'experiment', + 'file' => 'general.php', + 'regions' => array('side-pre', 'side-post'), + 'defaultregion' => 'side-post', + ), + // My public page + 'mypublic' => array( + 'theme' => 'experiment', + 'file' => 'general.php', + 'regions' => array('side-pre', 'side-post'), + 'defaultregion' => 'side-post', + ), + 'login' => array( + 'theme' => 'experiment', + 'file' => 'general.php', + 'regions' => array(), + 'options' => array('langmenu'=>true), + ), + // Pages that appear in pop-up windows - no navigation, no blocks, no header. + 'popup' => array( + 'theme' => 'experiment', + 'file' => 'general.php', + 'regions' => array(), + 'options' => array('nofooter'=>true), + ), + // No blocks and minimal footer - used for legacy frame layouts only! + 'frametop' => array( + 'theme' => 'experiment', + 'file' => 'general.php', + 'regions' => array(), + 'options' => array('nofooter'=>true), + ), + // Embeded pages, like iframe/object embeded in moodleform - it needs as much space as possible + 'embedded' => array( + 'theme' => 'experiment', + 'file' => 'embedded.php', + 'regions' => array(), + 'options' => array('nofooter'=>true, 'nonavbar'=>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' => 'experiment', + 'file' => 'general.php', + 'regions' => array(), + 'options' => array('nofooter'=>true, 'nonavbar'=>true), + ), +); + +/** List of javascript files that need to included on each page */ +$THEME->javascripts = array('navigation'); diff --git a/theme/experiment/javascript/navigation.js b/theme/experiment/javascript/navigation.js new file mode 100644 index 0000000000..215abe39c7 --- /dev/null +++ b/theme/experiment/javascript/navigation.js @@ -0,0 +1 @@ +/* experiment: javascript needed for navbar manipulations */ diff --git a/theme/experiment/layout/embedded.php b/theme/experiment/layout/embedded.php new file mode 100644 index 0000000000..c305cfb428 --- /dev/null +++ b/theme/experiment/layout/embedded.php @@ -0,0 +1,23 @@ +doctype() ?> +htmlattributes() ?>> + + <?php echo $PAGE->title ?> + + standard_head_html() ?> + + +standard_top_of_body_html() ?> + +
+ + + +
+ +
+ + +
+standard_end_of_body_html() ?> + + \ No newline at end of file diff --git a/theme/experiment/layout/frontpage.php b/theme/experiment/layout/frontpage.php new file mode 100644 index 0000000000..717cc1a320 --- /dev/null +++ b/theme/experiment/layout/frontpage.php @@ -0,0 +1,71 @@ +blocks->region_has_content('side-pre', $OUTPUT)) { + $regionsinfo .= '-pre'; +} +if ($PAGE->blocks->region_has_content('side-post', $OUTPUT)) { + $regionsinfo .= '-post'; +} + +echo $OUTPUT->doctype() ?> +htmlattributes() ?>> + + <?php echo $PAGE->title ?> + + + standard_head_html() ?> + + +standard_top_of_body_html() ?> + +
+ +
+

heading ?>

+
login_info(); + echo $OUTPUT->lang_menu(); + echo $PAGE->headingmenu; + ?>
+ +
+ + +
+
+
+
+
+ +
+
+ blocks->region_has_content('side-pre', $OUTPUT)) { ?> +
+ blocks_for_region('side-pre') ?> +
+ + blocks->region_has_content('side-post', $OUTPUT)) { ?> +
+ blocks_for_region('side-post') ?> +
+ +
+
+
+ + + +
+standard_end_of_body_html() ?> + + \ No newline at end of file diff --git a/theme/experiment/layout/general.php b/theme/experiment/layout/general.php new file mode 100644 index 0000000000..9f26092997 --- /dev/null +++ b/theme/experiment/layout/general.php @@ -0,0 +1,87 @@ +blocks->region_has_content('side-pre', $OUTPUT)) { + $regionsinfo .= '-pre'; +} +if ($PAGE->blocks->region_has_content('side-post', $OUTPUT)) { + $regionsinfo .= '-post'; +} + +echo $OUTPUT->doctype() ?> +htmlattributes() ?>> + + <?php echo $PAGE->title ?> + + standard_head_html() ?> + + +standard_top_of_body_html() ?> + +
+ + + + +
+
+
+
+
+ +
+
+ blocks->region_has_content('side-pre', $OUTPUT)) { ?> +
+ blocks_for_region('side-pre') ?> +
+ + blocks->region_has_content('side-post', $OUTPUT)) { ?> +
+ blocks_for_region('side-post') ?> +
+ +
+
+
+ + + layout_options['nofooter'])) { ?> + + +
+standard_end_of_body_html() ?> + + \ No newline at end of file diff --git a/theme/experiment/pix/favicon.ico b/theme/experiment/pix/favicon.ico new file mode 100644 index 0000000000..5a7a36a68e Binary files /dev/null and b/theme/experiment/pix/favicon.ico differ diff --git a/theme/experiment/pix/screenshot.jpg b/theme/experiment/pix/screenshot.jpg new file mode 100755 index 0000000000..c0fd7c8324 Binary files /dev/null and b/theme/experiment/pix/screenshot.jpg differ diff --git a/theme/experiment/readme.txt b/theme/experiment/readme.txt new file mode 100644 index 0000000000..db2600f30f --- /dev/null +++ b/theme/experiment/readme.txt @@ -0,0 +1,5 @@ +This is just an experiment, designed to test how easy it is to create new theme with YUI layout. +It will be probably removed later before 2.0beta. + + +skodak \ No newline at end of file diff --git a/theme/experiment/style/block_calendar_month.css b/theme/experiment/style/block_calendar_month.css new file mode 100644 index 0000000000..d4e5a2f779 --- /dev/null +++ b/theme/experiment/style/block_calendar_month.css @@ -0,0 +1,13 @@ + +.block_calendar_month table.minicalendar { + margin-top: 5px; + background-color: #ffffff; +} + +.block_calendar_month table.minicalendar .weekend { + color: #aaaaaa; +} + +.minicalendar .today { + background-color: #d5e1f4; +} diff --git a/theme/experiment/style/core.css b/theme/experiment/style/core.css index e7f3e955fb..b8408bc3f0 100644 --- a/theme/experiment/style/core.css +++ b/theme/experiment/style/core.css @@ -3,10 +3,6 @@ html { background-color: #c4d5ef; } -div { - text-align: left; -} - .regions-outer { background-color: #ffffff; }