Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-theme_boost_campus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-theme_boost_campus
Commits
6af3bd7c
Commit
6af3bd7c
authored
7 years ago
by
Kathrin Osswald
Browse files
Options
Downloads
Patches
Plain Diff
Implemented get_extra_scss function.
parent
14ef25fa
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGES.md
+3
-0
3 additions, 0 deletions
CHANGES.md
config.php
+1
-0
1 addition, 0 deletions
config.php
lib.php
+23
-0
23 additions, 0 deletions
lib.php
version.php
+1
-1
1 addition, 1 deletion
version.php
with
28 additions
and
1 deletion
CHANGES.md
+
3
−
0
View file @
6af3bd7c
...
...
@@ -3,6 +3,9 @@ moodle-theme_boost_campus
Changes
-------
### Unreleased
*
2018-02-21 - Implemented get_extra_scss function.
### Release v3.4-r1
...
...
This diff is collapsed.
Click to expand it.
config.php
+
1
−
0
View file @
6af3bd7c
...
...
@@ -145,6 +145,7 @@ $THEME->layouts = [
];
$THEME
->
enable_dock
=
false
;
$THEME
->
extrascsscallback
=
'theme_boost_campus_get_extra_scss'
;
$THEME
->
prescsscallback
=
'theme_boost_campus_get_pre_scss'
;
$THEME
->
yuicssmodules
=
array
();
$THEME
->
rendererfactory
=
'theme_overridden_renderer_factory'
;
...
...
This diff is collapsed.
Click to expand it.
lib.php
+
23
−
0
View file @
6af3bd7c
...
...
@@ -127,6 +127,29 @@ function theme_boost_campus_get_pre_scss($theme) {
return
$scss
;
}
/**
* Inject additional SCSS.
* We implemented this function as a duplicate of theme_boost, because we need this
* for the child theme boost_campus_child.
*
* @param theme_config $theme The theme config object.
* @return string
*/
function
theme_boost_campus_get_extra_scss
(
$theme
)
{
$content
=
''
;
$imageurl
=
$theme
->
setting_file_url
(
'backgroundimage'
,
'backgroundimage'
);
// Sets the background image, and its settings.
if
(
!
empty
(
$imageurl
))
{
$content
.
=
'body { '
;
$content
.
=
"background-image: url('
$imageurl
');"
;
$content
.
=
' }'
;
}
// Always return the background image with the scss when we have it.
return
!
empty
(
$theme
->
settings
->
scss
)
?
$theme
->
settings
->
scss
.
' '
.
$content
:
$content
;
}
/**
* Implement pluginfile function to deliver files which are uploaded in theme settings
*
...
...
This diff is collapsed.
Click to expand it.
version.php
+
1
−
1
View file @
6af3bd7c
...
...
@@ -25,7 +25,7 @@
defined
(
'MOODLE_INTERNAL'
)
||
die
();
$plugin
->
component
=
'theme_boost_campus'
;
$plugin
->
version
=
2018021
9
00
;
$plugin
->
version
=
201802
2
100
;
$plugin
->
release
=
'v3.4-r1'
;
$plugin
->
requires
=
2017111300
;
$plugin
->
maturity
=
MATURITY_STABLE
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment