1<?php
2/**
3 * docnavwiki base on dokuwiki Default Template 2012
4 *
5 * @link     http://dokuwiki.org/template
6 * @author   Anika Henke <anika@selfthinker.org>
7 * @author   Clarence Lee <clarencedglee@gmail.com>
8 * @author   Vincent Voisin
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 = False;
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<div id="dokuwiki__site">
31	<div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?> <?php echo ($showSidebar) ? 'showSidebar' : ''; ?> <?php echo ($hasSidebar) ? 'hasSidebar' : ''; ?>">
32	<div id=navbar onclick="storeScrollPosition()" >
33		<!-- ********** ASIDE ********** -->
34		<button id=closebtn class="closebtn" onclick="closeNav()">&#9776;</button>
35		<script>
36		try {
37			var sidebarState = localStorage.getItem('sidebar');
38			if (sidebarState == 'closed'){
39				navbar.style.visibility = "hidden";
40			} else {
41				navbar.style.visibility = "visible";
42			}
43		} catch (e){
44			console.error("navbar : {",e,"}");
45		}
46		</script>
47		<div id="dokuwiki__aside" ><div class="pad aside include group">
48			<h3 class="toggle"><?php echo $lang['sidebar'] ?></h3>
49			<div class="content"><div class="group">
50				<?php tpl_flush() ?>
51				<?php tpl_includeFile('sidebarheader.html') ?>
52				<?php tpl_include_page($conf['sidebar'], true, true) ?>
53				<?php tpl_includeFile('sidebarfooter.html') ?>
54			</div></div>
55		</div></div><!-- /aside -->
56	</div>
57
58
59	<div id=main >
60		<button id=openbtn class="openbtn" onclick="openNav()">&#9776;</button>
61		<script>
62		try {
63			var sidebarState = localStorage.getItem('sidebar');
64			if (sidebarState == 'closed'){
65				main.style.left = "0";
66				openbtn.style.visibility = "visible";
67			} else {
68				main.style.left = "18em";
69				openbtn.style.visibility = "hidden";
70			}
71		} catch (e){
72			console.error("openbtn : {",e,"}");
73		}
74		</script>
75		<div id="dokuwiki__site"><div id="dokuwiki__top" class="site">
76
77			<?php include('tpl_header.php') ?>
78
79			<div class="wrapper group">
80				<!-- ********** CONTENT ********** -->
81				<div id="dokuwiki__content"><div class="pad group">
82					<?php html_msgarea() ?>
83
84					<div class="pageId"><span><?php echo hsc($ID) ?></span></div>
85
86					<div class="page group">
87						<?php tpl_flush() ?>
88						<?php tpl_includeFile('pageheader.html') ?>
89						<!-- wikipage start -->
90						<?php tpl_content() ?>
91						<!-- wikipage stop -->
92						<?php tpl_includeFile('pagefooter.html') ?>
93					</div>
94
95					<div class="docInfo"><?php tpl_pageinfo() ?></div>
96
97					<?php tpl_flush() ?>
98				</div></div><!-- /content -->
99
100				<hr class="a11y" />
101
102				<!-- PAGE ACTIONS -->
103				<div id="dokuwiki__pagetools">
104					<h3 class="a11y"><?php echo $lang['page_tools']; ?></h3>
105					<div class="tools">
106						<ul>
107							<?php echo (new \dokuwiki\Menu\PageMenu())->getListItems(); ?>
108						</ul>
109					</div>
110				</div>
111			</div><!-- /wrapper -->
112
113			<?php include('tpl_footer.php') ?>
114		</div></div><!-- /site -->
115
116		<div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
117		<div id="screen__mode" class="no"></div><?php /* helper to detect CSS media query in script.js */ ?>
118	</div>
119	</div>
120</div><!-- /site -->
121</body>
122</html>
123