1<?php 2/** 3 * DokuWiki Minimal Template 4 * 5 * @link http://dokuwiki.org/template:minimal 6 * @author Reactive Matter <reactivematter@protonmail.com> 7 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 8 */ 9 10if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */ 11 12@require_once(dirname(__FILE__).'/template_plugin.php'); /* include hook for template functions */ 13 14$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && !empty($_SERVER['REMOTE_USER']) ); 15$showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show'); 16?> 17 18<!DOCTYPE html> 19<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>" 20 lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js"> 21<head> 22 <meta charset="UTF-8" /> 23 <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title> 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<?php 32 33?> 34<body class="<?=tpl_minimal_classes()?>"> 35<div id="dokuwiki__top"></div> 36<navbar id="navbar" class="container" role="navigation" aria-label="Main navigation"> 37 <div id='showhidesidemenu' class="mobile icon"> 38 <div class="button"></div> 39 </div> 40 <div class="left-column"> 41 <a class="site-name" href="<?=DOKU_BASE?>"> 42 <div class="site-logo"> 43 <img src="<?=tpl_getMediaFile(array(':wiki:logo.png', ':wiki:logo.svg', ':wiki:logo.jpeg',':wiki:logo.jpg', ':logo.png', ':logo.svg', ':logo.jpeg',':logo.jpg', 'images/logo.png', ':wiki:dokuwiki.svg'), false)?>"> 44 </div> 45 <div class="site-title"> 46 <?=$conf['title']?> 47 </div> 48 </a> 49 </div> 50 <?php if($showTools || actionOK('search')):?> 51 <div class="right-column"> 52 <?php if($showTools):?> 53 <div class="options"> 54 <?php if(sizeof((new \dokuwiki\Menu\PageMenu())->getItems())>0):?> 55 <div class="page-menu menu"> 56 <div class="button"><span>Page</span></div> 57 <div class="list"> 58 <?=(new \dokuwiki\Menu\PageMenu())->getListItems()?> 59 </div> 60 </div> 61 <?php endif?> 62 <?php if(sizeof((new \dokuwiki\Menu\SiteMenu())->getItems())>0):?> 63 <div class="site-menu menu"> 64 <div class="button"><span>Site</span></div> 65 <div class="list"> 66 <?=(new \dokuwiki\Menu\SiteMenu())->getListItems()?> 67 </div> 68 </div> 69 <?php endif?> 70 <?php if(sizeof((new \dokuwiki\Menu\UserMenu())->getItems())>0):?> 71 <div class="user-menu menu"> 72 <div class="button"><span>User</span></div> 73 <div class="list"> 74 <?php if($USERINFO):?> 75 <div class="user-name"><?=$USERINFO['name']?></div> 76 <?php endif?> 77 <?=(new \dokuwiki\Menu\UserMenu())->getListItems()?> 78 </div> 79 </div> 80 <?php endif?> 81 <div class="mobile-menu menu"> 82 <?php 83 84 if(sizeof((new \dokuwiki\Menu\PageMenu())->getItems())>0) 85 { 86 echo '<div class="list"><p>Page tools</p>'. 87 (new \dokuwiki\Menu\PageMenu())->getListItems() 88 .'</div>'; 89 } 90 91 if(sizeof((new \dokuwiki\Menu\SiteMenu())->getItems())>0) 92 { 93 echo '<div class="list"><p>Site tools</p>'. 94 (new \dokuwiki\Menu\SiteMenu())->getListItems() 95 .'</div>'; 96 } 97 98 if(sizeof((new \dokuwiki\Menu\UserMenu())->getItems())>0) 99 { 100 echo '<div class="list"><p>User tools</p>'. 101 (new \dokuwiki\Menu\UserMenu())->getListItems() 102 .'</div>'; 103 } 104 105 if($USERINFO){ 106 echo '<div class="user-name"><p>Username: '.$USERINFO['name'].'</p></div>'; 107 } 108 109 ?> 110 </div> 111 </div> 112 <?php endif?> 113 <?php if(actionOK('search')):?> 114 <div class="search"> 115 <?php tpl_searchform(true,false) ?> 116 </div> 117 <?php endif?> 118 </div> 119 <div id='showhideappoptions' class="mobile icon"> 120 <div class="button"></div> 121 </div> 122 <?php endif?> 123 </navbar> 124 125 <?php if(($conf['youarehere'] || $conf['breadcrumbs'] || (page_exists(":header") && auth_quickaclcheck(":header")) ) && tpl_getConf('siteHeaderPosition')=='Top'):?> 126 <div class="site-header"> 127 <?php html_msgarea() /* occasional error and info messages on top of the page */ ?> 128 <!-- ********** Notice ********** --> 129 <?php 130 if(page_exists(":header") && auth_quickaclcheck(":header")) 131 { 132 echo '<div class="site-header-content">'; 133 tpl_include_page(':header'); 134 echo '</div>'; 135 } 136 ?> 137 138 <?php if($conf['youarehere'] || $conf['breadcrumbs']):?> 139 140 <div class="site-navigation"> 141 <!-- BREADCRUMBS --> 142 <?php if($conf['youarehere']){ ?> 143 <div class="breadcrumbs"><?php tpl_youarehere() ?></div> 144 <?php } ?> 145 <?php if($conf['breadcrumbs']){ ?> 146 <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div> 147 <?php } ?> 148 </div> 149 <?php endif?> 150 </div> 151 <?php endif?> 152 153<div id="main"> 154 155 <?php if ($showSidebar): ?> 156 <div id="sidebar" class="left-column" aria-label="<?php echo $lang['sidebar'] ?>"> 157 <div class="sidebar-content"> 158 <?php tpl_include_page($conf['sidebar'], 1, 1) /* includes the nearest sidebar page */ ?> 159 </div> 160 </div> 161 <?php endif; ?> 162 163 164 <div id="view" class="right-column"> 165 166 <?php if(($conf['youarehere'] || $conf['breadcrumbs'] || (page_exists(":header") && auth_quickaclcheck(":header"))) && tpl_getConf('siteHeaderPosition')=='Above page'):?> 167 <div class="site-header"> 168 <?php html_msgarea() /* occasional error and info messages on top of the page */ ?> 169 <!-- ********** Notice ********** --> 170 <?php 171 if(page_exists(":header") && auth_quickaclcheck(":header")) 172 { 173 echo '<div class="site-header-content">'; 174 tpl_include_page(':header'); 175 echo '</div>'; 176 } 177 ?> 178 179 <?php if($conf['youarehere'] || $conf['breadcrumbs']):?> 180 181 <div class="site-navigation"> 182 <!-- BREADCRUMBS --> 183 <?php if($conf['youarehere']){ ?> 184 <div class="breadcrumbs"><?php tpl_youarehere() ?></div> 185 <?php } ?> 186 <?php if($conf['breadcrumbs']){ ?> 187 <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div> 188 <?php } ?> 189 </div> 190 <?php endif?> 191 </div> 192 <?php endif?> 193 194 <article id="content"> 195 <?php tpl_flush(); ?> 196 <?php tpl_content();?> 197 <?php tpl_flush(); ?> 198 </article> 199 200 201 <?php if(tpl_getConf('showPageInfo') ):?> 202 <div class="page-info"> 203 <?php tpl_pageinfo() /* 'Last modified' etc */ ?> 204 205 </div> 206 <?php endif; ?> 207 208 209 <?php 210 if((page_exists(":footer") && auth_quickaclcheck(":footer")) && tpl_getConf('siteFooterPosition')=='Below page') 211 { 212 echo '<footer id="footer">'; 213 tpl_include_page(':footer'); 214 echo '</footer>'; 215 } 216 ?> 217 <!-- /footer --> 218 <div style="display: none;"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div> 219 </div> 220 </div> 221 <?php 222 if((page_exists(":footer") && auth_quickaclcheck(":footer")) && tpl_getConf('siteFooterPosition')=='Bottom') 223 { 224 echo '<footer id="footer">'; 225 tpl_include_page(':footer'); 226 echo '</footer>'; 227 } 228 ?> 229</body> 230</html> 231