1<?php
2/**
3 * Template header, included in the main and detail files
4 */
5
6// must be run from within DokuWiki
7if (!defined('DOKU_INC')) die();
8?>
9
10<!-- ********** HEADER ********** -->
11<div id="dokuwiki__header"><div class="pad group">
12
13    <?php tpl_includeFile('header.html') ?>
14
15    <div class="headings group">
16        <ul class="a11y skip">
17            <?php if(tpl_getConf('userChoice') == '1'): ?>
18                <li>
19                    <a href="#" title="<?php echo tpl_getLang('themeSwitch') ?>" rel="nofollow" id="themeSwitchMobile">
20                        <span> <?php echo tpl_getLang('themeSwitch') ?> </span>
21                    </a>
22                </li>
23            <?php endif ?>
24        </ul>
25
26        <h1><?php
27            // get logo either out of the template images folder or data/media folder
28            $logoSize = array();
29            $logo = tpl_getMediaFile(array(':wiki:logo.png', ':logo.png', 'images/logo.png'), false, $logoSize);
30
31            // display logo and wiki title in a link to the home page
32            tpl_link(
33                wl(),
34                '<img src="'.$logo.'" '.$logoSize[3].' alt="" /> <span>'.$conf['title'].'</span>',
35                'accesskey="h" title="[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                    ?>
56
57                    <?php if(tpl_getConf('userChoice') == '1'): ?>
58                        <li class="action profile">
59                            <a href="#" title="<?php echo tpl_getLang('themeSwitch') ?>" rel="nofollow" id="themeSwitch">
60                                <span> <?php echo tpl_getLang('themeSwitch') ?> </span>
61                                <?php echo file_get_contents(template('images/theme.svg')); ?>
62                            </a>
63                        </li>
64                    <?php endif ?>
65
66                    <?php
67                        echo (new \dokuwiki\Menu\UserMenu())->getListItems('action ');
68                    ?>
69                </ul>
70            </div>
71        <?php endif ?>
72
73        <!-- SITE TOOLS -->
74        <div id="dokuwiki__sitetools">
75            <h3 class="a11y"><?php echo $lang['site_tools']; ?></h3>
76            <?php tpl_searchform(); ?>
77            <div class="mobileTools">
78                <?php echo (new \dokuwiki\Menu\MobileMenu())->getDropdown($lang['tools']); ?>
79            </div>
80            <ul>
81                <?php echo (new \dokuwiki\Menu\SiteMenu())->getListItems('action ', false); ?>
82            </ul>
83        </div>
84
85    </div>
86
87    <!-- BREADCRUMBS -->
88    <?php if($conf['breadcrumbs'] || $conf['youarehere']): ?>
89        <div class="breadcrumbs">
90            <?php if($conf['youarehere']): ?>
91                <div class="youarehere"><?php tpl_youarehere() ?></div>
92            <?php endif ?>
93            <?php if($conf['breadcrumbs']): ?>
94                <div class="trace"><?php tpl_breadcrumbs() ?></div>
95            <?php endif ?>
96        </div>
97    <?php endif ?>
98
99    <hr class="a11y" />
100</div></div><!-- /header -->
101