mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Building theme
This commit is contained in:
parent
2a56765822
commit
4f68869bf6
3 changed files with 172 additions and 51 deletions
|
@ -35,11 +35,13 @@ $THEME->enable_dock = false;
|
||||||
// Do you want to use the new navigation dock?
|
// Do you want to use the new navigation dock?
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
$THEME->layouts = array(
|
$THEME->layouts = array(
|
||||||
'base' => array(
|
'base' => array(
|
||||||
'theme' => 'boxxie',
|
'theme' => 'boxxie',
|
||||||
'file' => 'general.php',
|
'file' => 'general.php',
|
||||||
'regions' => array(),
|
'regions' => array('side-pre', 'side-post'),
|
||||||
|
'defaultregion' => 'side-post',
|
||||||
),
|
),
|
||||||
'general' => array(
|
'general' => array(
|
||||||
'theme' => 'boxxie',
|
'theme' => 'boxxie',
|
||||||
|
@ -114,4 +116,13 @@ $THEME->layouts = array(
|
||||||
'regions' => array(),
|
'regions' => array(),
|
||||||
'options' => array('nofooter'=>true, 'nonavbar'=>true),
|
'options' => array('nofooter'=>true, 'nonavbar'=>true),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////
|
||||||
|
// These are all of the possible layouts in Moodle. The
|
||||||
|
// simplest way to do this is to keep the theme and file
|
||||||
|
// variables the same for every layout. Including them
|
||||||
|
// all in this way allows some flexibility down the road
|
||||||
|
// if you want to add a different layout template to a
|
||||||
|
// specific page.
|
||||||
|
///////////////////////////////////////////////////////////////
|
|
@ -2,69 +2,91 @@
|
||||||
echo $OUTPUT->doctype() ?>
|
echo $OUTPUT->doctype() ?>
|
||||||
<html <?php echo $OUTPUT->htmlattributes() ?>>
|
<html <?php echo $OUTPUT->htmlattributes() ?>>
|
||||||
<head>
|
<head>
|
||||||
<title><?php echo $PAGE->title; ?></title>
|
<title><?php echo $PAGE->title; ?></title>
|
||||||
<link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
|
<link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
|
||||||
<?php echo $OUTPUT->standard_head_html() ?>
|
<?php echo $OUTPUT->standard_head_html() ?>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body id="<?php echo $PAGE->bodyid; ?>" class="<?php echo $PAGE->bodyclasses; ?>">
|
<body id="<?php echo $PAGE->bodyid; ?>" class="<?php echo $PAGE->bodyclasses; ?>">
|
||||||
|
|
||||||
<?php echo $OUTPUT->standard_top_of_body_html() ?>
|
<?php echo $OUTPUT->standard_top_of_body_html() ?>
|
||||||
<div id="page">
|
|
||||||
<?php if ($PAGE->heading || (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar())) { ?>
|
<?php if ($PAGE->heading || (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar())) { ?>
|
||||||
|
|
||||||
|
<div id="page-wrapper">
|
||||||
|
<div id="page" class="clearfix">
|
||||||
|
|
||||||
<div id="page-header">
|
<div id="page-header">
|
||||||
<?php if ($PAGE->heading) { ?>
|
<?php if ($PAGE->heading) { ?>
|
||||||
<h1 class="headermain"><?php echo $PAGE->heading ?></h1>
|
<h1 class="headermain"><?php echo $PAGE->heading ?></h1>
|
||||||
<div class="headermenu"><?php
|
<div class="headermenu"><?php
|
||||||
echo $OUTPUT->login_info();
|
echo $OUTPUT->login_info();
|
||||||
if (!empty($PAGE->layout_options['langmenu'])) {
|
if (!empty($PAGE->layout_options['langmenu'])) {
|
||||||
echo $OUTPUT->lang_menu();
|
echo $OUTPUT->lang_menu();
|
||||||
}
|
}
|
||||||
echo $PAGE->headingmenu
|
echo $PAGE->headingmenu
|
||||||
?></div><?php } ?>
|
?></div><?php
|
||||||
<?php if (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar()) { ?>
|
} ?>
|
||||||
<div class="navbar clearfix">
|
|
||||||
<div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
|
<?php if (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar()) { ?>
|
||||||
<div class="navbutton"> <?php echo $PAGE->button; ?></div>
|
<div class="navbar clearfix">
|
||||||
</div>
|
<div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
|
||||||
<?php } ?>
|
<div class="navbutton"> <?php echo $PAGE->button; ?></div>
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<div id="page-content">
|
|
||||||
<div id="regions">
|
|
||||||
<div id="regions-mask">
|
|
||||||
<div id="region-main">
|
|
||||||
<div id="region-main-mask">
|
|
||||||
<div class="region-content">
|
|
||||||
<?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="region-pre">
|
|
||||||
<div class="region-content">
|
|
||||||
<?php echo $OUTPUT->blocks_for_region('side-pre') ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="region-post">
|
|
||||||
<div class="region-content">
|
|
||||||
<?php echo $OUTPUT->blocks_for_region('side-post') ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ($hasfooter) { ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
<div id="page-content">
|
||||||
|
<div id="regions">
|
||||||
|
<div id="regions-mask">
|
||||||
|
|
||||||
|
<div id="region-main">
|
||||||
|
<div id="region-main-mask">
|
||||||
|
<div class="region-content">
|
||||||
|
<?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="region-pre">
|
||||||
|
<div class="region-content">
|
||||||
|
<?php echo $OUTPUT->blocks_for_region('side-pre') ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="region-post">
|
||||||
|
<div class="region-content">
|
||||||
|
<?php echo $OUTPUT->blocks_for_region('side-post') ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if ($hasfooter) { ?>
|
||||||
|
|
||||||
<div id="page-footer" class="clearfix">
|
<div id="page-footer" class="clearfix">
|
||||||
<p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
|
<p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
|
||||||
<?php
|
<?php
|
||||||
echo $OUTPUT->login_info();
|
echo $OUTPUT->login_info();
|
||||||
echo $OUTPUT->home_link();
|
echo $OUTPUT->home_link();
|
||||||
echo $OUTPUT->standard_footer_html();
|
echo $OUTPUT->standard_footer_html();
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
|
||||||
</div>
|
<?php }
|
||||||
|
|
||||||
|
if ($PAGE->heading || (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar())) { ?>
|
||||||
|
|
||||||
|
</div> <!-- END #page -->
|
||||||
|
</div> <!-- END #page-wrapper -->
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
<?php echo $OUTPUT->standard_end_of_body_html() ?>
|
<?php echo $OUTPUT->standard_end_of_body_html() ?>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -1 +1,89 @@
|
||||||
body {}
|
html {
|
||||||
|
background: #6e8c45;
|
||||||
|
}
|
||||||
|
|
||||||
|
#page-wrapper {
|
||||||
|
margin: 10px 5%;
|
||||||
|
background: #5b7439;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#page {
|
||||||
|
background: #fff;
|
||||||
|
padding: 5px;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:link,
|
||||||
|
a:visited {
|
||||||
|
color: #69804e;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover,
|
||||||
|
a:active {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Header */
|
||||||
|
|
||||||
|
#page-header {
|
||||||
|
background: #3b4c25;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#page-header a:link,
|
||||||
|
#page-header a:visited {
|
||||||
|
color: #b3c79d;
|
||||||
|
}
|
||||||
|
|
||||||
|
#page-header h1.headermain {
|
||||||
|
color: #fff;
|
||||||
|
font-weight: normal;
|
||||||
|
margin:1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sideblock {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sideblock .header {
|
||||||
|
background: #69804e;
|
||||||
|
padding:2px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sideblock .header h2 {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sideblock .content {
|
||||||
|
background: #f3f8ed;
|
||||||
|
border-width: 1px;
|
||||||
|
border-color: #69804e;
|
||||||
|
border-style: solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Course */
|
||||||
|
|
||||||
|
.coursebox {
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.coursebox h3.name {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.categorybox {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2.headingblock {
|
||||||
|
font-weight: normal;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Forum */
|
||||||
|
|
||||||
|
.forumpost .topic {
|
||||||
|
background: #c9dfb2;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue