diff options
author | Guillaume COMPAGNON <gcompagnon@outlook.com> | 2019-08-21 17:18:23 +0200 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2019-11-24 21:51:43 +0100 |
commit | ed399a31bdf501dd2a5cf35a736b85ecbc9cf4a2 (patch) | |
tree | c95fab03907150266c090fb565b6abbb6ef821ec | |
parent | cd7af395d7d0442fbe9b87a28345fb70ddd9b7a4 (diff) | |
download | nextcloud-server-ed399a31bdf501dd2a5cf35a736b85ecbc9cf4a2.tar.gz nextcloud-server-ed399a31bdf501dd2a5cf35a736b85ecbc9cf4a2.zip |
add var for theming images , advanced options
Signed-off-by: Guillaume COMPAGNON <gcompagnon@outlook.com>
-rw-r--r-- | apps/theming/css/theming.scss | 4 | ||||
-rw-r--r-- | apps/theming/lib/Capabilities.php | 2 | ||||
-rw-r--r-- | apps/theming/lib/ThemingDefaults.php | 6 | ||||
-rw-r--r-- | apps/theming/tests/ThemingDefaultsTest.php | 4 | ||||
-rw-r--r-- | core/css/css-variables.scss | 2 | ||||
-rw-r--r-- | core/css/variables.scss | 2 |
6 files changed, 13 insertions, 7 deletions
diff --git a/apps/theming/css/theming.scss b/apps/theming/css/theming.scss index f21f00f438a..368b3f33c5d 100644 --- a/apps/theming/css/theming.scss +++ b/apps/theming/css/theming.scss @@ -153,7 +153,7 @@ $invert: luma($color-primary) > 0.6; @if variable_exists('theming-logoheader-mime') and $theming-logoheader-mime != '' { #theming .advanced-option-logoheader .image-preview, body:not(#body-login) #header .logo { - background-image: url(#{$image-logoheader}); + background-image: $image-logoheader; } } @else { #theming .advanced-option-favicon .image-preview { @@ -163,7 +163,7 @@ $invert: luma($color-primary) > 0.6; @if variable_exists('theming-favicon-mime') and $theming-favicon-mime != '' { #theming .advanced-option-favicon .image-preview { - background-image: url(#{$image-favicon}); + background-image: $image-favicon; } } @else { #theming .advanced-option-favicon .image-preview { diff --git a/apps/theming/lib/Capabilities.php b/apps/theming/lib/Capabilities.php index a75403a1fd5..e48c63d50fa 100644 --- a/apps/theming/lib/Capabilities.php +++ b/apps/theming/lib/Capabilities.php @@ -83,6 +83,8 @@ class Capabilities implements IPublicCapability { $this->url->getAbsoluteURL($this->theming->getBackground()), 'background-plain' => $backgroundLogo === 'backgroundColor', 'background-default' => !$this->util->isBackgroundThemed(), + 'logoheader' => $this->url->getAbsoluteURL($this->theming->getLogo()), + 'favicon' => $this->url->getAbsoluteURL($this->theming->getLogo()), ], ]; } diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php index bca3d70e4ef..32a1eaad4cf 100644 --- a/apps/theming/lib/ThemingDefaults.php +++ b/apps/theming/lib/ThemingDefaults.php @@ -285,10 +285,10 @@ class ThemingDefaults extends \OC_Defaults { 'theming-logoheader-mime' => "'" . $this->config->getAppValue('theming', 'logoheaderMime') . "'", 'theming-favicon-mime' => "'" . $this->config->getAppValue('theming', 'faviconMime') . "'" ]; - + $variables['image-logo'] = "url('".$this->imageManager->getImageUrl('logo')."')"; - $variables['image-logoheader'] = "'".$this->imageManager->getImageUrl('logoheader')."'"; - $variables['image-favicon'] = "'".$this->imageManager->getImageUrl('favicon')."'"; + $variables['image-logoheader'] = "url('".$this->imageManager->getImageUrl('logoheader')."')"; + $variables['image-favicon'] = "url('".$this->imageManager->getImageUrl('favicon')."')"; $variables['image-login-background'] = "url('".$this->imageManager->getImageUrl('background')."')"; $variables['image-login-plain'] = 'false'; diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php index ea8ab6975ef..e3434118cbc 100644 --- a/apps/theming/tests/ThemingDefaultsTest.php +++ b/apps/theming/tests/ThemingDefaultsTest.php @@ -680,8 +680,8 @@ class ThemingDefaultsTest extends TestCase { 'color-primary-element' => '#aaaaaa', 'theming-logoheader-mime' => '\'jpeg\'', 'theming-favicon-mime' => '\'jpeg\'', - 'image-logoheader' => '\'custom-logoheader?v=0\'', - 'image-favicon' => '\'custom-favicon?v=0\'', + 'image-logoheader' => "url('custom-logoheader?v=0')", + 'image-favicon' => "url('custom-favicon?v=0')", 'has-legal-links' => 'false' ]; $this->assertEquals($expected, $this->template->getScssVariables()); diff --git a/core/css/css-variables.scss b/core/css/css-variables.scss index e369874dec7..23c01988676 100644 --- a/core/css/css-variables.scss +++ b/core/css/css-variables.scss @@ -27,6 +27,8 @@ --image-logo: $image-logo; --image-login-background: $image-login-background; + --image-logoheader: $image-logoheader; + --image-favicon: $image-favicon; --color-loading-light: $color-loading-light; --color-loading-dark: $color-loading-dark; diff --git a/core/css/variables.scss b/core/css/variables.scss index 114cbd83370..35036248e55 100644 --- a/core/css/variables.scss +++ b/core/css/variables.scss @@ -65,6 +65,8 @@ $color-text-lighter: nc-lighten($color-main-text, 30%) !default; $image-logo: url('../img/logo/logo.svg?v=1') !default; $image-login-background: url('../img/background.png?v=2') !default; +$image-logoheader: url('../img/logo/logo.svg?v=1') !default; +$image-favicon: url('../img/logo/logo.svg?v=1') !default; $color-loading-light: #ccc !default; $color-loading-dark: #444 !default; |