1<?php
2if (!defined('DOKU_INC')) {
3    die();
4}
5/* must be run from within DokuWiki */
6@require_once dirname(__FILE__) . '/tpl_functions.php'; /* include hook for template functions */
7
8$showTools = !tpl_getConf('hideTools') || (tpl_getConf('hideTools') && !empty($_SERVER['REMOTE_USER']));
9$showSidebar = page_findnearest($conf['sidebar']) && ($ACT == 'show');
10$showIcon = tpl_getConf('showIcon');
11?>
12<!DOCTYPE html>
13<html lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>">
14<!--
15=========================================================
16*  Argon Dokuwiki Template
17*  Based on the Argon Design System by Creative Tim
18*  Ported to Dokuwiki by Anchit (@IceWreck)
19=========================================================
20 -->
21	<head>
22		<meta charset="utf-8" />
23		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
24		<link rel="apple-touch-icon" sizes="76x76" href="assets/img/apple-icon.png">
25		<link rel="icon" type="image/png" href="assets/img/favicon.png">
26		<title>
27			<?php tpl_pagetitle()?>
28			[<?php echo strip_tags($conf['title']) ?>]
29        </title>
30		<?php tpl_metaheaders()?>
31		<?php echo tpl_favicon(array(
32			'favicon',
33			'mobile',
34		))
35		?>
36
37		<?php tpl_includeFile('meta.html')?>
38
39		<!--
40		I know the CSS and JS imports can be done within the style.ini and script.js files,
41		but I had some issues with styling (and import order) there, so I'm doing those imports here.
42		-->
43		<!--     Fonts and icons  -->
44		<link href="<?php echo tpl_basedir(); ?>assets/css/fonts.css" rel="stylesheet">
45		<!-- CSS Files -->
46		<link href="<?php echo tpl_basedir(); ?>assets/css/doku.css" rel="stylesheet" />
47
48
49	</head>
50
51	<body class="docs ">
52		<div id="dokuwiki__site">
53
54
55			<header
56				class="navbar navbar-horizontal navbar-expand navbar-dark flex-row align-items-md-center ct-navbar bg-primary py-2">
57
58				<?php
59				if ($showIcon) {
60				?>
61					<div class="header-title">
62						<?php
63						// get logo either out of the template images folder or data/media folder
64						$logoSize = array();
65						$logo = tpl_getMediaFile(array(':wiki:logo.png', ':logo.png', 'images/logo.png', ':wiki:dokuwiki-128.png'), false, $logoSize);
66						// display logo and wiki title in a link to the home page
67						tpl_link(
68							wl(),
69							'<img src="'.$logo.'" width="30px" alt="" /> <span>'.$conf['title'].'</span>',
70							'accesskey="h" title="[H]"'
71						);
72						?>
73					</div>
74				<?php }else{?>
75					<div class="btn btn-neutral btn-icon">
76						<span class="btn-inner--icon">
77							<!-- <i class=""></i> -->
78						</span>
79						<span
80							class="nav-link-inner--text"><?php tpl_link(wl(), $conf['title'], 'accesskey="h" title="[H]"')?></span>
81
82					</div>
83				<?php }?>
84
85
86				<div class="d-none d-sm-block ml-auto">
87					<ul class="navbar-nav ct-navbar-nav flex-row align-items-center">
88
89						<?php
90						$menu_items = (new \dokuwiki\Menu\UserMenu())->getItems();
91						foreach($menu_items as $item) {
92						echo '<li class="'.$item->getType().'">'
93							.'<a class="nav-link" href="'.$item->getLink().'" title="'.$item->getTitle().'">'
94							.'<i class="argon-doku-navbar-icon" aria-hidden="true">'.inlineSVG($item->getSvg()).'</i>'
95							. '<span class="a11y">'.$item->getLabel().'</span>'
96							. '</a></li>';
97						}
98
99						?>
100
101
102						<li class="nav-item">
103							<div class="search-form">
104								<?php tpl_searchform()?>
105							</div>
106						</li>
107
108
109					</ul>
110				</div>
111				<button class="navbar-toggler ct-search-docs-toggle d-block d-md-none ml-auto ml-sm-0" type="button"
112					data-toggle="collapse" data-target="#ct-docs-nav" aria-controls="ct-docs-nav" aria-expanded="false"
113					aria-label="Toggle docs navigation">
114					<span class="navbar-toggler-icon"></span>
115				</button>
116
117			</header>
118
119
120
121			<div class="container-fluid">
122				<div class="row flex-xl-nowrap">
123
124
125					<?php
126					// Render the content initially
127					ob_start();
128					tpl_content(false);
129					$buffer = ob_get_clean();
130					?>
131
132					<!-- left sidebar -->
133					<div class="col-12 col-md-3 col-xl-2 ct-sidebar">
134						<nav class="collapse ct-links" id="ct-docs-nav">
135							<?php
136							if (!empty($_SERVER['REMOTE_USER'])) {
137								echo '<li class="nav-item nav-link"> ';
138								tpl_userinfo();
139								echo '</li>';
140							}
141							?>
142							<?php if ($showTools && !tpl_getConf('movePageTools')): ?>
143							<div id="dokuwiki__pagetools" class="ct-toc-item active">
144								<a class="ct-toc-link">
145									<?php echo $lang['page_tools'] ?>
146								</a>
147								<ul class="nav ct-sidenav">
148									<?php
149									$menu_items = (new \dokuwiki\Menu\PageMenu())->getItems();
150									foreach($menu_items as $item) {
151									echo '<li class="'.$item->getType().'">'
152										.'<a class="'.$item->getLinkAttributes('')['class'].'" href="'.$item->getLink().'" title="'.$item->getTitle().'">'
153										. $item->getLabel()
154										. '</a></li>';
155									}
156									?>
157								</ul>
158							</div>
159							<?php endif;?>
160
161							<div class="ct-toc-item active">
162
163								<a class="ct-toc-link">
164									<?php echo $lang['site_tools'] ?>
165								</a>
166								<ul class="nav ct-sidenav">
167									<?php
168									$menu_items = (new \dokuwiki\Menu\SiteMenu())->getItems();
169									foreach($menu_items as $item) {
170									echo '<li class="'.$item->getType().'">'
171										.'<a class="" href="'.$item->getLink().'" title="'.$item->getTitle().'">'
172										. $item->getLabel()
173										. '</a></li>';
174									}
175
176									?>
177								</ul>
178							</div>
179
180
181
182							<?php if ($showSidebar): ?>
183							<div id="dokuwiki__aside" class="ct-toc-item active">
184								<a class="ct-toc-link">
185									<?php echo "Sidebar" ?>
186								</a>
187								<div class="leftsidebar">
188									<?php tpl_includeFile('sidebarheader.html')?>
189									<?php tpl_include_page($conf['sidebar'], 1, 1)?>
190									<?php tpl_includeFile('sidebarfooter.html')?>
191								</div>
192							</div>
193							<?php endif;?>
194						</nav>
195					</div>
196
197
198					<!-- center content -->
199
200					<main class="col-12 col-md-9 col-xl-8 py-md-3 pl-md-5 ct-content dokuwiki" role="main">
201
202						<div id="dokuwiki__top" class="site
203						<?php echo tpl_classes(); ?>
204						<?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>">
205						</div>
206
207						<?php html_msgarea()?>
208						<?php tpl_includeFile('header.html')?>
209
210
211						<!-- Trace/Navigation -->
212						<nav aria-label="breadcrumb" role="navigation">
213							<ol class="breadcrumb">
214								<?php if ($conf['breadcrumbs']) {?>
215								<div class="breadcrumbs"><?php tpl_breadcrumbs()?></div>
216								<?php }?>
217								<?php if ($conf['youarehere']) {?>
218								<div class="breadcrumbs"><?php tpl_youarehere()?></div>
219								<?php }?>
220							</ol>
221						</nav>
222
223						<?php if ($showTools && tpl_getConf('movePageTools')): ?>
224						<!-- Page Menu -->
225                        <div class="argon-doku-page-menu">
226                            <?php
227                            $menu_items = (new \dokuwiki\Menu\PageMenu())->getItems();
228                            foreach($menu_items as $item) {
229                                echo '<li class="'.$item->getType().'">'
230                                    .'<a class="page-menu__link '.$item->getLinkAttributes('')['class'].'" href="'.$item->getLink().'" title="'.$item->getTitle().'">'
231                                    .'<i class="">'.inlineSVG($item->getSvg()).'</i>'
232                                    . '<span class="a11y">'.$item->getLabel().'</span>'
233                                    . '</a></li>';
234                            }
235                            ?>
236						</div>
237						<?php endif;?>
238
239						<!-- Wiki Contents -->
240						<div id="dokuwiki__content">
241							<div class="pad">
242
243								<div class="page">
244
245									<?php echo $buffer ?>
246								</div>
247							</div>
248						</div>
249
250						<hr />
251						<!-- Footer -->
252						<div class="card footer-card">
253							<div class="card-body">
254								<div class="container">
255									<div class="row">
256										<div class="col">
257											<div id="dokuwiki__footer">
258												<div class="pad">
259													<div class="doc">
260														<?php tpl_pageinfo() /* 'Last modified' etc */ ?></div>
261													<?php tpl_license('0') /* content license, parameters: img=*badge|button|0, imgonly=*0|1, return=*0|1 */ ?>
262												</div>
263											</div>
264										</div>
265									</div>
266									<br/>
267									<div class="row">
268
269										<div class="footer-search">
270											<?php tpl_searchform()?>
271										</div>
272
273									</div>
274									<br/>
275									<div class="row">
276									<div class="argon-doku-footer-fullmenu">
277										<?php
278										$menu_items = (new \dokuwiki\Menu\MobileMenu())->getItems();
279										foreach($menu_items as $item) {
280										echo '<li class="'.$item->getType().'">'
281											.'<a class="" href="'.$item->getLink().'" title="'.$item->getTitle().'">'
282											.'<i class="" aria-hidden="true">'.inlineSVG($item->getSvg()).'</i>'
283											. '<span class="a11y">'.$item->getLabel().'</span>'
284											. '</a></li>';
285										}
286										?>
287									</div>
288									<?php tpl_includeFile('footer.html') ?>
289									</div>
290
291								</div>
292
293							</div>
294						</div>
295						<?php tpl_indexerWebBug(); ?>
296					</main>
297
298
299
300
301					<!-- Right Sidebar -->
302					<div class="d-none d-xl-block col-xl-2 ct-toc">
303						<div>
304							<?php tpl_toc()?>
305						</div>
306					</div>
307
308				</div>
309			</div>
310		</div>
311	</body>
312
313</html>
314