1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-22 04:23:01 +00:00

Don't emit custom css unless there's something to emit

This commit is contained in:
Starbeamrainbowlabs 2020-08-31 21:04:59 +01:00
parent dfca17d1cf
commit 0085ddf0c4
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 9 additions and 3 deletions

View file

@ -4,6 +4,10 @@ This file holds the changelog for Pepperminty Wiki. This is the master list of t
## v0.22-dev (unreleased) ## v0.22-dev (unreleased)
### Changed
- Don't emit custom CSS unless there's something to emit
### Fixed ### Fixed
- Fixed `inbody:searchterm` advanced query syntax - Fixed `inbody:searchterm` advanced query syntax
- Fixed inaccessible colours in the page list when using the dark theme - Fixed inaccessible colours in the page list when using the dark theme

View file

@ -335,10 +335,12 @@ class page_renderer
self::add_server_push_indicator("style", $settings->css); self::add_server_push_indicator("style", $settings->css);
$result .= "<link rel='stylesheet' href='$settings->css_custom' />\n"; $result .= "<link rel='stylesheet' href='$settings->css_custom' />\n";
} }
if(!empty(trim($settings->css_custom))) {
$css .= "\n/*** Custom CSS ***/\n"; $css .= "\n/*** Custom CSS ***/\n";
$css .= !empty($settings->optimize_pages) ? minify_css($settings->css_custom) : $settings->css_custom; $css .= !empty($settings->optimize_pages) ? minify_css($settings->css_custom) : $settings->css_custom;
$css .= "\n/******************/"; $css .= "\n/******************/";
} }
}
$result .= "<style>\n$css\n</style>\n"; $result .= "<style>\n$css\n</style>\n";
return $result; return $result;