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