1<?php 2/** 3 * Percepress theme based on the DokuWiki Starter Template 4 * 5 * @link http://dokuwiki.org/template:starter 6 * @link https://octavianichols.com 7 * @author Anika Henke <anika@selfthinker.org> 8 * @author Octavia Nichols <octavia@octavianichols.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@require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */ 14 15$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && !empty($_SERVER['REMOTE_USER']) ); 16$showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show'); 17$sidebarElement = tpl_getConf('sidebarIsNav') ? 'nav' : 'aside'; 18?> 19 20<!DOCTYPE html> 21<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>" 22 lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js"> 23<head> 24 <meta charset="UTF-8" /> 25 <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title> 26 <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script> 27 <?php tpl_metaheaders() ?> 28 <meta name="viewport" content="width=device-width,initial-scale=1" /> 29 <?php echo tpl_favicon(array('favicon', 'mobile')) ?> 30 <?php tpl_includeFile('meta.html') ?> 31</head> 32 33<body> 34 <?php /* the "dokuwiki__top" id is needed somewhere at the top, because that's where the "back to top" button/link links to */ ?> 35 <?php /* tpl_classes() provides useful CSS classes; if you choose not to use it, the 'dokuwiki' class at least 36 should always be in one of the surrounding elements (e.g. plugins and templates depend on it) */ ?> 37 <div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?> <?php 38 echo ($showSidebar) ? 'hasSidebar' : ''; ?>"> 39 <?php html_msgarea() /* occasional error and info messages on top of the page */ ?> 40 41 <!-- ********** HEADER ********** --> 42 <header id="dokuwiki__header"><div class="pad"> 43 <?php tpl_includeFile('header.html') ?> 44 <div class="headings"> 45 <h1> 46 <br> 47 <?php 48 // get logo either out of the template images folder or data/media folder 49 $logoSize = array(); 50 $logo = tpl_getMediaFile(array(':wiki:logo.png', ':logo.png', 'images/logo.png'), false, $logoSize); 51 52 // display logo and wiki title in a link to the home page 53 tpl_link( 54 wl(), 55 '<img src="'.$logo.'" '.$logoSize[3].' alt="" /> <span>'.$conf['title'].'</span>', 56 'accesskey="h" title="[H]"' 57 ); 58 ?> 59 </h1> 60 <?php if ($conf['tagline']): ?> 61 <p class="claim"><?php echo $conf['tagline'] ?></p> 62 <?php endif ?> 63 64 <ul class="a11y skip"> 65 <li><a href="#dokuwiki__content"><?php echo $lang['skip_to_content'] ?></a></li> 66 </ul> 67 <div class="clearer"></div> 68 </div> 69 70 <div class="tools"> 71 <!-- USER TOOLS --> 72 <?php if ($conf['useacl'] && $showTools): ?> 73 <nav id="dokuwiki__usertools" aria-labelledby="dokuwiki__usertools_heading"> 74 <h3 class="a11y" id="dokuwiki__usertools_heading"><?php echo $lang['user_tools'] ?></h3> 75 <ul> 76 <?php 77 if (!empty($_SERVER['REMOTE_USER'])) { 78 echo '<li class="user">'; 79 tpl_userinfo(); /* 'Logged in as ...' */ 80 echo '</li>'; 81 } 82 ?> 83 <?php tpl_searchform() ?> 84 <?php 85 if (file_exists(DOKU_INC . 'inc/Menu/UserMenu.php')) { 86 /* the first parameter is for an additional class, the second for if SVGs should be added */ 87 //echo (new \dokuwiki\Menu\UserMenu())->getListItems('action ', false); 88 } else { 89 /* tool menu before Greebo */ 90 // _tpl_usertools(); 91 } 92 ?> 93 </ul> 94 </nav> 95 <?php endif ?> 96 </div> 97 <div class="clearer"></div> 98 99 <!-- BREADCRUMBS --> 100 <?php if($conf['breadcrumbs']){ ?> 101 <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div> 102 <?php } ?> 103 <?php if($conf['youarehere']){ ?> 104 <div class="breadcrumbs"><?php tpl_youarehere() ?></div> 105 <?php } ?> 106 <br> 107 108 <div class="clearer"></div> 109 <hr class="a11y" /> 110 </div></header><!-- /header --> 111 112 <div class="wrapper"> 113 114 <!-- ********** CONTENT ********** --> 115 <main id="dokuwiki__content"> 116 117 <?php tpl_toc(); ?> 118 119 <div class="pad"> 120 <?php tpl_flush() /* flush the output buffer */ ?> 121 <?php tpl_includeFile('pageheader.html') ?> 122 123 <div class="page"> 124 <!-- wikipage start --> 125 <?php tpl_content(false) /* the main content */ ?> 126 <!-- wikipage stop --> 127 <div class="clearer"></div> 128 </div> 129 130 <?php tpl_flush() ?> 131 <?php tpl_includeFile('pagefooter.html') ?> 132 </div> 133 </main><!-- /content --> 134 135 <div class="clearer"></div> 136 <hr class="a11y" /> 137 138 </div><!-- /wrapper --> 139 140 <!-- PAGE ACTIONS --> 141 <?php if ($showTools): ?> 142 <nav id="dokuwiki__pagetools" aria-labelledby="dokuwiki__pagetools_heading"> 143 <h3 class="a11y" id="dokuwiki__pagetools_heading"><?php echo $lang['page_tools'] ?></h3> 144 <ul> 145 <?php 146 // mobile menu (combines all menus in one dropdown) 147 if (file_exists(DOKU_INC . 'inc/Menu/MobileMenu.php')) { 148 echo (new \dokuwiki\Menu\MobileMenu())->getDropdown($lang['tools']); 149 } else { 150 tpl_actiondropdown($lang['tools']); 151 } 152 ?> 153 <a href="#dokuwiki__top">Back to top</a></top> 154 </ul> 155 </nav> 156 <?php endif; ?> 157 158 <!-- ********** FOOTER ********** --> 159 <footer id="dokuwiki__footer"><div class="pad"> 160 <div class="doc"><?php tpl_pageinfo() /* 'Last modified' etc */ ?></div> 161 <?php tpl_license('button') /* content license, parameters: img=*badge|button|0, imgonly=*0|1, return=*0|1 */ ?> 162 163 <?php tpl_includeFile('footer.html') ?> 164 </div></footer><!-- /footer --> 165 166 <div class="clearer"></div> 167 <hr class="a11y" /><br><br> 168 169 <!-- ********** ASIDE ********** --> 170 171 <?php if ($showSidebar): ?> 172 <<?php echo $sidebarElement ?> id="dokuwiki__aside" aria-label="<?php echo $lang['sidebar'] ?>"> 173 <div class="pad aside include group"> 174 <?php tpl_includeFile('sidebarheader.html') ?> 175 <?php tpl_include_page($conf['sidebar'], 1, 1) /* includes the nearest sidebar page */ ?> 176 <?php tpl_includeFile('sidebarfooter.html') ?> 177 <div class="clearer"></div> 178 </div></<?php echo $sidebarElement ?>><!-- /aside --> 179 <?php endif; ?> 180 181 </div> 182 183 <div id="__top"> 184 185 </div><!-- /site --> 186 187 <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div> 188 189 <script src="script.js"></script> 190</body> 191</html> 192