Merge pull request #4910 from nextcloud/make-the-logo-smaller-cream

Fix logo being too big on log in page, fix #4585
This commit is contained in:
Lukas Reschke 2017-05-19 20:50:09 +02:00 committed by GitHub
commit c1c676f602
3 changed files with 15 additions and 7 deletions

View File

@ -44,8 +44,10 @@
/* override styles for login screen in guest.css */ /* override styles for login screen in guest.css */
#header .logo, #header .logo,
#header .logo-icon { #header .logo-icon {
background-size: contain;
background-image: url(#{$image-logo}); background-image: url(#{$image-logo});
@if $theming-logo-mime != '' {
background-size: contain;
}
} }
#body-login, #body-login,
@ -111,4 +113,4 @@ input.primary {
} }
} }
} }
} }

View File

@ -192,6 +192,8 @@ class ThemingDefaults extends \OC_Defaults {
$variables = [ $variables = [
'theming-cachebuster' => "'" . $this->config->getAppValue('theming', 'cachebuster', '0') . "'", '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())."'"; $variables['image-logo'] = "'".$this->urlGenerator->getAbsoluteURL($this->getLogo())."'";

View File

@ -499,12 +499,14 @@ class ThemingDefaultsTest extends TestCase {
public function testGetScssVariables() { public function testGetScssVariables() {
$this->config->expects($this->at(0))->method('getAppValue')->with('theming', 'cachebuster', '0')->willReturn('0'); $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(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(2))->method('getAppValue')->with('theming', 'backgroundMime', false)->willReturn('jpeg');
$this->config->expects($this->at(3))->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(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(5))->method('getAppValue')->with('theming', 'backgroundMime', false)->willReturn('jpeg');
$this->config->expects($this->at(6))->method('getAppValue')->with('theming', 'color', $this->defaults->getColorPrimary())->willReturn($this->defaults->getColorPrimary()); $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', $this->defaults->getColorPrimary())->willReturn($this->defaults->getColorPrimary()); $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->util->expects($this->any())->method('invertTextColor')->with($this->defaults->getColorPrimary())->willReturn(false);
$this->cache->expects($this->once())->method('get')->with('getScssVariables')->willReturn(null); $this->cache->expects($this->once())->method('get')->with('getScssVariables')->willReturn(null);
@ -530,6 +532,8 @@ class ThemingDefaultsTest extends TestCase {
$expected = [ $expected = [
'theming-cachebuster' => '\'0\'', 'theming-cachebuster' => '\'0\'',
'theming-logo-mime' => '\'jpeg\'',
'theming-background-mime' => '\'jpeg\'',
'image-logo' => "'absolute-custom-logo?v=0'", 'image-logo' => "'absolute-custom-logo?v=0'",
'image-login-background' => "'absolute-custom-background?v=0'", 'image-login-background' => "'absolute-custom-background?v=0'",
'color-primary' => $this->defaults->getColorPrimary(), 'color-primary' => $this->defaults->getColorPrimary(),