1<?php 2/** 3 * DokuWiki Writr Template 4 * 5 * @link http://dokuwiki.org/template:writr 6 * @author Louis Ouellet <support@laswitchtech.com> 7 * @author Anika Henke <anika@selfthinker.org> 8 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 9 */ 10 11if (!defined('DOKU_INC')) die(); 12@require_once(dirname(__FILE__).'/tpl_functions.php'); 13header('X-UA-Compatible: IE=edge,chrome=1'); 14$showSidebar = page_findnearest($conf['sidebar']); 15?> 16<!DOCTYPE html> 17<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>" 18 lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js"> 19<head> 20 <meta charset="UTF-8" /> 21 <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title> 22 <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css' /> 23 <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css" /> 24 <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script> 25 <?php tpl_metaheaders() ?> 26 <meta name="viewport" content="width=device-width,initial-scale=1" /> 27 <?php echo tpl_favicon(array('favicon', 'mobile')) ?> 28 <?php tpl_includeFile('meta.html') ?> 29</head> 30 31<body id="dokuwiki__top" class="sidebar-closed <?php if(tpl_getConf('makeFullWidth')){ echo "makeFullWidth"; } ?> <?php if(tpl_getConf('useTooltips')){ echo "enableTooltips"; } ?> <?php echo tpl_classes(); ?> <?php if(tpl_getConf('useToolbar')){ echo "enableToolbar"; } else { echo "disableToolbar"; } ?>"> 32 <div id="writr__toolbar"> 33 <div class="hook"><?php tpl_include_page('topbar', 1, 1) ?></div> 34 <?php if ($conf['useacl']): ?> 35 <!-- USER TOOLS --> 36 <?php echo tpl_getMenu('usermenu'); ?> 37 <?php endif ?> 38 </div> 39 <div id="writr__page" class="hfeed <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>"> 40 <?php tpl_includeFile('header.html') ?> 41 42 <div class="sidebar-area group" id="writr__sidebar"> 43 <a id="writr__sidebar-toggle" href="#writr__secondary" title="<?php echo $lang['sidebar'] ?>"> 44 <span class="genericon genericon-close"></span> 45 <span class="a11y"><?php echo $lang['sidebar'] ?></span> 46 </a> 47 48 <!-- ********** HEADER ********** --> 49 <header id="writr__masthead" class="site-header" role="banner"> 50 <?php echo tpl_getSiteBranding(); ?> 51 52 <div class="search-form widget"> 53 <?php tpl_searchform() ?> 54 </div> 55 56 <?php if (page_findnearest('topnav')): ?> 57 <nav id="writr__site-navigation" class="main-navigation" role="navigation"> 58 <h3 class="menu-toggle genericon genericon-menu" title="<?php echo tpl_getLang('menu') ?>"> 59 <span class="a11y"><?php echo tpl_getLang('menu') ?></span> 60 </h3> 61 <div class="a11y skip-link"> 62 <a href="#writr__content"><?php echo $lang['skip_to_content'] ?></a> 63 </div> 64 <?php tpl_include_page('topnav', 1, 1) ?> 65 </nav><!-- #writr__site-navigation --> 66 <?php endif; ?> 67 </header><!-- #writr__masthead --> 68 69 <div id="writr__secondary" class="widget-area" role="complementary"> 70 <?php if ($conf['sidebar']): ?> 71 <div class="widget"> 72 <?php tpl_includeFile('sidebarheader.html') ?> 73 <?php tpl_include_page($conf['sidebar'], 1, 1) ?> 74 <?php tpl_includeFile('sidebarfooter.html') ?> 75 </div> 76 <?php endif ?> 77 78 <div class="tools widget_links widget"> 79 <?php if(!tpl_getConf('doSiteToolsRequireLogin') || !$conf['useacl'] || (tpl_getConf('doSiteToolsRequireLogin') && isset($INFO['userinfo']))){ ?> 80 <!-- SITE TOOLS --> 81 <div class="site-tools"> 82 <h3 <?php if(!tpl_getConf('showSiteToolsTitle')){ echo 'class="a11y"'; } ?>><?php echo $lang['site_tools'] ?></h3> 83 <ul> 84 <?php $items = (new \dokuwiki\Menu\SiteMenu())->getItems(); 85 foreach($items as $item) { 86 echo '<li>' 87 .'<a href="'.$item->getLink().'" class="action '.strtolower($item->getType()).'" rel="nofollow" title="'.$item->getTitle().'">' 88 .'<span></span> ' 89 .$item->getLabel() 90 .'</a></li>'; 91 } ?> 92 </ul> 93 </div> 94 <?php } ?> 95 </div> 96 97 <footer id="writr__colophon" class="site-footer" role="contentinfo"> 98 <div class="site-info"> 99 <?php tpl_license('button') ?> 100 <?php tpl_includeFile('footer.html') ?> 101 </div><!-- .site-info --> 102 </footer><!-- #writr__colophon --> 103 104 </div> 105 106 <?php echo tpl_getMenu('sidebarmenu'); ?> 107 </div> 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) > 0) { 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 135 $starred = plugin_load('action','starred'); 136 if ($starred) { 137 $render = $starred->tpl_starred(false,false); 138 echo '<li>'.$render.'</li>'; 139 } 140 ?> 141 <?php $translation = plugin_load('helper','translation'); 142 if ($translation){ 143 $render = $translation->showTranslations(false); 144 echo '<li>' 145 .'<a href="#" class="action Translation" title="'.tpl_getLang('Language').'">' 146 .'<span class="icon"></span>' 147 .'<span class="a11y">'.tpl_getLang('Language').'</span>' 148 .'</a>' 149 .$render 150 .'</li>'; 151 } ?> 152 <?php $items = (new \dokuwiki\Menu\PageMenu())->getItems(); 153 foreach($items as $item) { 154 $attributes = $item->getLinkAttributes(); 155 $html = '<li><a'; 156 foreach($attributes as $key => $value) { 157 $html .= ' '.$key.'="'.$value.'"'; 158 } 159 $html .= '><span class="icon"></span>' 160 .'<span class="a11y">'.$item->getLabel().'</span>' 161 .'</a></li>'; 162 echo $html; 163 } ?> 164 </ul> 165 </div> 166 167 <div id="writr__content" class="site-content"> 168 <div id="writr__primary" class="content-area"> 169 170 <div class="writr-message-area"> 171 <!-- Translation Notication --> 172 <?php if($translation) { $translation->checkage(); } ?> 173 <!-- Message Area --> 174 <?php html_msgarea() ?> 175 </div> 176 177 <!-- BREADCRUMBS --> 178 <?php if($conf['breadcrumbs']){ ?> 179 <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div> 180 <?php } ?> 181 <?php if($conf['youarehere']){ ?> 182 <div class="breadcrumbs"><?php tpl_youarehere() ?></div> 183 <?php } ?> 184 185 <main id="writr__main" class="site-main group" role="main"> 186 187 <?php tpl_flush() ?> 188 <?php tpl_includeFile('pageheader.html') ?> 189 190 <!-- wikipage start --> 191 <?php tpl_content() ?> 192 <!-- wikipage stop --> 193 194 <?php tpl_flush() ?> 195 <?php tpl_includeFile('pagefooter.html') ?> 196 </main><!-- #writr__main --> 197 198 <div class="page-footer"> 199 <?php tpl_pageinfo(); ?> 200 </div> 201 </div><!-- #writr__primary --> 202 </div><!-- #writr__content --> 203 </div><!-- #writr__page --> 204 205 <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div> 206</body> 207</html> 208