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<navbar id="navbar" class="container" role="navigation" aria-label="Main navigation"> 36 <div id='showhidesidemenu' class="mobile icon"> 37 <div class="button"></div> 38 </div> 39 <div class="left-column"> 40 <a class="site-name" href="<?=DOKU_BASE?>"> 41 <div class="site-logo"> 42 <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)?>"> 43 </div> 44 <div class="site-title"> 45 <?=$conf['title']?> 46 </div> 47 </a> 48 </div> 49 <?php if($showTools || actionOK('search')):?> 50 <div class="right-column"> 51 <?php if($showTools):?> 52 <div class="options"> 53 <?php if(sizeof((new \dokuwiki\Menu\PageMenu())->getItems())>0):?> 54 <div class="page-menu menu"> 55 <div class="button"><span>Page</span></div> 56 <div class="list"> 57 <?=(new \dokuwiki\Menu\PageMenu())->getListItems()?> 58 </div> 59 </div> 60 <?php endif?> 61 <?php if(sizeof((new \dokuwiki\Menu\SiteMenu())->getItems())>0):?> 62 <div class="site-menu menu"> 63 <div class="button"><span>Site</span></div> 64 <div class="list"> 65 <?=(new \dokuwiki\Menu\SiteMenu())->getListItems()?> 66 </div> 67 </div> 68 <?php endif?> 69 <?php if(sizeof((new \dokuwiki\Menu\UserMenu())->getItems())>0):?> 70 <div class="user-menu menu"> 71 <div class="button"><span>User</span></div> 72 <div class="list"> 73 <?php if($USERINFO):?> 74 <div class="user-name"><?=$USERINFO['name']?></div> 75 <?php endif?> 76 <?=(new \dokuwiki\Menu\UserMenu())->getListItems()?> 77 </div> 78 </div> 79 <?php endif?> 80 <div class="mobile-menu menu"> 81 <?php 82 83 if(sizeof((new \dokuwiki\Menu\PageMenu())->getItems())>0) 84 { 85 echo '<div class="list"><p>Page tools</p>'. 86 (new \dokuwiki\Menu\PageMenu())->getListItems() 87 .'</div>'; 88 } 89 90 if(sizeof((new \dokuwiki\Menu\SiteMenu())->getItems())>0) 91 { 92 echo '<div class="list"><p>Site tools</p>'. 93 (new \dokuwiki\Menu\SiteMenu())->getListItems() 94 .'</div>'; 95 } 96 97 if(sizeof((new \dokuwiki\Menu\UserMenu())->getItems())>0) 98 { 99 echo '<div class="list"><p>User tools</p>'. 100 (new \dokuwiki\Menu\UserMenu())->getListItems() 101 .'</div>'; 102 } 103 104 if($USERINFO){ 105 echo '<div class="user-name"><p>Username: '.$USERINFO['name'].'</p></div>'; 106 } 107 108 ?> 109 </div> 110 </div> 111 <?php endif?> 112 <?php if(actionOK('search')):?> 113 <div class="search"> 114 <?php tpl_searchform(true,false) ?> 115 </div> 116 <?php endif?> 117 </div> 118 <div id='showhideappoptions' class="mobile icon"> 119 <div class="button"></div> 120 </div> 121 <?php endif?> 122 </navbar> 123 124 <?php if(($conf['youarehere'] || $conf['breadcrumbs'] || (page_exists(":header") && auth_quickaclcheck(":header")) ) && tpl_getConf('siteHeaderPosition')=='Top'):?> 125 <div class="site-header"> 126 <?php html_msgarea() /* occasional error and info messages on top of the page */ ?> 127 <!-- ********** Notice ********** --> 128 <?php 129 if(page_exists(":header") && auth_quickaclcheck(":header")) 130 { 131 echo '<div class="site-header-content">'; 132 tpl_include_page(':header'); 133 echo '</div>'; 134 } 135 ?> 136 137 <?php if($conf['youarehere'] || $conf['breadcrumbs']):?> 138 139 <div class="site-navigation"> 140 <!-- BREADCRUMBS --> 141 <?php if($conf['youarehere']){ ?> 142 <div class="breadcrumbs"><?php tpl_youarehere() ?></div> 143 <?php } ?> 144 <?php if($conf['breadcrumbs']){ ?> 145 <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div> 146 <?php } ?> 147 </div> 148 <?php endif?> 149 </div> 150 <?php endif?> 151 152<div id="main"> 153 154 <?php if ($showSidebar): ?> 155 <div id="sidebar" class="left-column" aria-label="<?php echo $lang['sidebar'] ?>"> 156 <div class="sidebar-content"> 157 <?php tpl_include_page($conf['sidebar'], 1, 1) /* includes the nearest sidebar page */ ?> 158 </div> 159 </div> 160 <?php endif; ?> 161 162 163 <div id="view" class="right-column"> 164 165 <?php if(($conf['youarehere'] || $conf['breadcrumbs'] || (page_exists(":header") && auth_quickaclcheck(":header"))) && tpl_getConf('siteHeaderPosition')=='Above page'):?> 166 <div class="site-header"> 167 <?php html_msgarea() /* occasional error and info messages on top of the page */ ?> 168 <!-- ********** Notice ********** --> 169 <?php 170 if(page_exists(":header") && auth_quickaclcheck(":header")) 171 { 172 echo '<div class="site-header-content">'; 173 tpl_include_page(':header'); 174 echo '</div>'; 175 } 176 ?> 177 178 <?php if($conf['youarehere'] || $conf['breadcrumbs']):?> 179 180 <div class="site-navigation"> 181 <!-- BREADCRUMBS --> 182 <?php if($conf['youarehere']){ ?> 183 <div class="breadcrumbs"><?php tpl_youarehere() ?></div> 184 <?php } ?> 185 <?php if($conf['breadcrumbs']){ ?> 186 <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div> 187 <?php } ?> 188 </div> 189 <?php endif?> 190 </div> 191 <?php endif?> 192 193 <article id="content"> 194 <?php tpl_flush(); ?> 195 <?php tpl_content();?> 196 <?php tpl_flush(); ?> 197 </article> 198 199 200 <?php if(tpl_getConf('showPageInfo') ):?> 201 <div class="page-info"> 202 <?php tpl_pageinfo() /* 'Last modified' etc */ ?> 203 204 </div> 205 <?php endif; ?> 206 207 208 <?php 209 if((page_exists(":footer") && auth_quickaclcheck(":footer")) && tpl_getConf('siteFooterPosition')=='Below page') 210 { 211 echo '<footer id="footer">'; 212 tpl_include_page(':footer'); 213 echo '</footer>'; 214 } 215 ?> 216 <!-- /footer --> 217 <div style="display: none;"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div> 218 </div> 219 </div> 220 <?php 221 if((page_exists(":footer") && auth_quickaclcheck(":footer")) && tpl_getConf('siteFooterPosition')=='Bottom') 222 { 223 echo '<footer id="footer">'; 224 tpl_include_page(':footer'); 225 echo '</footer>'; 226 } 227 ?> 228</body> 229</html> 230