|
|
@@ -192,6 +192,8 @@ class DefaultTheme implements ITheme { |
|
|
|
'--primary-invert-if-bright' => $this->util->invertTextColor($this->primaryColor) ? 'invert(100%)' : 'no', |
|
|
|
'--background-invert-if-dark' => 'no', |
|
|
|
'--background-invert-if-bright' => 'invert(100%)', |
|
|
|
|
|
|
|
'--image-main-background' => "url('" . $this->urlGenerator->imagePath('core', 'app-background.jpg') . "')", |
|
|
|
]; |
|
|
|
|
|
|
|
$backgroundDeleted = $this->config->getAppValue('theming', 'backgroundMime', '') === 'backgroundColor'; |
|
|
@@ -199,19 +201,21 @@ class DefaultTheme implements ITheme { |
|
|
|
// let's not define the background image |
|
|
|
if ($backgroundDeleted || $hasCustomPrimaryColour) { |
|
|
|
$variables["--image-background-plain"] = 'true'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// Register image variables only if custom-defined |
|
|
|
foreach(['logo', 'logoheader', 'favicon', 'background'] as $image) { |
|
|
|
if ($this->imageManager->hasImage($image)) { |
|
|
|
$imageUrl = $this->imageManager->getImageUrl($image); |
|
|
|
if ($image === 'background') { |
|
|
|
// If background deleted is set, ignoring variable |
|
|
|
if ($backgroundDeleted) { |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
$variables['--image-background-size'] = 'cover'; |
|
|
|
$variables['--image-main-background'] = "url('" . $imageUrl . "')"; |
|
|
|
} |
|
|
|
$variables["--image-$image"] = "url('".$this->imageManager->getImageUrl($image)."')"; |
|
|
|
$variables["--image-$image"] = "url('" . $imageUrl . "')"; |
|
|
|
} |
|
|
|
} |
|
|
|
|