Revert "Add alt to the logo, adapt css for logo"

This reverts commit bba5ab0532.
This commit is contained in:
John Molakvoæ 2023-01-17 14:19:23 +01:00
parent 7ab34eefc5
commit 9af7ee8d11
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
13 changed files with 21 additions and 10 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -188,9 +188,15 @@
} }
.logo { .logo {
display: inline-flex; 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; width: 62px;
position: absolute; position: absolute;
left: 12px; left: 12px;
top: 1px;
bottom: 1px;
// Invert if not customized and background is bright // Invert if not customized and background is bright
filter: var(--image-logoheader-custom, var(--background-image-invert-if-bright)); filter: var(--image-logoheader-custom, var(--background-image-invert-if-bright));
} }

Binary file not shown.

Binary file not shown.

View File

@ -35,8 +35,7 @@
<?php if ($_['bodyid'] === 'body-login'): ?> <?php if ($_['bodyid'] === 'body-login'): ?>
<header role="banner"> <header role="banner">
<div id="header"> <div id="header">
<div class="logo"></div>
<img class="logo" alt="<?php p($l->t('%s logo', [$theme->getName()])); ?>" src="<?= ($_['logoUrl'] ?? '') !== '' ? $_['logoUrl'] : $theme->getLogo(); ?>">
</div> </div>
</header> </header>
<?php endif; ?> <?php endif; ?>

View File

@ -37,8 +37,15 @@
</div> </div>
<header id="header"> <header id="header">
<div class="header-left" id="nextcloud"> <div class="header-left">
<img class="logo logo-icon svg" alt="<?php p($l->t('%s logo', [$theme->getName()])); ?>" src="<?= ($_['logoUrl'] ?? '') !== '' ? $_['logoUrl'] : $theme->getLogo(); ?>"> <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() !== '') { ?> <?php if (isset($template) && $template->getHeaderDetails() !== '') { ?>
<div class="header-shared-by"> <div class="header-shared-by">
<?php p($template->getHeaderDetails()); ?> <?php p($template->getHeaderDetails()); ?>

View File

@ -60,7 +60,7 @@ $getUserAvatar = static function (int $size) use ($_): string {
<div class="header-left"> <div class="header-left">
<a href="<?php print_unescaped($_['logoUrl'] ?: link_to('', 'index.php')); ?>" <a href="<?php print_unescaped($_['logoUrl'] ?: link_to('', 'index.php')); ?>"
id="nextcloud"> 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> </a>
<nav id="header-left__appmenu"></nav> <nav id="header-left__appmenu"></nav>

View File

@ -120,6 +120,10 @@ class TemplateLayout extends \OC_Template {
$this->assign('enabledThemes', $themesService->getEnabledThemes()); $this->assign('enabledThemes', $themesService->getEnabledThemes());
} }
// set logo link target
$logoUrl = $this->config->getSystemValueString('logo_url', '');
$this->assign('logoUrl', $logoUrl);
// Add navigation entry // Add navigation entry
$this->assign('application', ''); $this->assign('application', '');
$this->assign('appid', $appId); $this->assign('appid', $appId);
@ -190,11 +194,6 @@ class TemplateLayout extends \OC_Template {
} else { } else {
parent::__construct('core', 'layout.base'); 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 // Send the language and the locale to our layouts
$lang = \OC::$server->getL10NFactory()->findLanguage(); $lang = \OC::$server->getL10NFactory()->findLanguage();
$locale = \OC::$server->getL10NFactory()->findLocale($lang); $locale = \OC::$server->getL10NFactory()->findLocale($lang);