]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-20204 just a little blue theme experiment for testing of theme development proces...
authorPetr Skoda <skodak@moodle.org>
Tue, 29 Dec 2009 22:11:52 +0000 (22:11 +0000)
committerPetr Skoda <skodak@moodle.org>
Tue, 29 Dec 2009 22:11:52 +0000 (22:11 +0000)
theme/base/config.php
theme/experiment/config.php [new file with mode: 0644]
theme/experiment/javascript/navigation.js [new file with mode: 0644]
theme/experiment/layout/embedded.php [new file with mode: 0644]
theme/experiment/layout/frontpage.php [new file with mode: 0644]
theme/experiment/layout/general.php [new file with mode: 0644]
theme/experiment/pix/favicon.ico [new file with mode: 0644]
theme/experiment/pix/screenshot.jpg [new file with mode: 0755]
theme/experiment/readme.txt [new file with mode: 0644]
theme/experiment/style/block_calendar_month.css [new file with mode: 0644]
theme/experiment/style/core.css

index 8733dc11c3ef02294901215a5ec3fbc7d5618bf6..850ec80a4e791fd7950b5653cb6e9480789bbe39 100644 (file)
@@ -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 (file)
index 0000000..e0c8fae
--- /dev/null
@@ -0,0 +1,149 @@
+<?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/>.
+
+
+/**
+ * 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 (file)
index 0000000..215abe3
--- /dev/null
@@ -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 (file)
index 0000000..c305cfb
--- /dev/null
@@ -0,0 +1,23 @@
+<?php 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">
+
+<!-- END OF HEADER -->
+
+    <div id="content" class="clearfix">
+        <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
+    </div>
+
+<!-- START OF FOOTER -->
+</div>
+<?php echo $OUTPUT->standard_end_of_body_html() ?>
+</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 (file)
index 0000000..717cc1a
--- /dev/null
@@ -0,0 +1,71 @@
+<?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')?>" />
+    <meta name="description" content="<?php echo strip_tags(format_text($SITE->summary, FORMAT_HTML)) ?>" />
+    <?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 ?>">
+
+    <div id="header-home" class="clearfix">
+        <div class="headermain"><h1><?php echo $PAGE->heading ?></h1></div>
+        <div class="headermenu"><?php
+            echo $OUTPUT->login_info();
+            echo $OUTPUT->lang_menu();
+            echo $PAGE->headingmenu;
+        ?></div>
+        <div class="navbar clearfix">&nbsp;</div>
+    </div>
+<!-- END OF HEADER -->
+
+    <div class="regions-outer clearfix">
+        <div id="regions">
+            <div class="regions-inner">
+                <div class="contentwrap">
+                    <div id="content">
+                        <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
+                    </div>
+                </div>
+                <?php if ($PAGE->blocks->region_has_content('side-pre', $OUTPUT)) { ?>
+                <div id="region-side-pre" class="block-region">
+                    <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
+                </div>
+                <?php } ?>
+                <?php if ($PAGE->blocks->region_has_content('side-post', $OUTPUT)) { ?>
+                <div id="region-side-post" class="block-region">
+                    <?php echo $OUTPUT->blocks_for_region('side-post') ?>
+                </div>
+                <?php } ?>
+            </div>
+        </div>
+    </div>
+
+<!-- START OF FOOTER -->
+    <div id="footer" class="clearfix">
+        <div class="homeinfo">
+            <?php echo $OUTPUT->home_link() ?>
+        </div>
+        <?php echo $OUTPUT->login_info() ?>
+        <div class="debuginfo">
+            <?php echo $OUTPUT->standard_footer_html() ?>
+        </div>
+
+    </div>
+</div>
+<?php echo $OUTPUT->standard_end_of_body_html() ?>
+</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 (file)
index 0000000..9f26092
--- /dev/null
@@ -0,0 +1,87 @@
+<?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 ?>">
+
+    <div id="header" class="clearfix">
+        <?php if ($PAGE->heading) { ?>
+        <div class="headermain"><h1><?php echo $PAGE->heading ?></h1></div>
+        <?php } ?>
+        <div class="headermenu"><?php
+            echo $OUTPUT->login_info();
+            if (!empty($PAGE->layout_options['langmenu'])) {
+                echo $OUTPUT->lang_menu();
+            }
+            echo $PAGE->headingmenu;
+        ?></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 } else { ?>
+        <div class="navbar clearfix">&nbsp;</div>
+        <?php } ?>
+    </div>
+<!-- END OF HEADER -->
+
+    <div class="regions-outer clearfix">
+        <div id="regions">
+            <div class="regions-inner">
+                <div class="contentwrap">
+                    <div id="content">
+                        <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
+                    </div>
+                </div>
+                <?php if ($PAGE->blocks->region_has_content('side-pre', $OUTPUT)) { ?>
+                <div id="region-side-pre" class="block-region">
+                    <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
+                </div>
+                <?php } ?>
+                <?php if ($PAGE->blocks->region_has_content('side-post', $OUTPUT)) { ?>
+                <div id="region-side-post" class="block-region">
+                    <?php echo $OUTPUT->blocks_for_region('side-post') ?>
+                </div>
+                <?php } ?>
+            </div>
+        </div>
+    </div>
+
+<!-- START OF FOOTER -->
+    <?php if (empty($PAGE->layout_options['nofooter'])) { ?>
+    <div id="footer" class="clearfix">
+        <div class="helplink">
+        <?php echo page_doc_link(get_string('moodledocslink')) ?>
+        </div>
+        <div class="homeinfo">
+            <?php echo $OUTPUT->home_link() ?>
+        </div>
+        <?php echo $OUTPUT->login_info() ?>
+        <div class="debuginfo">
+            <?php echo $OUTPUT->standard_footer_html() ?>
+        </div>
+
+    </div>
+    <?php } ?>
+</div>
+<?php echo $OUTPUT->standard_end_of_body_html() ?>
+</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 (file)
index 0000000..5a7a36a
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 (executable)
index 0000000..c0fd7c8
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 (file)
index 0000000..db2600f
--- /dev/null
@@ -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 (file)
index 0000000..d4e5a2f
--- /dev/null
@@ -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;
+}
index e7f3e955fbbed0efa2b57f5ac25fd4779c17c9e1..b8408bc3f03b79c9173f5665bbb8168ace68c107 100644 (file)
@@ -3,10 +3,6 @@ html {
   background-color: #c4d5ef;
 }
 
-div {
- text-align: left;
-}
-
 .regions-outer {
  background-color: #ffffff;
 }