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 rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.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 <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css' /> 29 <style> 30 body { 31 font-family: <?= tpl_getConf('font') ?>; 32 } 33 </style> 34</head> 35 36<body id="dokuwiki__top" class="sidebar-closed <?php echo tpl_classes(); ?>"> 37 <div id="writr__page" class="hfeed <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>"> 38 <?php tpl_includeFile('header.html') ?> 39 40 <div class="sidebar-area group" id="writr__sidebar"> 41 <a id="writr__sidebar-toggle" href="#writr__secondary" title="<?php echo $lang['sidebar'] ?>"> 42 <span class="genericon genericon-close"></span> 43 <span class="a11y"><?php echo $lang['sidebar'] ?></span> 44 </a> 45 46 <!-- ********** HEADER ********** --> 47 <header id="writr__masthead" class="site-header" role="banner"> 48 <?php 49 $logoSize = array(); 50 $logoImages = array(); 51 if(tpl_getConf('doLogoChangesByNamespace')){ 52 $logoImages[] = getNS($ID).':logo.png'; 53 } 54 $logoImages[] = ':logo.png'; 55 $logoImages[] = 'images/logo.png'; 56 $logo = tpl_getMediaFile($logoImages, false, $logoSize); 57 ?> 58 59 <a class="site-logo" href="<?php echo wl(); ?>" title="<?php echo $conf['title']; ?>" rel="home" accesskey="h" title="[H]"> 60 <img src="<?php echo $logo; ?>" <?php echo $logoSize[3]; ?> alt="" class="no-grav header-image" /> 61 </a> 62 63 <div class="site-branding"> 64 <h1 class="site-title"><a href="<?php echo wl(); ?>" rel="home" accesskey="h" title="[H]"><?php echo $conf['title']; ?></a></h1> 65 <?php if ($conf['tagline']): ?> 66 <h2 class="site-description"><?php echo $conf['tagline'] ?></h2> 67 <?php endif ?> 68 </div> 69 70 <div class="search-form widget"> 71 <?php tpl_searchform() ?> 72 </div> 73 74 <?php if (page_findnearest('topnav')): ?> 75 <nav id="writr__site-navigation" class="main-navigation" role="navigation"> 76 <h3 class="menu-toggle genericon genericon-menu" title="<?php echo tpl_getLang('menu') ?>"> 77 <span class="a11y"><?php echo tpl_getLang('menu') ?></span> 78 </h3> 79 <div class="a11y skip-link"> 80 <a href="#writr__content"><?php echo $lang['skip_to_content'] ?></a> 81 </div> 82 <?php tpl_include_page('topnav', 1, 1) ?> 83 </nav><!-- #writr__site-navigation --> 84 <?php endif; ?> 85 </header><!-- #writr__masthead --> 86 87 <div id="writr__secondary" class="widget-area" role="complementary"> 88 <?php if ($conf['sidebar']): ?> 89 <div class="widget"> 90 <?php tpl_includeFile('sidebarheader.html') ?> 91 <?php tpl_include_page($conf['sidebar'], 1, 1) ?> 92 <?php tpl_includeFile('sidebarfooter.html') ?> 93 </div> 94 <?php endif ?> 95 96 <div class="tools widget_links widget"> 97 <?php if(!tpl_getConf('doSiteToolsRequireLogin') || (tpl_getConf('doSiteToolsRequireLogin') && $conf['useacl'])){ ?> 98 <!-- SITE TOOLS --> 99 <div class="site-tools"> 100 <?php if(tpl_getConf('showSiteToolsTitle')){ ?> 101 <h3><?php echo $lang['site_tools'] ?></h3> 102 <?php } ?> 103 <ul> 104 <?php $items = (new \dokuwiki\Menu\SiteMenu())->getItems(); 105 foreach($items as $item) { 106 echo '<li>' 107 .'<a href="'.$item->getLink().'" class="action '.strtolower($item->getType()).'" rel="nofollow" title="'.$item->getTitle().'">' 108 .'<span></span> ' 109 .$item->getLabel() 110 .'</a></li>'; 111 } ?> 112 </ul> 113 </div> 114 <?php } ?> 115 116 <!-- PAGE TOOLS --> 117 <div class="page-tools"> 118 <?php if(tpl_getConf('showPageToolsTitle')){ ?> 119 <h3 class="a11y"><?php echo $lang['page_tools'] ?></h3> 120 <?php } ?> 121 <ul> 122 <?php if (!$conf['useacl'] || ($conf['useacl'] && $INFO['perm'] >= 4)): ?> 123 <?php 124 $instructions = '{{NEWPAGE'; 125 if(tpl_getConf('defaultAddNewPage') !== ''){ 126 $instructions .= tpl_getConf('defaultAddNewPage'); 127 } 128 $instructions .= '}}'; 129 $instructions = p_get_instructions($instructions); 130 if(count($instructions) <= 3) { 131 $render = p_render('xhtml',$instructions,$info); 132 echo '<li>' 133 .'<a href="#" class="action AddNewPage" title="'.tpl_getLang('AddNewPage').'">' 134 .'<span class="icon"></span>' 135 .'<span class="a11y">'.tpl_getLang('AddNewPage').'</span>' 136 .'</a>' 137 .$render 138 .'</li>'; 139 } 140 ?> 141 <!-- <li class="plugin_move_page" style="display: list-item;"><a href=""><span>Rename Page</span></a></li> --> 142 <?php endif ?> 143 <?php $items = (new \dokuwiki\Menu\PageMenu())->getItems(); 144 foreach($items as $item) { 145 echo '<li>' 146 .'<a href="'.$item->getLink().'" class="action '.strtolower($item->getType()).'" title="'.$item->getTitle().'">' 147 .'<span class="icon"></span>' 148 .'<span class="a11y">'.$item->getLabel().'</span>' 149 .'</a></li>'; 150 } ?> 151 <?php $translation = plugin_load('helper','translation'); 152 if ($translation){ 153 $render = $translation->showTranslations(false); 154 echo '<li>' 155 .'<a href="#" class="action Translation" title="'.tpl_getLang('Language').'">' 156 .'<span class="icon"></span>' 157 .'<span class="a11y">'.tpl_getLang('Language').'</span>' 158 .'</a>' 159 .$render 160 .'</li>'; 161 } ?> 162 </ul> 163 </div> 164 165 <?php if ($conf['useacl']): ?> 166 <!-- USER TOOLS --> 167 <div class="user-tools"> 168 <?php if(tpl_getConf('showUserToolsTitle')){ ?> 169 <h3><?php echo $lang['user_tools'] ?></h3> 170 <?php } ?> 171 <ul> 172 <?php $items = (new \dokuwiki\Menu\UserMenu())->getItems(); 173 foreach($items as $item) { 174 echo '<li>' 175 .'<a href="'.$item->getLink().'" class="action '.strtolower($item->getType()).'" rel="nofollow" title="'.$item->getTitle().'">' 176 .'<span></span> ' 177 .$item->getLabel() 178 .'</a></li>'; 179 } ?> 180 </ul> 181 <?php 182 if (!empty($_SERVER['REMOTE_USER'])) { 183 echo '<p class="user">'.$INFO['userinfo']['name'].'</p>'; 184 } 185 ?> 186 </div> 187 <?php endif ?> 188 </div> 189 190 <footer id="writr__colophon" class="site-footer" role="contentinfo"> 191 <div class="site-info"> 192 <?php tpl_license('button') ?> 193 <?php tpl_includeFile('footer.html') ?> 194 </div><!-- .site-info --> 195 </footer><!-- #writr__colophon --> 196 197 </div> 198 </div> 199 200 <div id="writr__content" class="site-content"> 201 <div id="writr__primary" class="content-area"> 202 203 <div class="writr-message-area"> 204 <!-- Translation Notication --> 205 <?php if($translation) { $translation->checkage(); } ?> 206 <!-- Message Area --> 207 <?php html_msgarea() ?> 208 </div> 209 210 <!-- BREADCRUMBS --> 211 <?php if($conf['breadcrumbs']){ ?> 212 <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div> 213 <?php } ?> 214 <?php if($conf['youarehere']){ ?> 215 <div class="breadcrumbs"><?php tpl_youarehere() ?></div> 216 <?php } ?> 217 218 <main id="writr__main" class="site-main group" role="main"> 219 220 <?php tpl_flush() ?> 221 <?php tpl_includeFile('pageheader.html') ?> 222 223 <!-- wikipage start --> 224 <?php tpl_content() ?> 225 <!-- wikipage stop --> 226 227 <?php tpl_flush() ?> 228 <?php tpl_includeFile('pagefooter.html') ?> 229 </main><!-- #writr__main --> 230 231 <div class="page-footer"> 232 <?php tpl_pageinfo(); ?> 233 </div> 234 </div><!-- #writr__primary --> 235 </div><!-- #writr__content --> 236 </div><!-- #writr__page --> 237 238 <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div> 239 240 <!-- JavaScript Libraries and Scripts --> 241 <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.0/dist/jquery.slim.min.js"></script> 242 <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script> 243 <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js" integrity="sha256-BRqBN7dYgABqtY9Hd4ynE+1slnEw+roEPFzQ7TRRfcg=" crossorigin="anonymous"></script> 244</body> 245</html> 246