Skip to content
Snippets Groups Projects
Commit 53e7d173 authored by Kathrin Osswald's avatar Kathrin Osswald
Browse files

Improved get_extra_scss callback due to doubled CSS code.

parent ab32ef64
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,10 @@ moodle-theme_boost_campus_child
Changes
-------
### Unreleased
* 2018-03-02 - Improved get_extra_scss callback due to doubled CSS code.
### v3.4-r1
* 2018-02-20 - Changed the get_extra_scss functionality due to parent theme changes.
......
......@@ -32,8 +32,22 @@ defined('MOODLE_INTERNAL') || die();
* @return string
*/
function theme_boost_campus_child_get_extra_scss($theme) {
// Get the config from parent theme boost_campus
$boostcampusconfig = theme_config::load('boost_campus');
// Retrieve its SCSS
$boostcampusscss = $boostcampusconfig->settings->scss;
$content = '';
$imageurl = $boostcampusconfig->setting_file_url('backgroundimage', 'backgroundimage');
// Sets the background image, and its settings.
if (!empty($imageurl)) {
$content .= 'body { ';
$content .= "background-image: url('$imageurl');";
$content .= ' }';
}
// Return the Raw SCSS from Boost Campus and Boost Campus Child.
return theme_boost_campus_get_extra_scss(theme_config::load('boost_campus')) . $theme->settings->scss;
return $boostcampusscss . $theme->settings->scss . $content;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment