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 if(tpl_getConf('useTooltips')){ echo "enableTooltips"; } ?> <?php echo tpl_classes(); ?> <?php if(tpl_getConf('useToolbar')){ echo "enableToolbar"; } else { echo "disableToolbar"; } ?>"> 31 <div id="writr__toolbar"> 32 <?php tpl_include_page('topbar', 1, 1) ?> 33 <?php if ($conf['useacl']): ?> 34 <!-- USER TOOLS --> 35 <?php echo tpl_getMenu('usermenu'); ?> 36 <?php endif ?> 37 </div> 38 <div id="writr__page" class="hfeed <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>"> 39 <?php tpl_includeFile('header.html') ?> 40 41 <div class="sidebar-area group" id="writr__sidebar"> 42 <a id="writr__sidebar-toggle" href="#writr__secondary" title="<?php echo $lang['sidebar'] ?>"> 43 <span class="genericon genericon-close"></span> 44 <span class="a11y"><?php echo $lang['sidebar'] ?></span> 45 </a> 46 47 <!-- ********** HEADER ********** --> 48 <header id="writr__masthead" class="site-header" role="banner"> 49 <?php echo tpl_getLogo(); ?> 50 51 <div class="site-branding"> 52 <h1 class="site-title"><a href="<?php echo wl(); ?>" rel="home" accesskey="h" title="[H]"><?php echo $conf['title']; ?></a></h1> 53 <?php if ($conf['tagline']): ?> 54 <h2 class="site-description"><?php echo $conf['tagline'] ?></h2> 55 <?php endif ?> 56 </div> 57 58 <div class="search-form widget"> 59 <?php tpl_searchform() ?> 60 </div> 61 62 <?php if (page_findnearest('topnav')): ?> 63 <nav id="writr__site-navigation" class="main-navigation" role="navigation"> 64 <h3 class="menu-toggle genericon genericon-menu" title="<?php echo tpl_getLang('menu') ?>"> 65 <span class="a11y"><?php echo tpl_getLang('menu') ?></span> 66 </h3> 67 <div class="a11y skip-link"> 68 <a href="#writr__content"><?php echo $lang['skip_to_content'] ?></a> 69 </div> 70 <?php tpl_include_page('topnav', 1, 1) ?> 71 </nav><!-- #writr__site-navigation --> 72 <?php endif; ?> 73 </header><!-- #writr__masthead --> 74 75 <div id="writr__secondary" class="widget-area" role="complementary"> 76 <?php if ($conf['sidebar']): ?> 77 <div class="widget"> 78 <?php tpl_includeFile('sidebarheader.html') ?> 79 <?php tpl_include_page($conf['sidebar'], 1, 1) ?> 80 <?php tpl_includeFile('sidebarfooter.html') ?> 81 </div> 82 <?php endif ?> 83 84 <div class="tools widget_links widget"> 85 <?php if(!tpl_getConf('doSiteToolsRequireLogin') || !$conf['useacl'] || (tpl_getConf('doSiteToolsRequireLogin') && isset($INFO['userinfo']))){ ?> 86 <!-- SITE TOOLS --> 87 <div class="site-tools"> 88 <h3 <?php if(!tpl_getConf('showSiteToolsTitle')){ echo 'class="a11y"'; } ?>><?php echo $lang['site_tools'] ?></h3> 89 <ul> 90 <?php $items = (new \dokuwiki\Menu\SiteMenu())->getItems(); 91 foreach($items as $item) { 92 echo '<li>' 93 .'<a href="'.$item->getLink().'" class="action '.strtolower($item->getType()).'" rel="nofollow" title="'.$item->getTitle().'">' 94 .'<span></span> ' 95 .$item->getLabel() 96 .'</a></li>'; 97 } ?> 98 </ul> 99 </div> 100 <?php } ?> 101 102 <!-- PAGE TOOLS --> 103 <div class="page-tools"> 104 <h3 <?php if(!tpl_getConf('showPageToolsTitle')){ echo 'class="a11y"'; } ?>><?php echo $lang['page_tools'] ?></h3> 105 <ul> 106 <?php if (!$conf['useacl'] || ($conf['useacl'] && $INFO['perm'] >= 4)): ?> 107 <?php 108 $instructions = '{{NEWPAGE'; 109 if(tpl_getConf('defaultAddNewPage') !== ''){ 110 $instructions .= '>'; 111 $instructions .= tpl_getConf('defaultAddNewPage'); 112 } 113 $instructions .= '}}'; 114 $instructions = p_get_instructions($instructions); 115 if(count($instructions) <= 3) { 116 $render = p_render('xhtml',$instructions,$info); 117 echo '<li>' 118 .'<a href="#" class="action AddNewPage" title="'.tpl_getLang('AddNewPage').'">' 119 .'<span class="icon"></span>' 120 .'<span class="a11y">'.tpl_getLang('AddNewPage').'</span>' 121 .'</a>' 122 .$render 123 .'</li>'; 124 } 125 ?> 126 <?php endif ?> 127 <?php $translation = plugin_load('helper','translation'); 128 if ($translation){ 129 $render = $translation->showTranslations(false); 130 echo '<li>' 131 .'<a href="#" class="action Translation" title="'.tpl_getLang('Language').'">' 132 .'<span class="icon"></span>' 133 .'<span class="a11y">'.tpl_getLang('Language').'</span>' 134 .'</a>' 135 .$render 136 .'</li>'; 137 } ?> 138 <?php $items = (new \dokuwiki\Menu\PageMenu())->getItems(); 139 foreach($items as $item) { 140 $attributes = $item->getLinkAttributes(); 141 $html = '<li><a'; 142 foreach($attributes as $key => $value) { 143 $html .= ' '.$key.'="'.$value.'"'; 144 } 145 $html .= '><span class="icon"></span>' 146 .'<span class="a11y">'.$item->getLabel().'</span>' 147 .'</a></li>'; 148 echo $html; 149 } ?> 150 </ul> 151 </div> 152 </div> 153 154 <footer id="writr__colophon" class="site-footer" role="contentinfo"> 155 <div class="site-info"> 156 <?php tpl_license('button') ?> 157 <?php tpl_includeFile('footer.html') ?> 158 </div><!-- .site-info --> 159 </footer><!-- #writr__colophon --> 160 161 </div> 162 163 <?php echo tpl_getMenu('sidebarmenu'); ?> 164 </div> 165 166 <div id="writr__content" class="site-content"> 167 <div id="writr__primary" class="content-area"> 168 169 <div class="writr-message-area"> 170 <!-- Translation Notication --> 171 <?php if($translation) { $translation->checkage(); } ?> 172 <!-- Message Area --> 173 <?php html_msgarea() ?> 174 </div> 175 176 <!-- BREADCRUMBS --> 177 <?php if($conf['breadcrumbs']){ ?> 178 <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div> 179 <?php } ?> 180 <?php if($conf['youarehere']){ ?> 181 <div class="breadcrumbs"><?php tpl_youarehere() ?></div> 182 <?php } ?> 183 184 <main id="writr__main" class="site-main group" role="main"> 185 186 <?php tpl_flush() ?> 187 <?php tpl_includeFile('pageheader.html') ?> 188 189 <!-- wikipage start --> 190 <?php tpl_content() ?> 191 <!-- wikipage stop --> 192 193 <?php tpl_flush() ?> 194 <?php tpl_includeFile('pagefooter.html') ?> 195 </main><!-- #writr__main --> 196 197 <div class="page-footer"> 198 <?php tpl_pageinfo(); ?> 199 </div> 200 </div><!-- #writr__primary --> 201 </div><!-- #writr__content --> 202 </div><!-- #writr__page --> 203 204 <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div> 205</body> 206</html> 207