xref: /template/ad-hominem/main.php (revision 4c55f691cfc3ee82f481284a288c8e2a081c8c9d)
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(DOKU_TAB,6)); ?>
49					</ul>
50				</div>
51			</div>
52			<div id="phSearch">
53<?php include('tpl_searchform.php'); ?>
54			</div>
55			<div id="phTools">
56<?php my_langmenu(str_repeat(DOKU_TAB,4), 'tb'); ?>
57			</div>
58			<div id="phInclude"><?php tpl_includeFile('header.html') ?></div>
59		</header>
60	</div>
61	<div id="main-layout">
62		<div id="sidebar" class="toggle <?php
63		echo ( $showSidebar ? 'auto' : 'hide' ); ?>">
64			<button type="button" class="tg_button" title="<?php echo $lang['sidebar'] ?>"><span><?php echo $lang['sidebar'] ?></span></button>
65			<div class="tg_content">
66				<nav id="sbNavigation">
67<!-- - - - - - - - - SIDEBAR CONTENT - - - - - - - -->
68<?php
69			tpl_flush();
70			tpl_includeFile('sidebarheader.html');
71			tpl_include_page($conf['sidebar'], true, true);
72			tpl_includeFile('sidebarfooter.html');
73?>
74
75<!-- - - - - - - - - END OF SIDEBAR CONTENT - - - - - - - -->
76				</nav>
77<?php my_langmenu(str_repeat(DOKU_TAB,4), 'sb'); ?>
78				<div id="sbBreadcrumbs">
79<?php		if($conf['breadcrumbs']) { my_breadcrumbs(str_repeat(DOKU_TAB,5)); } ?>
80				</div>
81			</div>
82		</div>
83		<main id="dokuwiki__top">
84			<header>
85<?php			my_toc(str_repeat(DOKU_TAB,4));
86				tpl_flush();
87				tpl_includeFile('pageheader.html');
88				if($conf['youarehere']) { my_youarehere(str_repeat(DOKU_TAB,4)); }
89?>			</header>
90			<div id="doku__msgarea"><?php html_msgarea()?></div>
91			<article id="main-content">
92
93<!-- - - - - - - - - ARTICLE CONTENT - - - - - - - --><?php tpl_content(false) ?>
94
95
96<!-- - - - - - - - - END OF ARTICLE - - - - - - - -->
97
98			</article>
99			<footer>
100<?php my_lastchange(str_repeat(DOKU_TAB,4)); ?>
101<?php tpl_includeFile('pagefooter.html'); ?>
102			</footer>
103		</main>
104	</div>
105	<div id="footer-layout">
106		<footer>
107			<div id="ftPlaceholder" class="ftSection"></div>
108			<div id="ftInclude" class="ftSection">
109<?php tpl_includeFile('footer.html'); ?>
110			</div>
111			<div id="ftSiteTools" class="ftSection">
112				<h4><?php echo $lang['site_tools']; ?></h4>
113				<ul>
114					<?php echo (new \dokuwiki\Menu\SiteMenu())->getListItems('action ', false); ?>
115
116				</ul>
117			</div>
118			<div id="ftPageTools" class="ftSection">
119				<h4><?php echo $lang['page_tools']; ?></h4>
120				<ul>
121					<?php echo (new \dokuwiki\Menu\PageMenu())->getListItems('', false); ?>
122
123				</ul>
124			</div>
125<?php include('tpl_footer.php'); ?>
126		</footer>
127	</div>
128<?php my_cookiebanner(DOKU_TAB); ?>
129	<div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
130	<div id="screen__mode" class="no"></div><?php /* helper to detect CSS media query in script.js */ ?>
131</body>
132</html>