1<?php 2/** 3 * DokuWiki Starter Template 4 * 5 * @link http://dokuwiki.org/template:starter 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(); /* must be run from within DokuWiki */ 11@require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */ 12 13$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && !empty($_SERVER['REMOTE_USER']) ); 14$showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show'); 15$sidebarElement = tpl_getConf('sidebarIsNav') ? 'nav' : 'aside'; 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 <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script> 23 <?php tpl_metaheaders() ?> 24 <meta name="viewport" content="width=device-width,initial-scale=1" /> 25 <?php echo tpl_favicon(array('favicon', 'mobile')) ?> 26 <?php tpl_includeFile('meta.html') ?> 27</head> 28 29<body> 30 <?php /* the "dokuwiki__top" id is needed somewhere at the top, because that's where the "back to top" button/link links to */ ?> 31 <?php /* tpl_classes() provides useful CSS classes; if you choose not to use it, the 'dokuwiki' class at least 32 should always be in one of the surrounding elements (e.g. plugins and templates depend on it) */ ?> 33 <div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?> <?php 34 echo ($showSidebar) ? 'hasSidebar' : ''; ?>"> 35 <?php html_msgarea() /* occasional error and info messages on top of the page */ ?> 36 <!-- ********** HEADER ********** --> 37 <header id="dokuwiki__header"><div class="pad"> 38 <?php tpl_includeFile('header.html') ?> 39 40 <div class="headings"> 41 <h1><?php tpl_link(wl(),$conf['title'],'accesskey="h" title="[H]"') ?></h1> 42 <?php /* how to insert logo instead (if no CSS image replacement technique is used): 43 upload your logo into the data/media folder (root of the media manager) and replace 'logo.png' accordingly: 44 tpl_link(wl(),'<img src="'.ml('logo.png').'" alt="'.$conf['title'].'" />','id="dokuwiki__top" accesskey="h" title="[H]"') */ ?> 45 <?php if ($conf['tagline']): ?> 46 <p class="claim"><?php echo $conf['tagline'] ?></p> 47 <?php endif ?> 48 49 <ul class="a11y skip"> 50 <li><a href="#dokuwiki__content"><?php echo $lang['skip_to_content'] ?></a></li> 51 </ul> 52 <div class="clearer"></div> 53 </div> 54 55 <div class="tools"> 56 <!-- USER TOOLS --> 57 <?php if ($conf['useacl'] && $showTools): ?> 58 <nav id="dokuwiki__usertools" aria-labelledby="dokuwiki__usertools_heading"> 59 <h3 class="a11y" id="dokuwiki__usertools_heading"><?php echo $lang['user_tools'] ?></h3> 60 <ul> 61 <?php if (!empty($_SERVER['REMOTE_USER'])) { 62 echo '<li class="user">'; 63 tpl_userinfo(); /* 'Logged in as ...' */ 64 echo '</li>'; 65 } ?> 66 <?php if (file_exists(DOKU_INC . 'inc/Menu/UserMenu.php')) { 67 /* the first parameter is for an additional class, the second for if SVGs should be added */ 68 echo (new \dokuwiki\Menu\UserMenu())->getListItems('action ', false); 69 } else { 70 /* tool menu before Greebo */ 71 _tpl_usertools(); 72 } ?> 73 </ul> 74 </nav> 75 <?php endif ?> 76 77 <!-- SITE TOOLS --> 78 <nav id="dokuwiki__sitetools" aria-labelledby="dokuwiki__sitetools_heading"> 79 <h3 class="a11y" id="dokuwiki__sitetools_heading"><?php echo $lang['site_tools'] ?></h3> 80 <?php tpl_searchform() ?> 81 <?php 82 // mobile menu (combines all menus in one dropdown) 83 // if (file_exists(DOKU_INC . 'inc/Menu/MobileMenu.php')) { 84 // echo (new \dokuwiki\Menu\MobileMenu())->getDropdown($lang['tools']); 85 // } else { 86 // tpl_actiondropdown($lang['tools']); 87 // } 88 ?> 89 <ul> 90 <?php if (file_exists(DOKU_INC . 'inc/Menu/SiteMenu.php')) { 91 echo (new \dokuwiki\Menu\SiteMenu())->getListItems('action ', false); 92 } else { 93 _tpl_sitetools(); 94 } ?> 95 </ul> 96 </nav> 97 98 </div> 99 <div class="clearer"></div> 100 101 <!-- BREADCRUMBS --> 102 <?php if($conf['breadcrumbs']){ ?> 103 <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div> 104 <?php } ?> 105 <?php if($conf['youarehere']){ ?> 106 <div class="breadcrumbs"><?php tpl_youarehere() ?></div> 107 <?php } ?> 108 109 <div class="clearer"></div> 110 <hr class="a11y" /> 111 </div></header><!-- /header --> 112 113 114 <div class="wrapper"> 115 116 <!-- ********** ASIDE ********** --> 117 <?php if ($showSidebar): ?> 118 <<?php echo $sidebarElement ?> id="dokuwiki__aside" aria-label="<?php echo $lang['sidebar'] ?>"><div class="pad aside include group"> 119 <?php tpl_includeFile('sidebarheader.html') ?> 120 <?php tpl_include_page($conf['sidebar'], 1, 1) /* includes the nearest sidebar page */ ?> 121 <?php tpl_includeFile('sidebarfooter.html') ?> 122 <div class="clearer"></div> 123 </div></<?php echo $sidebarElement ?>><!-- /aside --> 124 <?php endif; ?> 125 126 <!-- ********** CONTENT ********** --> 127 <main id="dokuwiki__content"><div class="pad"> 128 <?php tpl_flush() /* flush the output buffer */ ?> 129 <?php tpl_includeFile('pageheader.html') ?> 130 131 <div class="page"> 132 <!-- wikipage start --> 133 <?php tpl_content() /* the main content */ ?> 134 <!-- wikipage stop --> 135 <div class="clearer"></div> 136 </div> 137 138 <?php tpl_flush() ?> 139 <?php tpl_includeFile('pagefooter.html') ?> 140 </div></main><!-- /content --> 141 142 <div class="clearer"></div> 143 <hr class="a11y" /> 144 145 <!-- PAGE ACTIONS --> 146 <?php if ($showTools): ?> 147 <nav id="dokuwiki__pagetools" aria-labelledby="dokuwiki__pagetools_heading"> 148 <h3 class="a11y" id="dokuwiki__pagetools_heading"><?php echo $lang['page_tools'] ?></h3> 149 <ul> 150 <?php if (file_exists(DOKU_INC . 'inc/Menu/PageMenu.php')) { 151 echo (new \dokuwiki\Menu\PageMenu())->getListItems('action ', false); 152 } else { 153 _tpl_pagetools(); 154 } ?> 155 </ul> 156 </nav> 157 <?php endif; ?> 158 </div><!-- /wrapper --> 159 160 <!-- ********** FOOTER ********** --> 161 <footer id="dokuwiki__footer"><div class="pad"> 162 <div class="doc"><?php tpl_pageinfo() /* 'Last modified' etc */ ?></div> 163 <?php tpl_license('button') /* content license, parameters: img=*badge|button|0, imgonly=*0|1, return=*0|1 */ ?> 164 165 <?php tpl_includeFile('footer.html') ?> 166 </div></footer><!-- /footer --> 167 </div></div><!-- /site --> 168 169 <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div> 170</body> 171</html> 172