diff --git a/README.md b/README.md index 0c66d87..3be1d13 100644 --- a/README.md +++ b/README.md @@ -260,7 +260,10 @@ If the plugin is installed, the **Template Styles Settings** page will be expand ## Releases -- **_2023-12-12_** +- **_2024-02-05_** + - Added access key support to page elements [#64] (https://github.com/nomadjimbob/mikio/issues/64). Thanks rebeka-catalina. + +- **_2023-12-12_** - `autoDarkLight` configuration setting will override user setting when `showDarkLight` is disabled [#56](https://github.com/nomadjimbob/mikio/issues/56). - Cookies used in the template now use the upcoming `SameSite` requirement. diff --git a/mikio.php b/mikio.php index dbcfc08..4b60a49 100644 --- a/mikio.php +++ b/mikio.php @@ -569,8 +569,10 @@ public function includeDWMenu(bool $print = true) (strcasecmp($showItem, 'logged in') === 0 && $loggedIn === true) || (strcasecmp($showItem, 'logged out') === 0 && $loggedIn === false)) ) { + $title = isset($attr['title']) && $attr['title'] !== 0 ? $attr['title'] : $item->getTitle(); + $itemHtml .= ''; + ' ' . $item->getType() . '" href="' . $item->getLink() . '" title="' . $title . '"' . (isset($attr['accesskey']) && $attr['accesskey'] !== '' ? ' accesskey="' . $attr['accesskey'] . '"' : '') . '>'; if ($showIcons === true) { $itemHtml .= '' . inlineSVG($item->getSvg()) . ''; } @@ -1064,6 +1066,7 @@ public function includePageTools(bool $print = true, bool $includeId = false) } $classes = array_unique($classes); + $title = isset($attr['title']) && $attr['title'] !== 0 ? $attr['title'] : $item->getTitle(); $showItem = $this->getConf('pageToolsShow' . ucfirst($item->getType()), 'always'); if ( @@ -1073,7 +1076,7 @@ public function includePageTools(bool $print = true, bool $includeId = false) ) { $html .= '
  • '; $html .= '
    ' . inlineSVG($item->getSvg()) . + $title . '"' . (isset($attr['accesskey']) && $attr['accesskey'] !== '' ? ' accesskey="' . $attr['accesskey'] . '"' : '') . '>
    ' . inlineSVG($item->getSvg()) . '
    ' . $item->getLabel() . '
    '; $html .= '
  • '; } @@ -1452,6 +1455,7 @@ public function includeYouAreHere(bool $print = true, bool $parse = true) $html .= '
  • ' . tpl_pagelink($page, null, true) . '
  • '; } + $exists = false; resolve_pageid('', $page, $exists); if ((isset($page) === true && $page === $part . $parts[$i]) === false) { $page = $part . $parts[$i]; diff --git a/template.info.txt b/template.info.txt index 9df829f..efc37a4 100644 --- a/template.info.txt +++ b/template.info.txt @@ -1,7 +1,7 @@ base mikio author James Collins email james.collins@outlook.com.au -date 2023-12-11 +date 2024-02-05 name Mikio theme desc Mikio template based on Bootstrap 4 with hero element for Dokuwiki url https://www.dokuwiki.org/template:mikio