diff --git a/css/design.less b/css/design.less index e72d485..eca7da9 100755 --- a/css/design.less +++ b/css/design.less @@ -59,6 +59,21 @@ width: auto; } + .logo__image { + display: inline-flex; + align-items: center; + justify-content: center; + height: 1.5em; + width: 1.5em; + color: @ini_theme_color; + + svg { + display: block; + width: 100%; + height: 100%; + } + } + span { display: block; } @@ -76,6 +91,11 @@ margin-right: 0; } +[dir=rtl] #dokuwiki__header .logo .logo__image { + margin-left: 0; + margin-right: 0; +} + /* tools ********************************************************************/ @@ -139,7 +159,7 @@ } > form.search input { - width: 14em; + width: 24em; max-width: 100%; height: 24px; margin: 0; @@ -262,9 +282,11 @@ form.search { display: none; } - summary span { - font-size: 18px; - line-height: 1; + summary svg { + width: 16px; + height: 16px; + display: block; + fill: @ini_icons; } &[open] summary, @@ -273,6 +295,12 @@ form.search { border-color: @ini_link; color: @ini_link; } + + &[open] summary svg, + summary:hover svg, + summary:focus svg { + fill: @ini_link; + } } .header__menu-panel { @@ -398,27 +426,6 @@ form.search { /* content ********************************************************************/ -.dokuwiki .pageId { - float: right; - margin-right: -1em; - margin-bottom: -1px; - margin-top: 0; - overflow: hidden; - padding: 0 1em 0; - - span { - font-size: 0.875em; - border: solid @ini_border; - border-width: 1px 1px 0; - background-color: @ini_background; - color: @ini_text_alt; - padding: .1em .35em; - border-top-left-radius: 2px; - border-top-right-radius: 2px; - display: block; - } -} - .dokuwiki div.page { clear: both; background: @ini_background; @@ -446,12 +453,6 @@ form.search { text-align: left; } -[dir=rtl] .dokuwiki .pageId { - float: left; - margin-left: -1em; - margin-right: 0; -} - /* footer ********************************************************************/ diff --git a/css/mobile.less b/css/mobile.less index 8c2356b..e44c847 100755 --- a/css/mobile.less +++ b/css/mobile.less @@ -228,8 +228,7 @@ body { #dokuwiki__usertools, #dokuwiki__sitetools ul, #dokuwiki__sitetools h3, -.dokuwiki div.breadcrumbs, /* @todo: maybe move breadcrumbs to the bottom? */ -.dokuwiki .pageId { +.dokuwiki div.breadcrumbs { /* @todo: maybe move breadcrumbs to the bottom? */ display: none; } diff --git a/css/print.css b/css/print.css index dd5d71b..9081525 100755 --- a/css/print.css +++ b/css/print.css @@ -17,7 +17,6 @@ video, #dokuwiki__header .tools, #dokuwiki__aside, .dokuwiki .breadcrumbs, -.dokuwiki .pageId, #dw__toc, h3.toggle, #dokuwiki__pagetools, diff --git a/detail.php b/detail.php index c7daf9e..1536a86 100755 --- a/detail.php +++ b/detail.php @@ -35,10 +35,6 @@ if (!defined('DOKU_INC')) die();
- -
- -
diff --git a/images/logo.png b/images/logo.png deleted file mode 100755 index a1f4995..0000000 Binary files a/images/logo.png and /dev/null differ diff --git a/images/logo.svg b/images/logo.svg new file mode 100644 index 0000000..15d7761 --- /dev/null +++ b/images/logo.svg @@ -0,0 +1 @@ + diff --git a/main.php b/main.php index 7f7235a..8cfcbb5 100755 --- a/main.php +++ b/main.php @@ -49,8 +49,6 @@ $showSidebar = $hasSidebar && ($ACT == 'show');
-
-
diff --git a/script.js b/script.js index f7bf646..9917eac 100755 --- a/script.js +++ b/script.js @@ -87,6 +87,30 @@ jQuery(function(){ this.blur(); }); + (function enhanceHeaderMenu(){ + var $menu = jQuery('#dokuwiki__header .header__menu'); + + if ($menu.length === 0) { + return; + } + + function closeMenu() { + $menu.removeAttr('open'); + } + + jQuery(document).on('click', function (event) { + if (!jQuery(event.target).closest($menu).length) { + closeMenu(); + } + }); + + jQuery(document).on('keydown', function (event) { + if (event.key === 'Escape') { + closeMenu(); + } + }); + })(); + // make edit toolbar icons themeable by converting img icons to CSS masks (function enhanceEditToolbarIcons() { function toMaskIcons() { diff --git a/tpl_header.php b/tpl_header.php index 7025d19..459d822 100755 --- a/tpl_header.php +++ b/tpl_header.php @@ -6,6 +6,23 @@ // must be run from within DokuWiki 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); +} + +$templateLogoUrl = tpl_basedir() . 'images/logo.svg'; +$templateLogoPath = DOKU_TPLINC . 'images/logo.svg'; ?> @@ -13,76 +30,79 @@ if (!defined('DOKU_INC')) die(); -
-
    -
  • -
+
    +
  • +
-

+
+

' . - '' . $conf['title'] . '', - 'accesskey="h" title="' . tpl_getLang('home') . ' [h]"' - ); - ?>

- -

- -
+ if ($logo === $templateLogoUrl) { + $logoMarkup = ''; + } else { + $logoMarkup = ''; + } -
- - -
-

-
    - '; - tpl_userinfo(); /* 'Logged in as ...' */ - echo ''; - } - echo (new \dokuwiki\Menu\UserMenu())->getListItems('action '); - ?> -
-
- + tpl_link( + wl(), + $logoMarkup . + '' . $conf['title'] . '', + 'accesskey="h" title="' . tpl_getLang('home') . ' [h]"' + ); + ?>

- -
+ + + +
+ +

+ + +
+ + + + +
+ +
    + +
+ + + + + + + +
+

+
    + +
+
+ +
+
+ +
getDropdown($lang['tools']); ?>
-
    - getListItems('action '); ?> -
-
- - - - -