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