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() ?> – <?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']) . '" />', 'accesskey="h" title="[H]" class="logo"'); 45 ?> 46 47 <h2 class="title"><?php tpl_link( wl(), htmlentities($conf['title']), ''); ?></h2> 48 <p class="claim"><?php echo $conf['tagline']; ?></p> 49 </div> 50 <div id="globalTools"> 51 <div id="gUserTools"> 52 <h3 class="sronly"><?php echo $lang['user_tools']; ?></h3> 53 <ul> 54<?php my_userinfo(str_repeat(chr(9),6)); ?> 55 </ul> 56 </div> 57 </div> 58 <div id="phSearch"> 59<?php include('tpl_searchform.php'); ?> 60 </div> 61 <div id="phTools"><!-- placeholder for additional tools --></div> 62 <div id="phInclude"><?php tpl_includeFile('header.html') ?></div> 63 </header> 64 </div> 65 <div id="main-layout"> 66 <div id="sidebar" class="toggle <?php 67 echo ( $showSidebar ? 'auto' : 'hide' ); ?>"> 68 <button class="tg_button" title="<?php echo $lang['sidebar'] ?>"><span><?php echo $lang['sidebar'] ?></span></button> 69 <div class="tg_content"> 70 <nav id="sbNavigation"> 71<!-- - - - - - - - - SIDEBAR CONTENT - - - - - - - --> 72<?php 73 tpl_flush(); 74 tpl_includeFile('sidebarheader.html'); 75 tpl_include_page($conf['sidebar'], true, true); 76 tpl_includeFile('sidebarfooter.html'); 77?> </nav> 78<!-- - - - - - - - - END OF SIDEBAR CONTENT - - - - - - - --> 79 <div id="sbBreadcrumbs"> 80<?php if($conf['breadcrumbs']) { my_breadcrumbs(str_repeat(chr(9),4)); } ?> 81 </div> 82 </div> 83 </div> 84 <main id="dokuwiki__top"> 85<?php my_toc(str_repeat(chr(9),3)); 86 if($conf['youarehere']) { my_youarehere(str_repeat(chr(9),3)); } 87?> <article id="main-content"> 88 89<!-- - - - - - - - - ARTICLE CONTENT - - - - - - - --> 90<?php tpl_flush() ?> 91<?php tpl_includeFile('pageheader.html') ?> 92<?php tpl_content(false) ?> 93<?php tpl_includeFile('pagefooter.html') ?> 94<!-- - - - - - - - - END OF ARTICLE - - - - - - - --> 95 96 </article> 97 <footer> 98 <p class="docInfo"> 99<?php my_lastchange(str_repeat(chr(9),5)); 100?> </p> 101 </footer> 102 </main> 103 </div> 104 <div id="footer-layout"> 105 <footer> 106 <div id="ftPlaceholder" class="ftSection"></div> 107 <div id="ftInclude" class="ftSection"> 108<?php tpl_includeFile('footer.html'); ?> 109 </div> 110 <div id="ftSiteTools" class="ftSection"> 111 <h4><?php echo $lang['site_tools']; ?></h4> 112 <ul> 113 <?php echo (new \dokuwiki\Menu\SiteMenu())->getListItems('action ', false); ?> 114 115 </ul> 116 </div> 117 <div id="ftPageTools" class="ftSection"> 118 <h4><?php echo $lang['page_tools']; ?></h4> 119 <ul> 120 <?php echo (new \dokuwiki\Menu\PageMenu())->getListItems('', false); ?> 121 122 </ul> 123 </div> 124<?php include('tpl_footer.php') ?> 125 </footer> 126 </div> 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> 131