config.php header.html styles_layout.css user_styles.css:

_ changes in to make Chameloen work as a sessiontheme
_ changes to make it easier to implement the Chameleon engine into existing themes
This commit is contained in:
urs_hunkler
2006-04-10 17:38:23 +00:00
parent de251840b4
commit 186142b0c5
4 changed files with 267 additions and 642 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
////////////////////////////////////////////////////////////////////////////////
$THEME->sheets = array('styles_layout', 'user_styles');
$THEME->sheets = array('user_styles');
/// This variable is an array containing the names of all the
/// stylesheet files you want included in this theme, and in what order
+12 -43
View File
@@ -4,40 +4,9 @@
<?php echo $meta ?>
<meta name="keywords" content="moodle, <?php echo $title ?> " />
<title><?php echo $title ?></title>
<link rel="shortcut icon" href="<?php echo "$CFG->wwwroot/theme/$CFG->theme" ?>/favicon.ico" />
<link rel="shortcut icon" href="<?php echo $CFG->wwwroot.'/theme/'.current_theme() ?>/favicon.ico" />
<?php
if (isset($THEME->chameleonenabled) && $THEME->chameleonenabled) {
$chameleon_isadmin = isadmin();
$chameleon_isteacher = false;
if (isset($course->id)) {
$chameleon_courseparam = '?id=' . $course->id;
if (!$chameleon_isadmin) {
$chameleon_isteacher = (isteacher($course->id) && isset($CFG->coursetheme));
}
} else {
$chameleon_courseparam = '';
}
if ($chameleon_isadmin || $chameleon_isteacher) {
// either we're an admin or we're a teacher and this is being used as the course theme
// if we're on a page using a course theme edit that, otherwise edit the main chameleon theme
$chameleon_theme = (isset($CFG->coursetheme)) ? $CFG->coursetheme : $CFG->theme;
?>
<style type="text/css"> @import '<?php echo "$CFG->wwwroot/theme/$chameleon_theme" ?>/ui/chameleon_ui.css'; </style>
<script type="text/javascript" src="<?php echo "$CFG->wwwroot/theme/$chameleon_theme/ui/css_query.js" ?>"> </script>
<script type="text/javascript" src="<?php echo "$CFG->wwwroot/theme/$chameleon_theme/ui/sarissa.js" ?>"> </script>
<script type="text/javascript" src="<?php echo "$CFG->wwwroot/theme/$chameleon_theme/ui/chameleon_js.php$chameleon_courseparam" ?>"> </script>
<?php
}
}
?>
<?php include('ui/chameleon.php'); ?>
<?php include("$CFG->javascript"); ?>
</head>
@@ -52,25 +21,25 @@
<?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 id="header-home" class="clearfix">
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="headermenu"><?php echo $menu ?></div>
</div>
<table class="navbar"><tr><td>
<div class="navbar clearfix">
&nbsp;
</td></tr></table>
</div>
<?php } else { // This is what gets printed on any other page with a heading
?>
<div id="header">
<div class="headermain"><?php echo $heading ?></div>
<div id="header" class="clearfix">
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="headermenu"><?php echo $menu ?></div>
</div>
<table class="navbar"><tr><td>
<?php if ($navigation) { // This is the navigation table with breadcrumbs ?>
<div class="navbar clearfix">
<?php if ($navigation) { // This is the navigation table with breadcrumbs ?>
<div class="breadcrumb"><?php print_navigation($navigation); ?></div>
<div class="navbutton"><?php echo $button; ?></div>
<?php } ?>
</td></tr></table>
<?php } ?>
</div>
<?php } ?>
<!-- END OF HEADER -->
<div id="content">
+2 -279
View File
@@ -27,324 +27,47 @@
*** Core
***/
body {
margin: 0.5em;
padding: 0;
}
h1.main,
h2.main,
h3.main,
h4.main,
h5.main,
h6.main {
margin-left: 1em;
text-align: left;
}
#content {
clear: both;
}
.generalboxcontent {
text-align: left;
}
#layout-table {
margin-top: 0;
}
#layout-table #left-column {
width: 22%;
padding: 5px;
}
#layout-table #middle-column {
width: auto;
padding: 5px;
}
#layout-table #middle-column .topics {
width: 95%;
}
#layout-table #right-column {
width: 22%;
padding: 5px;
}
#middle-column .section .content,
#middle-column .section .side {
border: 0 none;
}
.generalbox {
width: 90%;
}
.generaltable th.header {
border-left: 1px solid;
border-right: 1px solid;;
}
.generaltable .smallinfo p {
margin-top: 0;
}
.sitetopiccontent {
border: 0 none;
}
/***
*** Header
***/
#header-home {
padding: 0.7em 0;
height: 2em;
}
#header,
#header-main,
.navbar {
margin: 0;
}
#header {
padding: 0.1em 0;
height: 50px;
}
#header .headermain {
float: left;
margin: 0.2em 0 0 12px;
}
.headermenu {
float: right;
text-align: right;
}
.headermenu .logininfo {
margin: 0 12px 4px 0;
}
.navbar {
width: 100%;
margin: 0;
padding: 0;
background: url(pix/colorstrip.gif) left no-repeat;
height: 3em;
border: 0 none;
}
.navbar .breadcrumb {
float: left;
margin: 23px 0.2em 0 12px;
}
.navbutton {
float: right;
padding-top: 18px;
margin: 0.2em 1em 0.2em 0;
}
.navbar hr {
height: 1px;
}
/***
*** Footer
***/
#footer {
margin-top: 1em;
}
#footer br {
display: none;
}
#footer hr {
display: none;
}
#footer .sitelink {
margin: 0.5em 0;
}
#footer .homelink {
margin: 0.5em;
}
#footer .homelink a {
border-width: 1px;
}
/***
*** Content
***/
#content {
clear: both;
margin: 0 12px;
}
#course-view #content,
#site-index #content {
margin: 0;
}
#user-edit .userpicture,
#user-view .userpicture {
margin-top: 10px;
}
/***
*** Admin
***/
.logtable th.header {
border-left: 1px solid;
border-right: 1px solid;;
}
#user-edit #content .generalbox,
#user-view .userinfobox tr {
border-top: 0 none;
}
/***
*** Blocks
***/
.sideblock,
.sideblock .searchform {
text-align: left;
}
.sideblock .header .hide-show img.hide-show-image {
margin-top: 0.1em;;
}
.sideblock .searchform a {
line-height: 1.5em;
}
#left-column .sideblock {
margin: 0;
}
#left-column .sideblock .header,
#left-column .sideblock .content,
#right-column .sideblock .header,
#right-column .sideblock .content {
border: 0 none;
}
#right-column .sideblock .content {
padding: 0.2em 0.7em;
}
#left-column .sideblock .header {
border-bottom: 1px solid;
}
#left-column .sideblock .list .r0,
#left-column .sideblock .list .r1 {
height: 2em;
}
#left-column .sideblock .list td {
vertical-align: middle;
border-bottom: 1px solid;
}
#right-column .sideblock {
margin-bottom: 28px;
}
.sideblock .head {
margin-top: 0.5em;
}
.sideblock .link {
margin: 0.3em 0;
border-bottom: 1px solid;
}
.sideblock .post {
margin-top: 0.5em;
padding-bottom: 0.2em;
border-bottom: 1px solid;
}
.block_rss_client .link {
border-top: 0 none;
}
/***
*** Calendar
***/
#calendar .today,
.minicalendar .today {
padding-top: 0;
padding-bottom: 0;
border: 1px solid !important;
}
#calendar .maincalendar .calendarmonth {
width: 75%;
}
/***
*** Course
***/
#site-index .headingblock {
border: 0 none;
}
#course-view .headingblock {
margin-left: 1em;
padding-left: 0.7em;
border: 0 none;
border-left: 1.2em solid;
}
#course-view .topics {
margin: 0 0.5em 0 1em;
}
#course-view .section .left {
width: 0.8em;
}
#course-view .section .right {
width: 30px;
}
#course-view .section .left a {
display: none;
}
#course-view .section .spacer {
height: 2em;
}
#course-view .section .activity .spacer {
height: 12px;
}
#course-view .section .content .section {
margin-top: 0;
margin-left: 0.7em;
}
#course-view .section .content .section .activity {
padding: 0.3em 0.2em 0.2em;
border-bottom: 1px solid;
}
.course .section .content .summary {
margin: 0 0 0 0.7em;
}
#course-view .section .content .section .label img {
margin-right: 1em;
margin-bottom: 1em;
}
#course-user #content,
#mod-forum-user #content {
padding-bottom: 0.2em;
}
/***
*** Login
***/
.loginbox {
margin-top: 12px;
}
/***
*** Modules: Forum
***/
.forumheaderlist {
width: 90%;
margin-left: auto;
margin-right: auto;
}
.forumheaderlist .header {
border-left: 1px solid;
border-right: 1px solid;
}
#mod-forum-index .generalbox {
width: 100%;
}
/***
*** Modules: Glossary
***/
.glossarydisplay {
border-bottom: 5px solid;
}
.glossarypopup {
margin-top: 0.5em;
}
/***
*** Modules: Resource
***/
.mod-resource #content {
margin-top: 1px;
}
+252 -319
View File
@@ -1,350 +1,283 @@
div.headermain {
color: #009900;
font-weight: bold;
font-size: 3em;
font-family: georgia, "trebuchet ms", times, serif;
}
td.courseboxcontent {
font-family: "trebuchet ms", verdana, sans-serif;
font-weight: normal;
font-style: italic;
text-decoration: underline;
background-color: #FFEECC;
background-image: none;
border-width: 1px;
border-style: none;
border-color: #FFCC00;
}
body {
font-family: georgia, "trebuchet ms", times, serif;
font-size: 100%;
color: #333333;
font-family: georgia, times, serif;
margin: 0;
padding: 5px 10px 10px;
border-top-width: 10px;
border-top-style: solid;
border-top-color: #55CC00;
}
div#header {
font-family: verdana, arial, helvetica, sans-serif;
height: 55px;
div.clearer {
clear: both;
}
div.headermenu {
font-size: 0.75em;
position: absolute;
background-color: transparent;
top: 10px;
right: 1em;
a:link {
color: #116699;
}
div#content {
font-size: 0.85em;
}
div.sideblock div.header {
background-color: #FFCC00;
border-width: 1px;
border-style: dashed;
border-color: #CCCCCC;
}
td#left-column div.sideblock div.content {
border-right-width: 1px;
border-right-style: dashed;
border-right-color: #CCCCCC;
}
td#right-column div.sideblock div.content {
border-left-width: 1px;
border-left-style: dashed;
border-left-color: #CCCCCC;
}
table.generaltable th.header {
border-style: none;
}
div.headingblock {
color: #330000;
font-family: verdana, arial, helvetica, sans-serif;
border-style: none;
}
body#site-index {
color: #000099;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 8;
font-weight: normal;
font-style: normal;
}
table.navbar {
color: #FFCC00;
background-image: none;
background-color: #FFCC00;
border-style: none;
}
body#site-index table.navbar {
height: 25px;
}
a {
color: #660066;
font-family: georgia, "trebuchet ms", times, serif;
text-decoration: none;
font-weight: normal;
a:visited {
color: #AA2200;
}
a:hover {
color: #f90;
text-decoration: underline;
font-family: georgia, "trebuchet ms", times, serif;
color: #779911;
}
h4 {
color: #660000;
font-family: georgia, "trebuchet ms", times, serif;
font-weight: bold;
font-style: normal;
table.generaltable {
background-color: #EEEEEE;
}
div.logininfo {
color: #cc0066;
font-family: georgia, "trebuchet ms", times, serif;
font-weight: bold;
img.resize {
width: 1em;
height: 1em;
}
table.loginbox .content {
p.helplink {
margin: 0.5em 0;
}
h1.headermain {
color: #449900;
}
h2.headingblock {
border-style: none;
}
table.loginbox {
background-color: #EEEEEE;
border-width: 1px;
border-style: dashed;
border-color: #cccccc;
border-style: solid;
border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF;
}
td.today {
color: #cc0099;
font-weight: bold;
font-style: normal;
}
td#right-column a {
color: #669966;
}
table.logtable th.header {
background-color: #009900;
color: #EEEEEE;
}
table.sitetopic td.sitetopiccontent h4 {
background-color: #FFFF00;
padding: 0.3em 0.5em;
}
td#middle-column p {
color: #666666;
}
div.block_course_summary {
table.loginbox td.content {
background-color: #EEEEEE;
border-width: 1px;
border-style: dashed;
border-color: #FCFCFC;
border-style: solid;
border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF;
}
div#header-home {
height: 57px;
}
body#mod-forum-discuss table.forumpost td.content {
border-style: none;
}
body.mod-forum table.forumpost td.content {
border-width: medium;
border-style: none;
border-color: inherit;
}
body#mod-forum-discuss table.unread td.content {
border-color: #009900;
}
div.block_calendar_month {
background-color: transparent;
}
div#header-home div.headermain:after {
content: ' By Andy and Urs - with styles by everyone.';
font-size: 8pt;
padding: 2px;
}
body.mod-forum div#page {
background-color: TRANSPARENT;
}
tbody td.c1 {
background-color: transparent;
}
body#course-teacher h2:after {
padding: 10px;
}
div.sideblock tr.weekdays {
font-size: 0.8em;
font-family: georgia, "trebuchet ms", times, serif;
}
div#header div.headermain {
font-size: 2em;
}
div.sideblock table.minicalendar td.day {
font-family: georgia, "trebuchet ms", times, serif;
font-size: 0.8em;
}
table#layout-table div.sideblock div.header {
div.noticebox {
background-color: #EEEEEE;
border-width: 1px;
border-style: dashed;
border-color: #cccccc;
border-style: solid;
border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF;
}
table#layout-table div.sideblock div.title {
font-weight: bold;
color: #666666;
table.generaltable td {
border-width: 1px;
border-style: solid;
border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF;
}
div.sideblock div.content table.list td.c0 {
display: none;
}
div.sideblock div.content center {
text-align: left;
}
div.sideblock div.footer {
text-align: left;
}
td#middle-column {
color: #666666;
}
table.forumpost tr.header {
background-color: #FFCC00;
}
body.mod-forum table.forumheaderlist th {
border-style: none;
}
body.mod-forum table.forumheaderlist {
border-style: none;
}
body.mod-forum table.forumheaderlist td {
border-left-width: 1px;
div.generalbox {
border-top-width: 1px;
border-style: dashed none none dashed;
border-top-color: #cccccc;
border-left-color: #cccccc;
}
body.mod-forum table.forumpost td {
border-style: none;
}
body.mod-forum table.forumpost {
border-width: 1px;
border-style: dashed;
border-color: #cccccc;
}
body#mod-forum-discuss div#content {
margin-top: 5px;
}
div#content select {
background-color: #FAFAFA;
}
select {
border-top-width: 1px;
border-left-width: 1px;
border-style: solid none none solid;
border-top-color: #cccccc;
border-left-color: #cccccc;
border-style: solid none none;
border-top-color: #DDDDDD;
}
table.generalbox {
border-top-width: 1px;
border-style: solid none none;
border-top-color: #DDDDDD;
}
table.generaltable th.header {
background-color: #DDDDDD;
border-width: 1px;
border-style: dashed;
border-color: #cccccc;
border-style: solid;
border-color: #EEEEEE #CCCCCC #CCCCCC #EEEEEE;
}
body#course-view tr.section td.content table.section td.activity {
border-bottom-width: 1px;
border-style: none none dashed;
border-bottom-color: #ff6600;
}
body#mod-wiki-view div#content {
margin-top: 5px;
}
table.tabs td.selected {
background-color: #ccff00;
}
table.tabs td.active {
background-color: #eeeeee;
border-right-width: 1px;
border-left-width: 1px;
border-bottom-width: 1px;
border-right-style: solid;
border-left-style: solid;
border-bottom-style: solid;
border-right-color: #cccccc;
border-left-color: #cccccc;
border-bottom-color: #FFCC00;
div.informationbox {
background-color: #EEEEEE;
border-width: 1px;
border-style: solid;
border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF;
}
table.userinfobox {
border-width: 1px;
border-style: dashed;
border-color: #cccccc;
}
div#footer {
font-size: 0.8em;
padding-top: 0.6em;
border-top-width: 1px;
border-top-style: dashed;
border-top-color: #FF6600;
}
td.sitetopiccontent h4 {
margin-bottom: 0;
margin-top: 5px;
}
table.sitetopic p {
margin-top: 0.4em;
margin-bottom: 1.5em;
}
table.forumheaderlist th.header {
text-align: left;
color: #666666;
padding-left: 0.2em;
}
table.forumheaderlist td.lastpost {
text-align: left;
}
body#course-user div.section {
background-color: #ffffff;
border-width: 1px;
border-style: dashed;
border-color: #cccccc;
}
td#left-column div.sideblock table.list td {
border-style: none;
}
table.minicalendar {
border-style: none;
}
td#middle-column div.headingblock {
border-left-style: none;
}
div.block_participants div.header {
background-color: #00cc00;
}
body#course-view div.headingblock {
display: none;
}
div.block_calendar_month tr.weekdays th {
padding: 0 1px 0 0;
}
tr.section td.content div form {
margin-top: 5px;
}
span.concept {
font-weight: bold;
}
div#footer div.homelink a {
font-weight: bold;
color: #006600;
}
div.course-pict {
float: right;
}
div#xcoll-div {
float: left;
width: 60%;
}
div.structurehead {
color: #006600;
font-family: verdana, arial, helvetica, sans-serif;
}
acronym {
border-bottom-style: dotted;
border-bottom-color: #cc0000;
}
div.block_calendar_upcoming div.post {
border-bottom-width: 1px;
border-bottom-style: dashed;
border-bottom-color: #ff9900;
}
input[type="submit"] {
border-width: 1px 2px 2px 1px;
border-style: solid;
border-color: #ccc #999 #999 #ccc;
border-color: #DDDDDD;
}
p.copyright {
text-align: center;
}
div.headermenu {
font-size: 0.75em;
}
div.headermenu div.logininfo {
margin-bottom: 0.2em;
}
div.breadcrumb {
font-size: 0.8em;
padding-left: 0.3em;
}
table.tabs td.side {
border-bottom-style: solid;
border-bottom-color: #FFCC00;
}
table.tabs td.activetwo {
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #FFCC00;
border-bottom-color: #88DD55;
}
div.navbar div.navbutton form {
float: left;
}
div.navbar div.navbutton {
margin-top: 3px;
}
div.navbar {
padding: 3px 0;
background-color: #EEFFDD;
margin-top: 5px;
border-style: none;
}
div#footer {
margin-top: 0;
font-size: 0.75em;
border-top-width: 20px;
border-style: solid none none;
border-top-color: #EEFFDD;
}
div#content {
background-color: #F8F8F8;
padding: 10px 0;
font-size: 0.75em;
line-height: 1.6em;
margin-top: 0px;
border-top-width: 1px;
border-bottom-width: 1px;
border-top-style: solid;
border-bottom-style: solid;
border-top-color: #88DD55;
border-bottom-color: #88DD55;
}
ul.section li {
margin: 0.2em 0;
}
div.sideblock div.content * {
text-align: left;
}
div.sideblock ul.list span.c1 {
padding-left: 0.3em;
}
div.sideblock div.title h2 {
font-size: 1em;
line-height: 1.1em;
}
div.sideblock div.header {
background-color: #EEEEEE;
padding: 0.3em 0.3em 0;
border-width: 1px;
border-style: solid;
border-color: #DDDDDD #CCCCCC #88DD55 #DDDDDD;
}
div.sideblock div.content {
padding: 0.3em 0.3em;
background-color: #EEFFDD;
border-width: 1px;
border-style: none solid solid;
border-right-color: #DDDDDD;
border-bottom-color: #DDDDDD;
border-left-color: #FFFFFF;
}
div.sideblock table.calendar-controls td.current {
text-align: center;
}
div.sideblock table.minicalendar td.day {
text-align: center;
font-size: 0.9em;
}
div.sideblock table.minicalendar {
border-style: none;
}
body#admin-lang h2.main {
font-size: 1em;
text-align: left;
}
body#course-index table.generalbox {
background-color: #EEEEEE;
border-width: 1px;
border-style: solid;
border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF;
}
table.minicalendar td.today {
line-height: 1.4em;
border-width: 2px;
border-style: solid;
border-color: #88DD55;
}
div.sideblock table.minicalendar tr.weekdays {
font-size: 0.8em;
}
div.courseboxcontent {
background-color: #EEEEEE;
border-width: 1px;
border-style: solid;
border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF;
}
td.courseboxcontent {
background-color: #EEEEEE;
border-width: 1px;
border-style: solid;
border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF;
}
.tabrow td {
border-width: 1px;
border-style: solid;
border-color: #88DD55;
}
.tabrow td.selected {
border-top-width: 1px;
border-right-width: 1px;
border-left-width: 1px;
border-style: solid solid none;
border-top-color: #88DD55;
border-right-color: #88DD55;
border-left-color: #88DD55;
}
.sideblock .content .message {
text-align: left;
}
.sideblock .header .hide-show img.hide-show-image {
background-image: url(../../pix/t/switch_minus.gif);
background-repeat: no-repeat;
margin-top: 0;
}
.sideblock.hidden .header .hide-show img.hide-show-image {
background-image: url(../../pix/t/switch_plus.gif);
background-repeat: no-repeat;
margin-top: 2px;
}
#calendar .event_global {
background-color: #D6F8CD;
border-color: #D6F8CD;
}
.minicalendar .event_global {
background-color: #D6F8CD;
border-color: #D6F8CD;
}
.block_calendar_month .event_global {
background-color: #D6F8CD;
border-color: #D6F8CD;
}
#calendar .event_course {
background-color: #FFD3BD;
border-color: #FFD3BD;
}
.minicalendar .event_course {
background-color: #FFD3BD;
border-color: #FFD3BD;
}
.block_calendar_month .event_course {
background-color: #FFD3BD;
border-color: #FFD3BD;
}
#calendar .event_group {
background-color: #FEE7AE;
border-color: #FEE7AE;
}
.minicalendar .event_group {
background-color: #FEE7AE;
border-color: #FEE7AE;
}
.block_calendar_month .event_group {
background-color: #FEE7AE;
border-color: #FEE7AE;
}
#calendar .event_user {
background-color: #DCE7EC;
border-color: #DCE7EC;
}
.minicalendar .event_user {
background-color: #DCE7EC;
border-color: #DCE7EC;
}
.block_calendar_month .event_user {
background-color: #DCE7EC;
border-color: #DCE7EC;
}