aboutsummaryrefslogtreecommitdiffstats
path: root/apps/theming
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-02-16 15:26:02 +0100
committerFerdinand Thiessen <opensource@fthiessen.de>2024-05-21 20:36:26 +0200
commit85b64e15ad0029305b34c606c6d3805c47d10964 (patch)
treeb9fe987bb2caddb56cfc8c15ae30b38c155d35c1 /apps/theming
parent8028784976f05ca42f2ebc844c2f637085126009 (diff)
downloadnextcloud-server-85b64e15ad0029305b34c606c6d3805c47d10964.tar.gz
nextcloud-server-85b64e15ad0029305b34c606c6d3805c47d10964.zip
fix: Always populate `--image-background`
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/theming')
-rw-r--r--apps/theming/css/default.css1
-rw-r--r--apps/theming/lib/Themes/CommonThemeTrait.php5
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/theming/css/default.css b/apps/theming/css/default.css
index 611017f6408..c96e41d23fc 100644
--- a/apps/theming/css/default.css
+++ b/apps/theming/css/default.css
@@ -87,5 +87,4 @@
--gradient-primary-background: linear-gradient(40deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
--color-background-plain: #00679e;
--color-background-plain-text: #ffffff;
- --image-background-default: url('/apps/theming/img/background/kamil-porembinski-clouds.jpg');
}
diff --git a/apps/theming/lib/Themes/CommonThemeTrait.php b/apps/theming/lib/Themes/CommonThemeTrait.php
index 05e8054a291..bdf95d98275 100644
--- a/apps/theming/lib/Themes/CommonThemeTrait.php
+++ b/apps/theming/lib/Themes/CommonThemeTrait.php
@@ -97,7 +97,6 @@ trait CommonThemeTrait {
$variables = [
'--color-background-plain' => $backgroundColor,
'--color-background-plain-text' => $this->util->invertTextColor($backgroundColor) ? '#000000' : '#ffffff',
- '--image-background-default' => "url('" . $this->themingDefaults->getBackground() . "')",
'--background-image-invert-if-bright' => $this->util->invertTextColor($backgroundColor) ? 'invert(100%)' : 'no',
];
@@ -105,8 +104,10 @@ trait CommonThemeTrait {
foreach (ImageManager::SUPPORTED_IMAGE_KEYS as $image) {
if ($this->imageManager->hasImage($image)) {
$imageUrl = $this->imageManager->getImageUrl($image);
- // --image-background is overridden by user theming if logged in
$variables["--image-$image"] = "url('" . $imageUrl . "')";
+ } else if ($image === 'background') {
+ // Apply default background if nothing is configured
+ $variables['--image-background'] = "url('" . $this->themingDefaults->getBackground() . "')";
}
}