xref: /template/ad-hominem/main.php (revision 764c430f5742e2c3ddf3589c3653518011b93967)
1<?php
2/**
3 * Ad Hominem Template
4 *
5 * @link     https://ad.hominem.info/
6 * @author   Sascha Leib <sascha@leib.be>
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 */
13
14require_once('my_template.php');
15
16$hasSidebar = page_findnearest($conf['sidebar']);
17$showSidebar = $hasSidebar && ($ACT=='show');
18
19// get the language information:
20$htmlLang = ' lang="' . $conf['lang'] . ( $lang['direction'] != 'ltr' ? '" dir="'. $lang['direction'] : '') . '"';
21
22?><!DOCTYPE html>
23<html<?php echo $htmlLang ?>>
24<head>
25	<meta charset="UTF-8" />
26	<title><?php tpl_pagetitle() ?> &ndash; <?php echo str_replace(' ', ' ', strip_tags($conf['title'])) ?></title>
27<?php my_metaheaders() ?>
28	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
29<?php my_favicons() ?>
30<?php tpl_includeFile('meta.html') ?>
31</head>
32<body class="site <?php echo trim(tpl_classes()) . (tpl_getConf('darkmode') == 'allow' ? ' darkmode' : '') . (tpl_getConf('printstyle') !== 'basic' ? ' print-' . tpl_getConf('printstyle') : ''); ?>" data-pageid="<?php echo $ID; ?>">
33	<div id="skip-link">
34		<a href="#main-content"><?php echo $lang['skip_to_content']; ?></a>
35	</div>
36	<div id="header-layout">
37		<header>
38			<div id="siteLogo">
39				<?php my_sitelogo(); ?>
40
41				<h2 class="title"><?php tpl_link( my_homelink(), htmlentities($conf['title']), ''); ?></h2>
42				<p class="claim"><?php echo $conf['tagline']; ?></p>
43			</div>
44			<div id="globalTools">
45				<div id="gUserTools">
46					<h3 class="sronly"><?php echo $lang['user_tools']; ?></h3>
47					<ul>
48<?php my_userinfo(str_repeat(chr(9),6)); ?>
49					</ul>
50				</div>
51			</div>
52			<div id="phSearch">
53<?php include('tpl_searchform.php'); ?>
54			</div>
55			<div id="phTools">
56				<div id="tbLanguages">
57<?php my_langmenu(str_repeat(chr(9),5), 'toolbar'); ?>
58				</div>
59			</div>
60			<div id="phInclude"><?php tpl_includeFile('header.html') ?></div>
61		</header>
62	</div>
63    <div id="main-layout">
64		<div id="sidebar" class="toggle <?php
65        echo ( $showSidebar ? 'auto' : 'hide' ); ?>">
66			<button type="button" class="tg_button" title="<?php echo $lang['sidebar'] ?>"><span><?php echo $lang['sidebar'] ?></span></button>
67			<div class="tg_content">
68				<nav id="sbNavigation">
69<!-- - - - - - - - - SIDEBAR CONTENT - - - - - - - -->
70<?php
71			tpl_flush();
72			tpl_includeFile('sidebarheader.html');
73			tpl_include_page($conf['sidebar'], true, true);
74			tpl_includeFile('sidebarfooter.html');
75?>				</nav>
76<!-- - - - - - - - - END OF SIDEBAR CONTENT  - - - - - - - -->
77				<div id="sbLanguages">
78<?php my_langmenu(str_repeat(chr(9),5), 'sidebar'); ?>
79				</div>
80				<div id="sbBreadcrumbs">
81<?php		if($conf['breadcrumbs']) { my_breadcrumbs(str_repeat(chr(9),4)); } ?>
82				</div>
83			</div>
84		</div>
85		<main id="dokuwiki__top">
86			<header>
87<?php			my_toc(str_repeat(chr(9),4));
88				tpl_flush();
89				tpl_includeFile('pageheader.html');
90				if($conf['youarehere']) { my_youarehere(str_repeat(chr(9),4)); }
91?>			</header>
92			<article id="main-content">
93<!-- - - - - - - - - ARTICLE CONTENT - - - - - - - -->
94<?php tpl_content(false) ?>
95<!-- - - - - - - - - END OF ARTICLE  - - - - - - - -->
96			</article>
97			<footer>
98<?php my_lastchange(str_repeat(chr(9),4)); ?>
99<?php tpl_includeFile('pagefooter.html'); ?>
100			</footer>
101		</main>
102	</div>
103	<div id="footer-layout">
104		<footer>
105			<div id="ftPlaceholder" class="ftSection"></div>
106			<div id="ftInclude" class="ftSection">
107<?php tpl_includeFile('footer.html'); ?>
108			</div>
109			<div id="ftSiteTools" class="ftSection">
110				<h4><?php echo $lang['site_tools']; ?></h4>
111				<ul>
112					<?php echo (new \dokuwiki\Menu\SiteMenu())->getListItems('action ', false); ?>
113
114				</ul>
115			</div>
116			<div id="ftPageTools" class="ftSection">
117				<h4><?php echo $lang['page_tools']; ?></h4>
118				<ul>
119					<?php echo (new \dokuwiki\Menu\PageMenu())->getListItems('', false); ?>
120
121				</ul>
122			</div>
123<?php include('tpl_footer.php'); ?>
124		</footer>
125	</div>
126<?php my_cookiebanner("\t"); ?>
127	<div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
128	<div id="screen__mode" class="no"></div><?php /* helper to detect CSS media query in script.js */ ?>
129</body>
130</html>