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