Merge branch 'MDL-39626_master' of git://github.com/kordan/moodle

Conflicts:
	theme/formal_white/style/course.css
This commit is contained in:
Sam Hemelryk 2013-06-18 11:03:21 +12:00
commit e667bd9db0
112 changed files with 171 additions and 47 deletions

View File

@ -29,6 +29,7 @@ $string['blockcontentbgc'] = 'Blocks content background colour';
$string['blockcontentbgcdesc'] = 'This sets the blocks content background colour for the theme.';
$string['blockpadding'] = 'Margin around blocks';
$string['blockpaddingdesc'] = 'This sets the margin between each block and the containing column.';
$string['blueberry'] = 'blueberry';
$string['choosereadme'] = '
<div class="clearfix">
<div class="theme_screenshot">
@ -69,7 +70,7 @@ $string['customcssdesc'] = 'Any CSS you enter here will be added to every page a
<pre>a:link, a:visited, a:hover, a:active, a:focus {color:blue;}</pre>
Please adjust colors and CSS rules to fit your needs.';
$string['customlogourl'] = 'Custom logo';
$string['customlogourldesc'] = 'Change the logo for this theme by entering the full or relative URL to an image you wish to use (i.e. http://www.yoursite.tld/mylogo.png or ../path/to/your/logo.png). As a reference, the default logo is 200px wide, 50px high and a transparent png will work best.';
$string['customlogourldesc'] = 'Change the logo for this theme by entering the full or relative URL to an image you wish to use (i.e. http://www.yoursite.tld/mylogo.png or ../path/to/your/logo.png). As a reference the default logo is 200px wide, 50px high and a transparent png will work best.';
$string['displayheading'] = 'Display page heading';
$string['displaylogo'] = 'Display logo';
$string['fontsizereference'] = 'Font size reference';
@ -79,17 +80,25 @@ $string['footnotedesc'] = 'The content from this textarea will be displayed in t
$string['framemargin'] = 'Frame margin';
$string['framemargindesc'] = 'Room between the frame and the edge of the browser window. (This setting will be ignored if "{$a}" is requested).';
$string['frontpagelogourl'] = 'Custom front page logo';
$string['frontpagelogourldesc'] = 'Change the logo that is displayed on the front page of your site by entering the full or relative URL to the image you wish to use. This setting overrides the custom logo setting. As a reference the default logo is 300px wide, 80px high and a transparent png will work best.';
$string['frontpagelogourldesc'] = 'Change the logo that is displayed on the front page of your site by entering the full or relative URL to the image you wish to use (i.e. http://www.yoursite.tld/myfrontpagelogo.png or ../path/to/your/logo.png). This setting overrides the custom logo setting. As a reference the default logo is 300px wide, 80px high and a transparent png will work best.';
$string['headerbgc'] = 'Header background colour';
$string['headerbgcdesc'] = 'This sets the blocks header background colour for the theme.';
$string['headercontent'] = 'Header content';
$string['headercontentdesc'] = 'Choose whether display moodle logo or page heading text in the header.';
$string['lblockcolumnbgc'] = 'Left column background colour';
$string['lblockcolumnbgcdesc'] = 'This sets the left column background colour for the theme.';
$string['lemon'] = 'lemon';
$string['lime'] = 'lime';
$string['mink'] = 'mink';
$string['noframe'] = 'Formal white 1.9 look';
$string['noframedesc'] = 'Select this option to require your moodle page to look like moodle 1.*, alias, without the surrounding frame.';
$string['orange'] = 'orange';
$string['peach'] = 'peach';
$string['pluginname'] = 'Formal white';
$string['rblockcolumnbgc'] = 'Right column background colour';
$string['rblockcolumnbgcdesc'] = 'This sets the right column background colour for the theme. If you leave this empty the left column background colour will be used.';
$string['region-side-post'] = 'Right';
$string['region-side-pre'] = 'Left';
$string['silver'] = 'silver';
$string['trendcolor'] = 'Trend color';
$string['trendcolordesc'] = 'Choose the general trend for the color of the theme.';

View File

