This commit is contained in:
2026-03-06 09:03:17 +01:00
parent de371c413c
commit 27a4ac604f

View File

@@ -6,20 +6,6 @@
// must be run from within DokuWiki // must be run from within DokuWiki
if (!defined('DOKU_INC')) die(); if (!defined('DOKU_INC')) die();
$siteToolsHtml = (new \dokuwiki\Menu\SiteMenu())->getListItems('action ');
$userToolsHtml = '';
if ($conf['useacl']) {
$userToolsHtml = (new \dokuwiki\Menu\UserMenu())->getListItems('action ');
}
$breadcrumbsHtml = '';
if ($conf['youarehere']) {
$breadcrumbsHtml = tpl_youarehere(null, true);
}
if (!$breadcrumbsHtml && $conf['breadcrumbs']) {
$breadcrumbsHtml = tpl_breadcrumbs(null, true);
}
?> ?>
<!-- ********** HEADER ********** --> <!-- ********** HEADER ********** -->
@@ -27,73 +13,76 @@ if (!$breadcrumbsHtml && $conf['breadcrumbs']) {
<?php tpl_includeFile('header.html') ?> <?php tpl_includeFile('header.html') ?>
<ul class="a11y skip"> <div class="headings group">
<li><a href="#dokuwiki__content"><?php echo $lang['skip_to_content']; ?></a></li> <ul class="a11y skip">
</ul> <li><a href="#dokuwiki__content"><?php echo $lang['skip_to_content']; ?></a></li>
</ul>
<div class="header__bar"> <h1 class="logo"><?php
<div class="headings header__brand"> // get logo either out of the template images folder or data/media folder
<h1 class="logo"><?php $logoSize = [];
// get logo either out of the template images folder or data/media folder $logo = tpl_getMediaFile([
$logoSize = []; ':wiki:logo.svg', ':logo.svg',
$logo = tpl_getMediaFile([ ':wiki:logo.png', ':logo.png',
':wiki:logo.svg', ':logo.svg', 'images/logo.svg', 'images/logo.png'
':wiki:logo.png', ':logo.png', ], false, $logoSize);
'images/logo.svg', 'images/logo.png'
], false, $logoSize);
// display logo and wiki title in a link to the home page // display logo and wiki title in a link to the home page
tpl_link( tpl_link(
wl(), wl(),
'<img src="' . $logo . '" ' . ($logoSize ? $logoSize[3] : '') . ' alt="" />' . '<img src="' . $logo . '" ' . ($logoSize ? $logoSize[3] : '') . ' alt="" />' .
'<span>' . $conf['title'] . '</span>', '<span>' . $conf['title'] . '</span>',
'accesskey="h" title="' . tpl_getLang('home') . ' [h]"' 'accesskey="h" title="' . tpl_getLang('home') . ' [h]"'
); );
?></h1> ?></h1>
<?php if ($conf['tagline']) : ?>
<p class="claim"><?php echo $conf['tagline']; ?></p>
<?php endif ?>
</div>
<?php if ($breadcrumbsHtml) : ?> <div class="tools group">
<div class="breadcrumbs header__breadcrumbs"><?php echo $bread crumbsHtml; ?></div> <!-- USER TOOLS -->
<?php endif ?> <?php if ($conf['useacl']) : ?>
</div> <div id="dokuwiki__usertools">
<h3 class="a11y"><?php echo $lang['user_tools']; ?></h3>
<ul>
<?php
if (!empty($_SERVER['REMOTE_USER'])) {
echo '<li class="user">';
tpl_userinfo(); /* 'Logged in as ...' */
echo '</li>';
}
echo (new \dokuwiki\Menu\UserMenu())->getListItems('action ');
?>
</ul>
</div>
<?php endif ?>
<div id="dokuwiki__sitetools" class="tools header__actions"> <!-- SITE TOOLS -->
<div id="dokuwiki__sitetools">
<h3 class="a11y"><?php echo $lang['site_tools']; ?></h3> <h3 class="a11y"><?php echo $lang['site_tools']; ?></h3>
<?php tpl_searchform(true, false); ?> <?php tpl_searchform(true, false); ?>
<?php if ($siteToolsHtml || $userToolsHtml) : ?>
<details class="header__menu">
<summary aria-label="<?php echo hsc($lang['tools']); ?>" title="<?php echo hsc($lang['tools']); ?>">
<span aria-hidden="true">&#8942;</span>
</summary>
<div class="header__menu-panel">
<?php if ($siteToolsHtml) : ?>
<ul class="header__menu-list header__menu-list--site">
<?php echo $siteToolsHtml; ?>
</ul>
<?php endif ?>
<?php if ($siteToolsHtml && $userToolsHtml) : ?>
<div class="header__menu-separator" role="separator"></div>
<?php endif ?>
<?php if ($userToolsHtml) : ?>
<div id="dokuwiki__usertools">
<h3 class="a11y"><?php echo $lang['user_tools']; ?></h3>
<ul class="header__menu-list header__menu-list--user">
<?php echo $userToolsHtml; ?>
</ul>
</div>
<?php endif ?>
</div>
</details>
<?php endif ?>
<div class="mobileTools"> <div class="mobileTools">
<?php echo (new \dokuwiki\Menu\MobileMenu())->getDropdown($lang['tools']); ?> <?php echo (new \dokuwiki\Menu\MobileMenu())->getDropdown($lang['tools']); ?>
</div> </div>
<ul>
<?php echo (new \dokuwiki\Menu\SiteMenu())->getListItems('action '); ?>
</ul>
</div> </div>
</div> </div>
<!-- BREADCRUMBS -->
<?php if ($conf['breadcrumbs'] || $conf['youarehere']) : ?>
<div class="breadcrumbs">
<?php if ($conf['youarehere']) : ?>
<div class="youarehere"><?php tpl_youarehere() ?></div>
<?php endif ?>
<?php if ($conf['breadcrumbs']) : ?>
<div class="trace"><?php tpl_breadcrumbs() ?></div>
<?php endif ?>
</div>
<?php endif ?>
<hr class="a11y" /> <hr class="a11y" />
</div></header><!-- /header --> </div></header><!-- /header -->