Fix footer bar
This commit is contained in:
@@ -19,35 +19,43 @@ try {
|
||||
$menu = new $menuClass();
|
||||
$items = $menu->getItems();
|
||||
} catch (Exception $e) {
|
||||
$items = [];
|
||||
return;
|
||||
}
|
||||
|
||||
if (empty($items)) return;
|
||||
?>
|
||||
|
||||
<nav id="dokuwiki__pagetools" class="pagetools-statusbar" aria-labelledby="dokuwiki__pagetools__heading">
|
||||
<nav id="dokuwiki__pagetools" aria-labelledby="dokuwiki__pagetools__heading">
|
||||
<h3 class="a11y" id="dokuwiki__pagetools__heading"><?php echo $lang['page_tools']; ?></h3>
|
||||
<ul>
|
||||
<?php foreach ($items as $item): ?>
|
||||
<?php
|
||||
$accesskey = $item->getAccesskey();
|
||||
$label = hsc($item->getLabel());
|
||||
$title = hsc($item->getTitle());
|
||||
$link = $item->getLink();
|
||||
$type = $item->getType();
|
||||
$nofollow = $item->isNofollow() ? ' rel="nofollow"' : '';
|
||||
?>
|
||||
<li class="action <?php echo $type; ?>">
|
||||
<a href="<?php echo $link; ?>"
|
||||
title="<?php echo $title; ?><?php echo $accesskey ? ' [' . $accesskey . ']' : ''; ?>"
|
||||
<?php echo $accesskey ? 'accesskey="' . $accesskey . '"' : ''; ?>
|
||||
<?php echo $nofollow; ?>>
|
||||
<?php if ($accesskey): ?>
|
||||
<span class="accesskey"><?php echo strtoupper(hsc($accesskey)); ?></span>
|
||||
<?php endif; ?>
|
||||
<span class="label"><?php echo $label; ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<div class="tools">
|
||||
<ul>
|
||||
<?php foreach ($items as $item): ?>
|
||||
<?php
|
||||
$type = $item->getType();
|
||||
$accesskey = $item->getAccesskey();
|
||||
$label = hsc($item->getLabel());
|
||||
// Get link attributes from the item - this allows plugins to add their own classes
|
||||
$linkAttr = $item->getLinkAttributes('');
|
||||
$href = $linkAttr['href'] ?? $item->getLink();
|
||||
$class = $linkAttr['class'] ?? '';
|
||||
$rel = isset($linkAttr['rel']) ? ' rel="' . $linkAttr['rel'] . '"' : '';
|
||||
// Build title with accesskey hint
|
||||
$title = hsc($item->getTitle()) . ($accesskey ? ' [' . $accesskey . ']' : '');
|
||||
$accesskeyAttr = $accesskey ? ' accesskey="' . $accesskey . '"' : '';
|
||||
?>
|
||||
<li class="<?php echo $type; ?>">
|
||||
<a href="<?php echo $href; ?>"
|
||||
class="<?php echo $class; ?>"
|
||||
title="<?php echo $title; ?>"
|
||||
<?php echo $accesskeyAttr; ?>
|
||||
<?php echo $rel; ?>>
|
||||
<?php if ($accesskey): ?>
|
||||
<span class="accesskey"><?php echo strtoupper(hsc($accesskey)); ?></span>
|
||||
<?php endif; ?>
|
||||
<span class="label"><?php echo $label; ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user