1<?php 2/** 3 * DokuWiki Writr Template 4 * 5 * @link http://dokuwiki.org/template:writr 6 * @author Anika Henke <anika@selfthinker.org> 7 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 8 */ 9 10if (!defined('DOKU_INC')) die(); 11@require_once(dirname(__FILE__).'/tpl_functions.php'); 12header('X-UA-Compatible: IE=edge,chrome=1'); 13$showSidebar = page_findnearest($conf['sidebar']); 14?> 15<!DOCTYPE html> 16<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>" 17 lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js"> 18<head> 19 <meta charset="UTF-8" /> 20 <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title> 21 <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css' /> 22 <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css" /> 23 <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script> 24 <?php tpl_metaheaders() ?> 25 <meta name="viewport" content="width=device-width,initial-scale=1" /> 26 <?php echo tpl_favicon(array('favicon', 'mobile')) ?> 27 <?php tpl_includeFile('meta.html') ?> 28</head> 29 30<body id="dokuwiki__top" class="sidebar-closed <?php echo tpl_classes(); ?>"> 31 <div id="writr__page" class="hfeed <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>"> 32 <?php tpl_includeFile('header.html') ?> 33 34 <div class="sidebar-area group" id="writr__sidebar"> 35 <a id="writr__sidebar-toggle" href="#writr__secondary" title="<?php echo $lang['sidebar'] ?>"> 36 <span class="genericon genericon-close"></span> 37 <span class="a11y"><?php echo $lang['sidebar'] ?></span> 38 </a> 39 40 <!-- ********** HEADER ********** --> 41 <header id="writr__masthead" class="site-header" role="banner"> 42 <?php 43 $logoSize = array(); 44 $logoImages = array(); 45 if(tpl_getConf('doLogoChangesByNamespace')){ 46 $logoImages[] = getNS($ID).':logo.png'; 47 } 48 $logoImages[] = ':wiki:logo.png'; 49 $logoImages[] = ':logo.png'; 50 $logoImages[] = 'images/logo.png'; 51 $logo = tpl_getMediaFile($logoImages, false, $logoSize); 52 ?> 53 54 <a class="site-logo" href="<?php echo wl(); ?>" title="<?php echo $conf['title']; ?>" rel="home" accesskey="h" title="[H]"> 55 <img src="<?php echo $logo; ?>" <?php echo $logoSize[3]; ?> alt="" class="no-grav header-image" /> 56 </a> 57 58 <div class="site-branding"> 59 <h1 class="site-title"><a href="<?php echo wl(); ?>" rel="home" accesskey="h" title="[H]"><?php echo $conf['title']; ?></a></h1> 60 <?php if ($conf['tagline']): ?> 61 <h2 class="site-description"><?php echo $conf['tagline'] ?></h2> 62 <?php endif ?> 63 </div> 64 65 <div class="search-form widget"> 66 <?php tpl_searchform() ?> 67 </div> 68 69 <?php if (page_findnearest('topnav')): ?> 70 <nav id="writr__site-navigation" class="main-navigation" role="navigation"> 71 <h3 class="menu-toggle genericon genericon-menu" title="<?php echo tpl_getLang('menu') ?>"> 72 <span class="a11y"><?php echo tpl_getLang('menu') ?></span> 73 </h3> 74 <div class="a11y skip-link"> 75 <a href="#writr__content"><?php echo $lang['skip_to_content'] ?></a> 76 </div> 77 <?php tpl_include_page('topnav', 1, 1) ?> 78 </nav><!-- #writr__site-navigation --> 79 <?php endif; ?> 80 </header><!-- #writr__masthead --> 81 82 <div id="writr__secondary" class="widget-area" role="complementary"> 83 <?php if ($conf['sidebar']): ?> 84 <div class="widget"> 85 <?php tpl_includeFile('sidebarheader.html') ?> 86 <?php tpl_include_page($conf['sidebar'], 1, 1) ?> 87 <?php tpl_includeFile('sidebarfooter.html') ?> 88 </div> 89 <?php endif ?> 90 91 <div class="tools widget_links widget"> 92 <?php if(!tpl_getConf('doSiteToolsRequireLogin') || (tpl_getConf('doSiteToolsRequireLogin') && $conf['useacl'])){ ?> 93 <!-- SITE TOOLS --> 94 <div class="site-tools"> 95 <?php if(tpl_getConf('showSiteToolsTitle')){ ?> 96 <h3><?php echo $lang['site_tools'] ?></h3> 97 <?php } ?> 98 <ul> 99 <?php $items = (new \dokuwiki\Menu\SiteMenu())->getItems(); 100 foreach($items as $item) { 101 echo '<li>' 102 .'<a href="'.$item->getLink().'" class="action '.strtolower($item->getType()).'" rel="nofollow" title="'.$item->getTitle().'">' 103 .'<span></span> ' 104 .$item->getLabel() 105 .'</a></li>'; 106 } ?> 107 </ul> 108 </div> 109 <?php } ?> 110 111 <!-- PAGE TOOLS --> 112 <div class="page-tools"> 113 <?php if(tpl_getConf('showPageToolsTitle')){ ?> 114 <h3 class="a11y"><?php echo $lang['page_tools'] ?></h3> 115 <?php } ?> 116 <ul> 117 <?php if (!$conf['useacl'] || ($conf['useacl'] && $INFO['perm'] >= 4)): ?> 118 <?php 119 $instructions = '{{NEWPAGE'; 120 if(tpl_getConf('defaultAddNewPage') !== ''){ 121 $instructions .= tpl_getConf('defaultAddNewPage'); 122 } 123 $instructions .= '}}'; 124 $instructions = p_get_instructions($instructions); 125 if(count($instructions) <= 3) { 126 $render = p_render('xhtml',$instructions,$info); 127 echo '<li>' 128 .'<a href="#" class="action AddNewPage" title="'.tpl_getLang('AddNewPage').'">' 129 .'<span class="icon"></span>' 130 .'<span class="a11y">'.tpl_getLang('AddNewPage').'</span>' 131 .'</a>' 132 .$render 133 .'</li>'; 134 } 135 ?> 136 <!-- <li class="plugin_move_page" style="display: list-item;"><a href=""><span>Rename Page</span></a></li> --> 137 <?php endif ?> 138 <?php $items = (new \dokuwiki\Menu\PageMenu())->getItems(); 139 foreach($items as $item) { 140 echo '<li>' 141 .'<a href="'.$item->getLink().'" class="action '.strtolower($item->getType()).'" title="'.$item->getTitle().'">' 142 .'<span class="icon"></span>' 143 .'<span class="a11y">'.$item->getLabel().'</span>' 144 .'</a></li>'; 145 } ?> 146 <?php $translation = plugin_load('helper','translation'); 147 if ($translation){ 148 $render = $translation->showTranslations(false); 149 echo '<li>' 150 .'<a href="#" class="action Translation" title="'.tpl_getLang('Language').'">' 151 .'<span class="icon"></span>' 152 .'<span class="a11y">'.tpl_getLang('Language').'</span>' 153 .'</a>' 154 .$render 155 .'</li>'; 156 } ?> 157 </ul> 158 </div> 159 160 <?php if ($conf['useacl']): ?> 161 <!-- USER TOOLS --> 162 <div class="user-tools"> 163 <?php if(tpl_getConf('showUserToolsTitle')){ ?> 164 <h3><?php echo $lang['user_tools'] ?></h3> 165 <?php } ?> 166 <ul> 167 <?php $items = (new \dokuwiki\Menu\UserMenu())->getItems(); 168 foreach($items as $item) { 169 echo '<li>' 170 .'<a href="'.$item->getLink().'" class="action '.strtolower($item->getType()).'" rel="nofollow" title="'.$item->getTitle().'">' 171 .'<span></span> ' 172 .$item->getLabel() 173 .'</a></li>'; 174 } ?> 175 </ul> 176 <?php 177 if (!empty($_SERVER['REMOTE_USER'])) { 178 echo '<p class="user">'.$INFO['userinfo']['name'].'</p>'; 179 } 180 ?> 181 </div> 182 <?php endif ?> 183 </div> 184 185 <footer id="writr__colophon" class="site-footer" role="contentinfo"> 186 <div class="site-info"> 187 <?php tpl_license('button') ?> 188 <?php tpl_includeFile('footer.html') ?> 189 </div><!-- .site-info --> 190 </footer><!-- #writr__colophon --> 191 192 </div> 193 </div> 194 195 <div id="writr__content" class="site-content"> 196 <div id="writr__primary" class="content-area"> 197 198 <div class="writr-message-area"> 199 <!-- Translation Notication --> 200 <?php if($translation) { $translation->checkage(); } ?> 201 <!-- Message Area --> 202 <?php html_msgarea() ?> 203 </div> 204 205 <!-- BREADCRUMBS --> 206 <?php if($conf['breadcrumbs']){ ?> 207 <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div> 208 <?php } ?> 209 <?php if($conf['youarehere']){ ?> 210 <div class="breadcrumbs"><?php tpl_youarehere() ?></div> 211 <?php } ?> 212 213 <main id="writr__main" class="site-main group" role="main"> 214 215 <?php tpl_flush() ?> 216 <?php tpl_includeFile('pageheader.html') ?> 217 218 <!-- wikipage start --> 219 <?php tpl_content() ?> 220 <!-- wikipage stop --> 221 222 <?php tpl_flush() ?> 223 <?php tpl_includeFile('pagefooter.html') ?> 224 </main><!-- #writr__main --> 225 226 <div class="page-footer"> 227 <?php tpl_pageinfo(); ?> 228 </div> 229 </div><!-- #writr__primary --> 230 </div><!-- #writr__content --> 231 </div><!-- #writr__page --> 232 233 <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div> 234</body> 235</html> 236