MDL-39695 theme_formal_white: added a colour hover for coursebox following trendcolour setting

This commit is contained in:
kordan 2013-07-14 23:09:36 +02:00
parent 07bbbcf174
commit ac3331cd3d
4 changed files with 38 additions and 13 deletions

View File

@ -150,9 +150,13 @@ function formal_white_set_trendcolor($css, $trendcolor) {
$tag = urlencode('__setting_trendcolor__'); // urlencode is useless but it is correct to put it here $tag = urlencode('__setting_trendcolor__'); // urlencode is useless but it is correct to put it here
$css = str_replace($tag, $trendcolor, $css); $css = str_replace($tag, $trendcolor, $css);
// of the basis of the general choosed trend, I need the right background color. // of the basis of the general choosed trend, I need some colour definition.
switch ($trendcolor) { switch ($trendcolor) {
case 'blueberry': case 'blueberry':
// .courses .coursebox
$tag = '[[setting:hovercolor]]';
$css = str_replace($tag, '#CEE5FD', $css);
// page background // page background
$tag = '[[setting:pagebackground]]'; $tag = '[[setting:pagebackground]]';
$css = str_replace($tag, '#DAF1FF', $css); $css = str_replace($tag, '#DAF1FF', $css);
@ -162,6 +166,10 @@ function formal_white_set_trendcolor($css, $trendcolor) {
$css = str_replace($tag, '#CDE2F3', $css); $css = str_replace($tag, '#CDE2F3', $css);
break; break;
case 'lemon': case 'lemon':
// .courses .coursebox
$tag = '[[setting:hovercolor]]';
$css = str_replace($tag, '#FFEA68', $css);
// page background // page background
$tag = '[[setting:pagebackground]]'; $tag = '[[setting:pagebackground]]';
$css = str_replace($tag, '#FFEB9A', $css); $css = str_replace($tag, '#FFEB9A', $css);
@ -171,6 +179,10 @@ function formal_white_set_trendcolor($css, $trendcolor) {
$css = str_replace($tag, '#F7DA41', $css); $css = str_replace($tag, '#F7DA41', $css);
break; break;
case 'lime': case 'lime':
// .courses .coursebox
$tag = '[[setting:hovercolor]]';
$css = str_replace($tag, '#EBEDB1', $css);
// page background // page background
$tag = '[[setting:pagebackground]]'; $tag = '[[setting:pagebackground]]';
$css = str_replace($tag, '#F0F5BB', $css); $css = str_replace($tag, '#F0F5BB', $css);
@ -180,6 +192,10 @@ function formal_white_set_trendcolor($css, $trendcolor) {
$css = str_replace($tag, '#E2E499', $css); $css = str_replace($tag, '#E2E499', $css);
break; break;
case 'mink': case 'mink':
// .courses .coursebox
$tag = '[[setting:hovercolor]]';
$css = str_replace($tag, '#E3DFD4', $css);
// page background // page background
$tag = '[[setting:pagebackground]]'; $tag = '[[setting:pagebackground]]';
$css = str_replace($tag, '#EFEFEF', $css); $css = str_replace($tag, '#EFEFEF', $css);
@ -189,6 +205,10 @@ function formal_white_set_trendcolor($css, $trendcolor) {
$css = str_replace($tag, '#E3DFD4', $css); $css = str_replace($tag, '#E3DFD4', $css);
break; break;
case 'orange': case 'orange':
// .courses .coursebox
$tag = '[[setting:hovercolor]]';
$css = str_replace($tag, '#FFCF88', $css);
// page background // page background
$tag = '[[setting:pagebackground]]'; $tag = '[[setting:pagebackground]]';
$css = str_replace($tag, '#FFD46C', $css); $css = str_replace($tag, '#FFD46C', $css);
@ -198,6 +218,10 @@ function formal_white_set_trendcolor($css, $trendcolor) {
$css = str_replace($tag, '#FDC06D', $css); $css = str_replace($tag, '#FDC06D', $css);
break; break;
case 'peach': case 'peach':
// .courses .coursebox
$tag = '[[setting:hovercolor]]';
$css = str_replace($tag, '#FFCEB8', $css);
// page background // page background
$tag = '[[setting:pagebackground]]'; $tag = '[[setting:pagebackground]]';
$css = str_replace($tag, '#FCD3BC', $css); $css = str_replace($tag, '#FCD3BC', $css);
@ -207,6 +231,10 @@ function formal_white_set_trendcolor($css, $trendcolor) {
$css = str_replace($tag, '#F7C099', $css); $css = str_replace($tag, '#F7C099', $css);
break; break;
case 'silver': case 'silver':
// .courses .coursebox
$tag = '[[setting:hovercolor]]';
$css = str_replace($tag, '#E0DFDD', $css);
// page background // page background
$tag = '[[setting:pagebackground]]'; $tag = '[[setting:pagebackground]]';
$css = str_replace($tag, '#EFF0F2', $css); $css = str_replace($tag, '#EFF0F2', $css);

View File

@ -7,7 +7,7 @@
.block .header .title {background-image:url([[pix:theme|trend/__setting_trendcolor__/gradient_h]]);background-color:[[setting:blockheaderbackground]];background-repeat:repeat-x;clear:both;line-height:2em;} .block .header .title {background-image:url([[pix:theme|trend/__setting_trendcolor__/gradient_h]]);background-color:[[setting:blockheaderbackground]];background-repeat:repeat-x;clear:both;line-height:2em;}
.block .header .title .commands {padding-left:0.3em;text-align:right;} .block .header .title .commands {padding-left:0.3em;text-align:right;}
.block .content {background-color:[[setting:blockcontentbgc]];} .block .content {background-color:[[setting:blockcontentbgc]];}
.block img.icon {padding-right:5px} .block img.icon {padding-right:0.2em}
/* block login */ /* block login */
.block_login .btn {margin-top:0.5em;text-align:center;} .block_login .btn {margin-top:0.5em;text-align:center;}

View File

@ -31,8 +31,8 @@
/* if a duration exists... in the calendartable */ /* if a duration exists... in the calendartable */
/* take care: it is not needed because I might have more than one duration /* take care: it is not needed because I might have more than one duration
* this is why the cell must not be equipped with a border-bottom * this is why the cell must not be displayed with a border-bottom
* but events need to to drown inside * but events need to to drawn inside
*/ */
.path-calendar .maincalendar .calendarmonth th, .path-calendar .maincalendar .calendarmonth th,

View File

@ -10,11 +10,11 @@
.course-content .single-section .section-navigation {margin-bottom:0;} .course-content .single-section .section-navigation {margin-bottom:0;}
/** coursebox **/ /** coursebox **/
.coursebox {border:1px solid #DDD;border-color:#DDDDDD;}
#page-enrol-index .generalbox.info, #page-enrol-index .generalbox.info,
#page-course-info .generalbox.info {border:none;} #page-course-info .generalbox.info {border:none;}
.coursebox {border:none}
.coursebox .info {margin:0;font-size:100%;} .coursebox .info {margin:0;font-size:100%;}
.coursebox .name {margin:5px;} .coursebox .name {margin:5px; width: 80%;}
.coursebox .content {font-size:90%;} .coursebox .content {font-size:90%;}
.coursebox .teachers {margin:5px 1em;} .coursebox .teachers {margin:5px 1em;}
.coursebox .summary, .coursebox .summary,
@ -93,10 +93,10 @@
.path-report-outline .loginfo {text-align:center;margin:1em;} .path-report-outline .loginfo {text-align:center;margin:1em;}
/* Course */ /* Course */
/*.courses .coursebox.even {background-color:white; border-color:white;}*/ .courses .coursebox.even {background-color:[[setting:lblockcolumnbgc]];border-color:#eee;}
.courses .coursebox.odd {background-color:[[setting:rblockcolumnbgc]];border-color:[[setting:rblockcolumnbgc]];} .courses .coursebox.odd {background-color:[[setting:blockcontentbgc]];border-color:#eee;}
.courses .coursebox:hover, .courses .coursebox.even:hover, .course_category_tree .courses > .paging:hover {background-color:[[setting:hovercolor]];}
.course_category_tree .courses > .paging:hover {background-color:#eee;} .courses .coursebox.odd:hover, .course_category_tree .courses > .paging:hover {background-color:[[setting:hovercolor]];}
/* Category listings */ /* Category listings */
.course_category_tree .controls {margin-bottom:5px;text-align:right;float:right;} .course_category_tree .controls {margin-bottom:5px;text-align:right;float:right;}
@ -106,9 +106,6 @@
.course_category_tree .category > .info {margin: 5px 0;} .course_category_tree .category > .info {margin: 5px 0;}
.course_category_tree .category > .info .name {margin:5px;padding-left:16px;} .course_category_tree .category > .info .name {margin:5px;padding-left:16px;}
.dir-rtl .course_category_tree .category > .info .name {padding-left:0;padding-right:16px;} .dir-rtl .course_category_tree .category > .info .name {padding-left:0;padding-right:16px;}
.courses .coursebox.even {background-color:#f6f6f6;border-color:#eee;}
.courses .coursebox:hover,
.course_category_tree .courses > .paging:hover {background-color:#eee;}
.course_category_tree .courses > .paging, .course_category_tree .courses > .paging,
.course_category_tree .subcategories > .paging {padding:5px;} .course_category_tree .subcategories > .paging {padding:5px;}