xref: /template/ad-hominem/main.php (revision 56919fe9575b8496ca18fe44265b7cf334d262c6)
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
12ini_set('display_errors', '1');
13
14if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
15
16require_once('my_template.php');
17
18$hasSidebar = page_findnearest($conf['sidebar']);
19$showSidebar = $hasSidebar && ($ACT=='show');
20
21$htmlLang = ' lang="' . $conf['lang'] . ( $lang['direction'] != 'ltr' ? '" dir="'. $lang['direction'] : '') . '"';
22
23?><!DOCTYPE html>
24<html<?php echo $htmlLang ?>>
25<head>
26	<meta charset="UTF-8" />
27	<title><?php tpl_pagetitle() ?> &ndash; <?php echo str_replace(' ', ' ', strip_tags($conf['title'])) ?></title>
28<?php my_metaheaders() ?>
29	<meta name="viewport" content="width=device-width,initial-scale=1" />
30<?php tpl_includeFile('meta.html') ?>
31</head>
32<body class="site <?php echo trim(tpl_classes()); ?>">
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
40					// get logo either out of the template images folder or data/media folder
41					$logoSize = array();
42					$logo = tpl_getMediaFile(array(':wiki:logo.png', ':logo.png', 'images/sitelogo.svg'), false, $logoSize);
43					tpl_link( wl(),
44						'<img src="'.$logo.'" '.$logoSize[3].' alt="' . htmlentities($conf['title']) . '" width="64" height="64" />', 'accesskey="h" title="[H]" class="logo"');
45				?>
46				<h2 class="title"><?php tpl_link( wl(), htmlentities($conf['title']), ''); ?></h2>
47				<p class="claim">Irrtümer und Trugschlüsse <i lang="fr">en gros</i> und <i lang="fr">en detail</i></p>
48			</div>
49			<div id="globalTools">
50				<div id="gUserTools">
51					<h3 class="sronly"><?php echo $lang['user_tools']; ?></h3>
52					<ul>
53<?php my_userinfo(str_repeat(chr(9),6)); ?>
54					</ul>
55				</div>
56			</div>
57			<div id="phSearch">
58<?php include('tpl_searchform.php'); ?>
59			</div>
60			<div id="phTools"><!-- placeholder for additional tools --></div>
61			<div id="phInclude"><?php tpl_includeFile('header.html') ?></div>
62		</header>
63	</div>
64    <div id="main-layout"<?php echo ($showSidebar && $hasSidebar ? ' class="showSidebar hasSidebar"' : ''); ?>>
65		<div id="sidebar">
66			<h4><?php echo $lang['sidebar'] ?></h4>
67			<div class="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  - - - - - - - -->
77<?php		if($conf['breadcrumbs']) { my_breadcrumbs(str_repeat(chr(9),4)); } ?>
78			</div>
79		</div>
80		<main>
81<?php		my_toc(str_repeat(chr(9),3));
82			if($conf['youarehere']) { my_youarehere(str_repeat(chr(9),3)); }
83?>			<article id="main-content" itemscope itemtype="https://schema.org/Article">
84
85<!-- - - - - - - - - ARTICLE CONTENT - - - - - - - -->
86<?php tpl_flush() ?>
87<?php tpl_includeFile('pageheader.html') ?>
88<?php tpl_content(false) ?>
89<?php tpl_includeFile('pagefooter.html') ?>
90<!-- - - - - - - - - END OF ARTICLE  - - - - - - - -->
91
92			</article>
93			<footer>
94				<p class="docInfo">
95<?php my_lastchange(str_repeat(chr(9),5));
96?>				</p>
97			</footer>
98		</main>
99	</div>
100	<div id="docinfo-layout">
101	</div>
102
103	<div id="footer-layout">
104		<footer>
105			<div id="ftMobileTools" class="ftSection">
106				<h4><?php echo $lang['site_tools']; ?></h4>
107				<?php echo (new \dokuwiki\Menu\MobileMenu())->getDropdown($lang['tools']); ?>
108
109			</div>
110			<div id="ftInclude" class="ftSection">
111<?php tpl_includeFile('footer.html'); ?>
112			</div>
113			<div id="ftSiteTools" class="ftSection">
114				<h4><?php echo $lang['site_tools']; ?></h4>
115				<ul>
116					<?php echo (new \dokuwiki\Menu\SiteMenu())->getListItems('action ', false); ?>
117
118				</ul>
119			</div>
120			<div id="ftPageTools" class="ftSection">
121				<h4><?php echo $lang['page_tools']; ?></h4>
122				<ul>
123					<?php echo (new \dokuwiki\Menu\PageMenu())->getListItems('', false); ?>
124
125				</ul>
126			</div>
127<?php include('tpl_footer.php') ?>
128		</footer>
129	</div>
130	<div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
131	<div id="screen__mode" class="no"></div><?php /* helper to detect CSS media query in script.js */ ?>
132</body>
133</html>
134