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 <h3 <?php if(!tpl_getConf('showSiteToolsTitle')){ echo 'class="a11y"'; } ?>><?php echo $lang['site_tools'] ?></h3> 96 <ul> 97 <?php $items = (new \dokuwiki\Menu\SiteMenu())->getItems(); 98 foreach($items as $item) { 99 echo '<li>' 100 .'<a href="'.$item->getLink().'" class="action '.strtolower($item->getType()).'" rel="nofollow" title="'.$item->getTitle().'">' 101 .'<span></span> ' 102 .$item->getLabel() 103 .'</a></li>'; 104 } ?> 105 </ul> 106 </div> 107 <?php } ?> 108 109 <!-- PAGE TOOLS --> 110 <div class="page-tools"> 111 <h3 <?php if(!tpl_getConf('showPageToolsTitle')){ echo 'class="a11y"'; } ?>><?php echo $lang['page_tools'] ?></h3> 112 <ul> 113 <?php if (!$conf['useacl'] || ($conf['useacl'] && $INFO['perm'] >= 4)): ?> 114 <?php 115 $instructions = '{{NEWPAGE'; 116 if(tpl_getConf('defaultAddNewPage') !== ''){ 117 $instructions .= '>'; 118 $instructions .= tpl_getConf('defaultAddNewPage'); 119 } 120 $instructions .= '}}'; 121 $instructions = p_get_instructions($instructions); 122 if(count($instructions) <= 3) { 123 $render = p_render('xhtml',$instructions,$info); 124 echo '<li>' 125 .'<a href="#" class="action AddNewPage" title="'.tpl_getLang('AddNewPage').'">' 126 .'<span class="icon"></span>' 127 .'<span class="a11y">'.tpl_getLang('AddNewPage').'</span>' 128 .'</a>' 129 .$render 130 .'</li>'; 131 } 132 ?> 133 <?php endif ?> 134 <?php $translation = plugin_load('helper','translation'); 135 if ($translation){ 136 $render = $translation->showTranslations(false); 137 echo '<li>' 138 .'<a href="#" class="action Translation" title="'.tpl_getLang('Language').'">' 139 .'<span class="icon"></span>' 140 .'<span class="a11y">'.tpl_getLang('Language').'</span>' 141 .'</a>' 142 .$render 143 .'</li>'; 144 } ?> 145 <?php $items = (new \dokuwiki\Menu\PageMenu())->getItems(); 146 foreach($items as $item) { 147 $html = '<li>'; 148 if($item->getType() == 'plugin_move') { 149 $html .= '<a href="'.$item->getLink().'" class="action '.strtolower($item->getType()).' '.strtolower($item->getType()).'_page" title="'.$item->getTitle().'">'; 150 } else { 151 $html .= '<a href="'.$item->getLink().'" class="action '.strtolower($item->getType()).'" title="'.$item->getTitle().'">'; 152 } 153 $html .= '<span class="icon"></span>' 154 .'<span class="a11y">'.$item->getLabel().'</span>' 155 .'</a></li>'; 156 echo $html; 157 } ?> 158 </ul> 159 </div> 160 161 <?php if ($conf['useacl']): ?> 162 <!-- USER TOOLS --> 163 <div class="user-tools"> 164 <h3 <?php if(!tpl_getConf('showUserToolsTitle')){ echo 'class="a11y"'; } ?>><?php echo $lang['user_tools'] ?></h3> 165 <ul> 166 <?php $items = (new \dokuwiki\Menu\UserMenu())->getItems(); 167 foreach($items as $item) { 168 echo '<li>' 169 .'<a href="'.$item->getLink().'" class="action '.strtolower($item->getType()).'" rel="nofollow" title="'.$item->getTitle().'">' 170 .'<span></span> ' 171 .$item->getLabel() 172 .'</a></li>'; 173 } ?> 174 </ul> 175 <?php 176 if (!empty($_SERVER['REMOTE_USER'])) { 177 echo '<p class="user">'; 178 tpl_userinfo(); 179 echo '</p>'; 180 } 181 ?> 182 </div> 183 <?php endif ?> 184 </div> 185 186 <footer id="writr__colophon" class="site-footer" role="contentinfo"> 187 <div class="site-info"> 188 <?php tpl_license('button') ?> 189 <?php tpl_includeFile('footer.html') ?> 190 </div><!-- .site-info --> 191 </footer><!-- #writr__colophon --> 192 193 </div> 194 </div> 195 196 <div id="writr__content" class="site-content"> 197 <div id="writr__primary" class="content-area"> 198 199 <div class="writr-message-area"> 200 <!-- Translation Notication --> 201 <?php if($translation) { $translation->checkage(); } ?> 202 <!-- Message Area --> 203 <?php html_msgarea() ?> 204 </div> 205 206 <!-- BREADCRUMBS --> 207 <?php if($conf['breadcrumbs']){ ?> 208 <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div> 209 <?php } ?> 210 <?php if($conf['youarehere']){ ?> 211 <div class="breadcrumbs"><?php tpl_youarehere() ?></div> 212 <?php } ?> 213 214 <main id="writr__main" class="site-main group" role="main"> 215 216 <?php tpl_flush() ?> 217 <?php tpl_includeFile('pageheader.html') ?> 218 219 <!-- wikipage start --> 220 <?php tpl_content() ?> 221 <!-- wikipage stop --> 222 223 <?php tpl_flush() ?> 224 <?php tpl_includeFile('pagefooter.html') ?> 225 </main><!-- #writr__main --> 226 227 <div class="page-footer"> 228 <?php tpl_pageinfo(); ?> 229 </div> 230 </div><!-- #writr__primary --> 231 </div><!-- #writr__content --> 232 </div><!-- #writr__page --> 233 234 <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div> 235</body> 236</html> 237