Skip to content

Commit

Permalink
Add alt to the logo, adapt css for logo
Browse files Browse the repository at this point in the history
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
  • Loading branch information
JuliaKirschenheuter committed Nov 14, 2022
1 parent dce8345 commit 204bcc3
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 49 deletions.
9 changes: 3 additions & 6 deletions core/css/guest.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,9 @@ body {
}

#header .logo {
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;
max-width: 175px;
width: auto;
max-height: 130px;
margin: 0 auto;
position: relative;
left: unset;
Expand Down
6 changes: 0 additions & 6 deletions core/css/header.css

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

6 changes: 0 additions & 6 deletions core/css/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,9 @@
}
.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;
}

.header-appname-container {
Expand Down
6 changes: 0 additions & 6 deletions core/css/server.css

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

9 changes: 4 additions & 5 deletions core/templates/layout.guest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@
<div class="v-align">
<?php if ($_['bodyid'] === 'body-login'): ?>
<header role="banner">
<h1 class="hidden-visually">
<?php p($theme->getName()); ?>
</h1>
<div id="header">
<div class="logo">
<h1 class="hidden-visually">
<?php p($theme->getName()); ?>
</h1>
</div>
<img class="logo" alt="<?= 'Logo'.' '.$theme->getName() ?>" src="<?= $_['logoUrl'].$theme->getLogo(); ?>">
</div>
</header>
<?php endif; ?>
Expand Down
28 changes: 13 additions & 15 deletions core/templates/layout.public.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,20 @@
</div>

<header id="header">
<div class="header-left">
<span id="nextcloud">
<div class="logo logo-icon svg"></div>
<h1 class="header-appname">
<?php if (isset($template) && $template->getHeaderTitle() !== '') { ?>
<?php p($template->getHeaderTitle()); ?>
<?php } else { ?>
<?php p($theme->getName()); ?>
<?php } ?>
</h1>
<?php if (isset($template) && $template->getHeaderDetails() !== '') { ?>
<div class="header-shared-by">
<?php p($template->getHeaderDetails()); ?>
</div>
<div class="header-left" id="nextcloud">
<img class="logo logo-icon svg" alt="<?= p($l->t('Logo')).' '.$theme->getName() ?>" src="<?= $_['logoUrl'].$theme->getLogo(); ?>">
<h1 class="header-appname">
<?php if (isset($template) && $template->getHeaderTitle() !== '') { ?>
<?php p($template->getHeaderTitle()); ?>
<?php } else { ?>
<?php p($theme->getName()); ?>
<?php } ?>
</span>
</h1>
<?php if (isset($template) && $template->getHeaderDetails() !== '') { ?>
<div class="header-shared-by">
<?php p($template->getHeaderDetails()); ?>
</div>
<?php } ?>
</div>

<div class="header-right">
Expand Down
9 changes: 4 additions & 5 deletions core/templates/layout.user.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,13 @@
</div>

<header role="banner" id="header">
<h1 class="hidden-visually">
<?php p($l->t('%s\'s homepage', [$theme->getName()])); ?>
</h1>
<div class="header-left">
<a href="<?php print_unescaped($_['logoUrl'] ?: link_to('', 'index.php')); ?>"
id="nextcloud">
<div class="logo logo-icon">
<h1 class="hidden-visually">
<?php p($l->t('%s\'s homepage', [$theme->getName()])); ?>
</h1>
</div>
<img class="logo logo-icon" alt="<?= p($l->t('Logo')).' '.$theme->getName() ?>" src="<?= $_['logoUrl'].$theme->getLogo(); ?>">
</a>

<nav id="header-left__appmenu"></nav>
Expand Down

0 comments on commit 204bcc3

Please sign in to comment.