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