@ -220,7 +220,7 @@ if ($hasfooter) {
<?php echo page_doc_link(get_string('moodledocslink')); ?>
</div>
</div> <!-- </page-footer> -->
</div> <!-- </page"> -->
</div> <!-- </page> -->
<div class="clearfix"></div>

View File

@ -250,7 +250,7 @@ if ($hasfooter) {
?>
</div>
</div> <!-- </page-footer> -->
</div> <!-- </page"> -->
</div> <!-- </page> -->
<div class="clearfix"></div>

View File

@ -219,7 +219,7 @@ if ($hasfooter) {
<?php echo page_doc_link(get_string('moodledocslink')); ?>
</div>
</div> <!-- </page-footer> -->
</div> <!-- </page"> -->
</div> <!-- </page> -->
<div class="clearfix"></div>

View File

@ -27,6 +27,14 @@ function formal_white_user_settings($css, $theme) {
}
$css = formal_white_set_framemargin($css, $framemargin);
// Set the images according to color trend
if (!isset($theme->settings->trendcolor)) {
$trendcolor = 'mink'; // default
} else {
$trendcolor = $theme->settings->trendcolor;
}
$css = formal_white_set_trendcolor($css, $trendcolor);
// Set the page header background color
if (empty($theme->settings->headerbgc)) {
$headerbgc = '#E3DFD4'; // default
@ -86,8 +94,6 @@ function formal_white_user_settings($css, $theme) {
return $css;
}
/**
* Sets the link color variable in CSS
*
@ -110,6 +116,83 @@ function formal_white_set_framemargin($css, $framemargin) {
return $css;
}
function formal_white_set_trendcolor($css, $trendcolor) {
// __setting_trendcolor__ is part of URLS so it is already between double square bracket.
// I can not enclose it between double square bracket once again otherwise images path parser get confused.
$tag = urlencode('__setting_trendcolor__'); // urlencode is useless but it is correct to put it here
$css = str_replace($tag, $trendcolor, $css);
// of the basis of the general choosed trend, I need the right background color.
switch ($trendcolor) {
case 'blueberry':
// page background
$tag = '[[setting:pagebackground]]';
$css = str_replace($tag, '#DAF1FF', $css);
// block header background
$tag = '[[setting:blockheaderbackground]]';
$css = str_replace($tag, '#CDE2F3', $css);
break;
case 'lemon':
// page background
$tag = '[[setting:pagebackground]]';
$css = str_replace($tag, '#FFEB9A', $css);
// block header background
$tag = '[[setting:blockheaderbackground]]';
$css = str_replace($tag, '#F7DA41', $css);
break;
case 'lime':
// page background
$tag = '[[setting:pagebackground]]';
$css = str_replace($tag, '#F0F5BB', $css);
// block header background
$tag = '[[setting:blockheaderbackground]]';
$css = str_replace($tag, '#E2E499', $css);
break;
case 'mink':
// page background
$tag = '[[setting:pagebackground]]';
$css = str_replace($tag, '#EFEFEF', $css);
// block header background
$tag = '[[setting:blockheaderbackground]]';
$css = str_replace($tag, '#E3DFD4', $css);
break;
case 'orange':
// page background
$tag = '[[setting:pagebackground]]';
$css = str_replace($tag, '#FFD46C', $css);
// block header background
$tag = '[[setting:blockheaderbackground]]';
$css = str_replace($tag, '#FDC06D', $css);
break;
case 'peach':
// page background
$tag = '[[setting:pagebackground]]';
$css = str_replace($tag, '#FCD3BC', $css);
// block header background
$tag = '[[setting:blockheaderbackground]]';
$css = str_replace($tag, '#F7C099', $css);
break;
case 'silver':
// page background
$tag = '[[setting:pagebackground]]';
$css = str_replace($tag, '#EFF0F2', $css);
// block header background
$tag = '[[setting:blockheaderbackground]]';
$css = str_replace($tag, '#E0DFDD', $css);
break;
default:
debugging('It seems a colour has been added to the formal_white trend colours folder but was not fully managed. The code must be updated by a developer.');
}
return $css;
}
function formal_white_set_headerbgc($css, $headerbgc) {
$tag = '[[setting:headerbgc]]';
$css = str_replace($tag, $headerbgc, $css);

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 658 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 672 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 735 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 742 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 736 B

View File

Before

Width:  |  Height:  |  Size: 325 B

After

Width:  |  Height:  |  Size: 325 B

View File

Before

Width:  |  Height:  |  Size: 346 B

After

Width:  |  Height:  |  Size: 346 B

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Some files were not shown because too many files have changed in this diff Show More