1<?php
2/**
3 * Khum1 DokuWiki Template 2020 (based on Zen, based on Default template)
4 *
5 * @link     http://dokuwiki.org/template
6 * @author   Zatalyz <zatalyz@liev.re>
7 * @author   Anika Henke <anika@selfthinker.org>
8 * @author   Clarence Lee <clarencedglee@gmail.com>
9 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
10 */
11
12if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
13header('X-UA-Compatible: IE=edge,chrome=1');
14
15$hasSidebar = page_findnearest($conf['sidebar']);
16$showSidebar = $hasSidebar && ($ACT=='show');
17?><!DOCTYPE html>
18<html lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
19<head>
20    <meta charset="utf-8" />
21    <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
22    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
23    <?php tpl_metaheaders() ?>
24    <meta name="viewport" content="width=device-width,initial-scale=1" />
25    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
26    <?php tpl_includeFile('meta.html') ?>
27</head>
28
29<body>
30	<?php tpl_includeFile('header.php'); ?>
31
32    <div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?> <?php
33        echo ($showSidebar) ? 'showSidebar' : ''; ?> <?php echo ($hasSidebar) ? 'hasSidebar' : ''; ?>">
34
35        <!-- Jump to content (accessibility -->
36        <ul class="a11y skip">
37            <li><a href="#dokuwiki__content"><?php echo $lang['skip_to_content']; ?></a></li>
38        </ul>
39
40		<!-- ********** HEADER ********** -->
41		<header id="dokuwiki__header">
42
43			<!-- Menu spécial mobiles -->
44			<div class="mobileTools">
45				<?php echo (new \dokuwiki\Menu\MobileMenu())->getDropdown($lang['tools']); ?>
46				<?php tpl_searchform(); ?>
47				<!-- translation (only with Translation Plugin) -->
48				<?php
49				$translation = plugin_load('helper','translation');
50				if ($translation) echo $translation->showTranslations();
51				?>
52			</div>
53
54			<!-- logo, wiki title, tagline, breadcrumb -->
55			<div class="headings">
56				<h1><?php
57					// get logo either out of the template images folder or data/media folder
58					$logo = tpl_getMediaFile(array(':wiki:logo.svg', ':wiki:logo.png', ':logo.png', 'images/logo.svg', 'images/logo.png'), false);
59
60					// display logo and wiki title in a link to the home page
61					// Add <span>'.$conf['title'].'</span> after img to have Wiki Title display
62					tpl_link(
63						wl(),
64						'<img src="'.$logo.'" '.$logoSize[3].' alt="'.$conf['title'].'" /> ',
65						'accesskey="h" title="[H] '.$conf['title'].'"'
66					);
67				?></h1>
68				<?php if ($conf['tagline']): ?>
69					<p class="claim"><?php echo $conf['tagline']; ?></p>
70				<?php endif ?>
71			</div>
72		</header>
73
74		<hr class="a11y" />
75		<!-- /header -->
76
77
78		<div id="dokuwiki__site">
79			<!--<div class="pad group">-->
80        <div class="wrapper group">
81
82                <!-- ********** Sidebar ********** -->
83                <?php if($showSidebar): ?>
84                <nav id="dokuwiki__sidebar">
85					<div class="biseau_left_top nomobile"></div>
86					<h3 class="toggle"><?php //echo $lang['sidebar'] ?></h3>
87					<div class="pad sidebar include group">
88						<div class="content"><div class="group">
89							<?php tpl_flush() ?>
90							<?php tpl_include_page($conf['sidebar'], true, true) ?>
91						</div></div>
92					</div>
93					<div class="biseau_2_bottom nomobile"></div>
94                </nav>
95                <?php endif; ?>
96                <!-- /Sidebar -->
97
98
99
100            <!-- ********** Article ********** -->
101            <div id="dokuwiki__content"><div class="pad group">
102                <?php html_msgarea() ?>
103
104				<!-- ********** Tab ********** -->
105                <div class="tabblocks">
106                    <div class="nomobile">
107
108						<ul class="tab_ul">
109					<?php
110					foreach ( (new \dokuwiki\Menu\PageMenu())->getItems() as $item ) {
111						if ( preg_match('/^childrenpages_/', $item->getType()) ) {
112							if ( $item->is_active ) {
113								echo '<li class="current_page"><div class="toptab_current_page"></div>'.$item->asHtmlLink(false, true).'</li>';
114							} else {
115								echo '<li><div class="toptab"></div>'.$item->asHtmlLink(false, true).'</li>';
116							}
117						}
118					}
119
120					?>
121						</ul>
122
123					</div>
124
125                </div>
126
127                <div class="biseau_right_top"></div>
128				<div class="page group">
129
130
131                    <?php tpl_flush() ?>
132                    <?php tpl_includeFile('pageheader.html') ?>
133
134
135                    <!-- wikipage start -->
136					<?php tpl_toc(false) ?>
137					<article class="kharticle">
138                    <?php tpl_content(false) ?>
139					</article>
140                    <!-- wikipage stop -->
141                    <?php tpl_includeFile('pagefooter.html') ?>
142                </div>
143                <div class="biseau_2_bottom"></div>
144				<footer class="article_footer">
145					<div class="buttons">
146						<?php
147							tpl_license('button', true, false, false); // license button, no wrapper
148							$target = ($conf['target']['extern']) ? 'target="'.$conf['target']['extern'].'"' : '';
149						?>
150						<a href="https://dokuwiki.org/" title="Driven by DokuWiki" <?php echo $target?>><img
151							src="<?php echo tpl_basedir(); ?>images/button-dw.png" width="80" height="15" alt="Driven by DokuWiki" /></a>
152					</div>
153                <div class="docInfo"><?php tpl_pageinfo() ?></div>
154                </footer>
155
156                <?php tpl_flush() ?>
157            </div></div><!-- /article -->
158
159            <hr class="a11y" />
160
161			<!-- ********** Right menu (tools) ********** -->
162			<div>
163			<nav class="nomobile navtool">
164				<div class="biseau_right_top nomobile"></div>
165				<div class="nomobile bartool"
166
167
168					<!-- searchtool-->
169					<div class="searchtool nomobile">
170						<?php tpl_searchform(); ?>
171					</div>
172					<!-- You are here -->
173					<?php if($conf['youarehere']): ?>
174						<div class="youarehere nomobile"><?php tpl_youarehere() ?></div>
175						<hr class="nomobile">
176					<?php endif ?>
177
178					<!-- Page Actions -->
179					<div class="dokuwiki__tools nomobile">
180						<h3 class="a11y"><?php echo $lang['page_tools']; ?></h3>
181						<ul>
182							<?php
183								$data = array(
184									//'view'  => 'main',
185									'items' => array(
186										'edit'      => tpl_action('edit',      true, 'li', true, '<span>', '</span>'),
187										'revert'    => tpl_action('revert',    true, 'li', true, '<span>', '</span>'),
188										'revisions' => tpl_action('revisions', true, 'li', true, '<span>', '</span>'),
189										'backlink'  => tpl_action('backlink',  true, 'li', true, '<span>', '</span>'),
190										'subscribe' => tpl_action('subscribe', true, 'li', true, '<span>', '</span>')
191									)
192								);
193
194								// the page tools can be amended through a custom plugin hook
195								$evt = new Doku_Event('TEMPLATE_PAGETOOLS_DISPLAY', $data);
196								if($evt->advise_before()){
197									foreach($evt->data['items'] as $k => $html) echo $html;
198								}
199								$evt->advise_after();
200								unset($data);
201								unset($evt);
202							?>
203						</ul>
204					</div>
205
206					<hr class="nomobile">
207
208					<!-- usertools and sitetools -->
209					<div class="dokuwiki__tools nomobile">
210						<?php if ($conf['useacl']): ?>
211						<h3 class="a11y"><?php echo $lang['user_tools']; ?></h3>
212						<ul><?php
213							// Afficher lien interwiki user
214							if (!empty($_SERVER['REMOTE_USER'])) {
215									echo '<li class="user">';
216									$loginname = $_SERVER["REMOTE_USER"];
217									$kh_userpage = tpl_getLang('kh_userpage');
218									echo "$kh_userpage ";
219									echo (tpl_getConf("khum1_userpage")
220										? html_wikilink(tpl_getConf("khum1_userpage_ns").$loginname, hsc($loginname))
221											: hsc($loginname));
222									echo '</li>';
223									}
224							// le reste des appels (pas mal de modif, attention aux comportements étranges ?)
225								tpl_toolsevent('tools', array(
226									tpl_action('admin', true, 'li', true),
227									tpl_action('profile', true, 'li', true),
228									tpl_action('media', true, 'li', true),
229									tpl_action('recent', true, 'li', true),
230									tpl_action('index', true, 'li', true),
231									tpl_action('register', true, 'li', true),
232									tpl_action('login', true, 'li', true),
233								));
234						?></ul>
235						<?php endif ?>
236					</div>
237					<hr class="nomobile">
238
239					<!-- translation (only with Translation Plugin) -->
240					<div>
241						<?php
242						$translation = plugin_load('helper','translation');
243						if ($translation) echo $translation->showTranslations();
244						?>
245					</div>
246
247					<!-- Breadcrumbs -->
248					<?php if($conf['breadcrumbs']): ?>
249						<div class="trace nomobile"><div><?php tpl_breadcrumbs() ?></div></div>
250					<?php endif ?>
251				</div>
252				<div class="biseau_2_bottom nomobile"></div>
253			</nav>
254			<div class="to_top">
255					<a href="#dokuwiki__top" class="action top" accesskey="t" rel="nofollow" title="Haut de page [T]">
256						<img src="<?php echo tpl_basedir(); ?>/images/top.png" / title="Haut de page [T]"></img>
257					</a>
258			</div>
259			<div>
260
261        </div><!-- /wrapper -->
262        </div><!-- dokuwiki__site-->
263
264    </div><!-- /site -->
265
266    <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
267    <div id="screen__mode" class="no"></div><?php /* helper to detect CSS media query in script.js */ ?>
268	<?php tpl_includeFile('footer.php'); ?>
269</body>
270</html>
271