Skip to content

Commit

Permalink
Merge pull request #35412 from nextcloud/fix/fix-33741-h1_should_inst…
Browse files Browse the repository at this point in the history
…ead_be_in_the_app_content-stable25

[stable25] Place ```<h1>``` into main content
  • Loading branch information
blizzz authored Nov 25, 2022
2 parents e58cf22 + c739fae commit e07b8e0
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 26 deletions.
9 changes: 4 additions & 5 deletions core/templates/layout.guest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,14 @@
<?php if ($_['bodyid'] === 'body-login'): ?>
<header role="banner">
<div id="header">
<div class="logo">
<h1 class="hidden-visually">
<?php p($theme->getName()); ?>
</h1>
</div>
<div class="logo"></div>
</div>
</header>
<?php endif; ?>
<main>
<h1 class="hidden-visually">
<?php p($theme->getName()); ?>
</h1>
<?php print_unescaped($_['content']); ?>
</main>
</div>
Expand Down
33 changes: 19 additions & 14 deletions core/templates/layout.public.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,19 @@

<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="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()); ?>
</div>
<?php } ?>
</span>
<?php } ?>
</div>

<div class="header-right">
Expand Down Expand Up @@ -87,9 +85,16 @@
} ?>
</div>
</header>
<div id="content" class="app-<?php p($_['appid']) ?>" role="main">
<main id="content" class="app-<?php p($_['appid']) ?>">
<h1 class="hidden-visually">
<?php if (isset($template) && $template->getHeaderTitle() !== '') { ?>
<?php p($template->getHeaderTitle()); ?>
<?php } else { ?>
<?php p($theme->getName()); ?>
<?php } ?>
</h1>
<?php print_unescaped($_['content']); ?>
</div>
</main>
<?php if (isset($template) && $template->getFooterVisible()) { ?>
<footer>
<p><?php print_unescaped($theme->getLongFooter()); ?></p>
Expand Down
13 changes: 6 additions & 7 deletions core/templates/layout.user.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,7 @@
<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>
<div class="logo logo-icon"></div>
</a>

<nav id="header-left__appmenu"></nav>
Expand Down Expand Up @@ -133,9 +129,12 @@
<input class="confirm" value="<?php p($l->t('Confirm')); ?>" type="submit">
</form>

<div id="content" class="app-<?php p($_['appid']) ?>" role="main">
<main id="content" class="app-<?php p($_['appid']) ?>">
<h1 class="hidden-visually">
<?php p($l->t('%s\'s homepage', [$theme->getName()])); ?>
</h1>
<?php print_unescaped($_['content']); ?>
</div>
</main>
<div id="profiler-toolbar"></div>
</body>
</html>

0 comments on commit e07b8e0

Please sign in to comment.