Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions core/css/guest.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,12 @@ body {
}

#header .logo {
max-width: 175px;
width: auto;
max-height: 130px;
background-image: var(--image-logo, url('../../core/img/logo/logo.svg'));
background-repeat: no-repeat;
background-size: contain;
background-position: center;
width: 175px;
height: 130px;
margin: 0 auto;
position: relative;
left: unset;
Expand Down
6 changes: 6 additions & 0 deletions core/css/header.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/css/header.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions core/css/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,15 @@
}
.logo {
display: inline-flex;
background-image: var(--image-logoheader, var(--image-logo, url('../img/logo/logo.svg')));
background-repeat: no-repeat;
background-size: contain;
background-position: center;
width: 62px;
position: absolute;
left: 12px;
top: 1px;
bottom: 1px;
// Invert if not customized and background is bright
filter: var(--image-logoheader-custom, var(--background-image-invert-if-bright));
}
Expand Down
6 changes: 6 additions & 0 deletions core/css/server.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/css/server.css.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions core/templates/layout.guest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
<?php if ($_['bodyid'] === 'body-login'): ?>
<header role="banner">
<div id="header">

<img class="logo" alt="<?php p($l->t('%s logo', [$theme->getName()])); ?>" src="<?= ($_['logoUrl'] ?? '') !== '' ? $_['logoUrl'] : $theme->getLogo(); ?>">
<div class="logo"></div>
</div>
</header>
<?php endif; ?>
Expand Down
11 changes: 9 additions & 2 deletions core/templates/layout.public.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,15 @@
</div>

<header id="header">
<div class="header-left" id="nextcloud">
<img class="logo logo-icon svg" alt="<?php p($l->t('%s logo', [$theme->getName()])); ?>" src="<?= ($_['logoUrl'] ?? '') !== '' ? $_['logoUrl'] : $theme->getLogo(); ?>">
<div class="header-left">
<div class="logo logo-icon svg"></div>
<span id="nextcloud" class="header-appname">
<?php if (isset($template) && $template->getHeaderTitle() !== '') { ?>
<?php p($template->getHeaderTitle()); ?>
<?php } else { ?>
<?php p($theme->getName()); ?>
<?php } ?>
</span>
<?php if (isset($template) && $template->getHeaderDetails() !== '') { ?>
<div class="header-shared-by">
<?php p($template->getHeaderDetails()); ?>
Expand Down
2 changes: 1 addition & 1 deletion core/templates/layout.user.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<div class="header-left">
<a href="<?php print_unescaped($_['logoUrl'] ?: link_to('', 'index.php')); ?>"
id="nextcloud">
<img class="logo logo-icon" alt="<?php p($l->t('%s logo', [$theme->getName()])); ?>" src="<?= ($_['logoUrl'] ?? '') !== '' ? $_['logoUrl'] : $theme->getLogo(); ?>">
<div class="logo logo-icon"></div>
</a>

<nav id="header-left__appmenu"></nav>
Expand Down
9 changes: 4 additions & 5 deletions lib/private/TemplateLayout.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ public function __construct($renderAs, $appId = '') {
$this->assign('enabledThemes', $themesService->getEnabledThemes());
}

// set logo link target
$logoUrl = $this->config->getSystemValueString('logo_url', '');
$this->assign('logoUrl', $logoUrl);

// Add navigation entry
$this->assign('application', '');
$this->assign('appid', $appId);
Expand Down Expand Up @@ -184,11 +188,6 @@ public function __construct($renderAs, $appId = '') {
} else {
parent::__construct('core', 'layout.base');
}

// set logo link target
$logoUrl = $this->config->getSystemValueString('logo_url', '');
$this->assign('logoUrl', $logoUrl);

// Send the language and the locale to our layouts
$lang = \OC::$server->getL10NFactory()->findLanguage();
$locale = \OC::$server->getL10NFactory()->findLocale($lang);
Expand Down