mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
add var for theming images , advanced options
Signed-off-by: Guillaume COMPAGNON <gcompagnon@outlook.com>
This commit is contained in:
parent
cd7af395d7
commit
ed399a31bd
6 changed files with 13 additions and 7 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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()),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue