Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-05-19 22:56:11 +0300
committerGitHub <noreply@github.com>2017-05-19 22:56:11 +0300
commitebd15f50d9cad47d924cc9b27211350bbaa4fb0e (patch)
treeb2fa05c24f93596bb1ecd9863824730e90174d66
parent6e2139f60eb6a96deefacd046202d8617fd30b77 (diff)
parentc190dfbe537750e85fedff5931f84a8f0660087a (diff)
Merge pull request #4976 from nextcloud/stable12-4910v12.0.0RC2
[stable12] Fix logo being too big on log in page
-rw-r--r--apps/theming/css/theming.scss6
-rw-r--r--apps/theming/lib/ThemingDefaults.php2
-rw-r--r--apps/theming/tests/ThemingDefaultsTest.php14
3 files changed, 15 insertions, 7 deletions
diff --git a/apps/theming/css/theming.scss b/apps/theming/css/theming.scss
index 2d0afa2d298..ac303f61a6b 100644
--- a/apps/theming/css/theming.scss
+++ b/apps/theming/css/theming.scss
@@ -44,8 +44,10 @@
/* override styles for login screen in guest.css */
#header .logo,
#header .logo-icon {
- background-size: contain;
background-image: url(#{$image-logo});
+ @if $theming-logo-mime != '' {
+ background-size: contain;
+ }
}
#body-login,
@@ -111,4 +113,4 @@ input.primary {
}
}
}
-} \ No newline at end of file
+}
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php
index 0824a36ccdc..2b3be1e6413 100644
--- a/apps/theming/lib/ThemingDefaults.php
+++ b/apps/theming/lib/ThemingDefaults.php
@@ -192,6 +192,8 @@ class ThemingDefaults extends \OC_Defaults {
$variables = [
'theming-cachebuster' => "'" . $this->config->getAppValue('theming', 'cachebuster', '0') . "'",
+ 'theming-logo-mime' => "'" . $this->config->getAppValue('theming', 'logoMime', '') . "'",
+ 'theming-background-mime' => "'" . $this->config->getAppValue('theming', 'backgroundMime', '') . "'"
];
$variables['image-logo'] = "'".$this->urlGenerator->getAbsoluteURL($this->getLogo())."'";
diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php
index a7cb7790aa6..8646eaf865f 100644
--- a/apps/theming/tests/ThemingDefaultsTest.php
+++ b/apps/theming/tests/ThemingDefaultsTest.php
@@ -499,12 +499,14 @@ class ThemingDefaultsTest extends TestCase {
public function testGetScssVariables() {
$this->config->expects($this->at(0))->method('getAppValue')->with('theming', 'cachebuster', '0')->willReturn('0');
$this->config->expects($this->at(1))->method('getAppValue')->with('theming', 'logoMime', false)->willReturn('jpeg');
- $this->config->expects($this->at(2))->method('getAppValue')->with('theming', 'cachebuster', '0')->willReturn('0');
- $this->config->expects($this->at(3))->method('getAppValue')->with('theming', 'backgroundMime', false)->willReturn('jpeg');
+ $this->config->expects($this->at(2))->method('getAppValue')->with('theming', 'backgroundMime', false)->willReturn('jpeg');
+ $this->config->expects($this->at(3))->method('getAppValue')->with('theming', 'logoMime', false)->willReturn('jpeg');
$this->config->expects($this->at(4))->method('getAppValue')->with('theming', 'cachebuster', '0')->willReturn('0');
- $this->config->expects($this->at(5))->method('getAppValue')->with('theming', 'color', null)->willReturn($this->defaults->getColorPrimary());
- $this->config->expects($this->at(6))->method('getAppValue')->with('theming', 'color', $this->defaults->getColorPrimary())->willReturn($this->defaults->getColorPrimary());
- $this->config->expects($this->at(7))->method('getAppValue')->with('theming', 'color', $this->defaults->getColorPrimary())->willReturn($this->defaults->getColorPrimary());
+ $this->config->expects($this->at(5))->method('getAppValue')->with('theming', 'backgroundMime', false)->willReturn('jpeg');
+ $this->config->expects($this->at(6))->method('getAppValue')->with('theming', 'cachebuster', '0')->willReturn('0');
+ $this->config->expects($this->at(7))->method('getAppValue')->with('theming', 'color', null)->willReturn($this->defaults->getColorPrimary());
+ $this->config->expects($this->at(8))->method('getAppValue')->with('theming', 'color', $this->defaults->getColorPrimary())->willReturn($this->defaults->getColorPrimary());
+ $this->config->expects($this->at(9))->method('getAppValue')->with('theming', 'color', $this->defaults->getColorPrimary())->willReturn($this->defaults->getColorPrimary());
$this->util->expects($this->any())->method('invertTextColor')->with($this->defaults->getColorPrimary())->willReturn(false);
$this->cache->expects($this->once())->method('get')->with('getScssVariables')->willReturn(null);
@@ -530,6 +532,8 @@ class ThemingDefaultsTest extends TestCase {
$expected = [
'theming-cachebuster' => '\'0\'',
+ 'theming-logo-mime' => '\'jpeg\'',
+ 'theming-background-mime' => '\'jpeg\'',
'image-logo' => "'absolute-custom-logo?v=0'",
'image-login-background' => "'absolute-custom-background?v=0'",
'color-primary' => $this->defaults->getColorPrimary(),