tpl_header.php 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. /**
  3. * Template header, included in the main and detail files
  4. */
  5. // must be run from within DokuWiki
  6. if (!defined('DOKU_INC')) die();
  7. ?>
  8. <!-- ********** HEADER ********** -->
  9. <header id="dokuwiki__header"><div class="pad group">
  10. <?php tpl_includeFile('header.html') ?>
  11. <div class="headings group">
  12. <ul class="a11y skip">
  13. <li><a href="#dokuwiki__content"><?php echo $lang['skip_to_content']; ?></a></li>
  14. </ul>
  15. <h1 class="logo"><?php
  16. // get logo either out of the template images folder or data/media folder
  17. $logoSize = array();
  18. $logo = tpl_getMediaFile(array(':wiki:logo.png', ':logo.png', 'images/logo.png'), false, $logoSize);
  19. // display logo and wiki title in a link to the home page
  20. tpl_link(
  21. wl(),
  22. '<img src="'.$logo.'" '.$logoSize[3].' alt="" /> <span>'.$conf['title'].'</span>',
  23. 'accesskey="h" title="' . tpl_getLang('home') . ' [h]"'
  24. );
  25. ?></h1>
  26. <?php if ($conf['tagline']): ?>
  27. <p class="claim"><?php echo $conf['tagline']; ?></p>
  28. <?php endif ?>
  29. </div>
  30. <div class="tools group">
  31. <!-- USER TOOLS -->
  32. <?php if ($conf['useacl']): ?>
  33. <div id="dokuwiki__usertools">
  34. <h3 class="a11y"><?php echo $lang['user_tools']; ?></h3>
  35. <ul>
  36. <?php
  37. if (!empty($_SERVER['REMOTE_USER'])) {
  38. echo '<li class="user">';
  39. tpl_userinfo(); /* 'Logged in as ...' */
  40. echo '</li>';
  41. }
  42. echo (new \dokuwiki\Menu\UserMenu())->getListItems('action ');
  43. ?>
  44. </ul>
  45. </div>
  46. <?php endif ?>
  47. <!-- SITE TOOLS -->
  48. <div id="dokuwiki__sitetools">
  49. <h3 class="a11y"><?php echo $lang['site_tools']; ?></h3>
  50. <?php tpl_searchform(); ?>
  51. <div class="mobileTools">
  52. <?php echo (new \dokuwiki\Menu\MobileMenu())->getDropdown($lang['tools']); ?>
  53. </div>
  54. <ul>
  55. <?php echo (new \dokuwiki\Menu\SiteMenu())->getListItems('action ', false); ?>
  56. </ul>
  57. </div>
  58. </div>
  59. <!-- BREADCRUMBS -->
  60. <?php if($conf['breadcrumbs'] || $conf['youarehere']): ?>
  61. <div class="breadcrumbs">
  62. <?php if($conf['youarehere']): ?>
  63. <div class="youarehere"><?php tpl_youarehere() ?></div>
  64. <?php endif ?>
  65. <?php if($conf['breadcrumbs']): ?>
  66. <div class="trace"><?php tpl_breadcrumbs() ?></div>
  67. <?php endif ?>
  68. </div>
  69. <?php endif ?>
  70. <hr class="a11y" />
  71. </div></header><!-- /header -->