1<?php 2/** 3 * Kiwiki Template 4 * 5 * @link http://dokuwiki.org/template:kiwiki 6 * @author Anika Henke <anika@selfthinker.org> 7 * @author Nicolas Prigent 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$tocMaxHeight = tpl_getConf('TocMaxHeight'); 18$themeMode = ''; 19if (!empty($_COOKIE['theme'])){ 20 $themeMode = $_COOKIE['theme']; 21} 22?><!DOCTYPE html> 23<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>" 24 lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js"> 25<head> 26 <meta charset="UTF-8" /> 27 <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title> 28 <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script> 29 <?php tpl_metaheaders() ?> 30 <meta name="viewport" content="width=device-width,initial-scale=1" /> 31 <?php echo tpl_favicon(array('favicon', 'mobile')) ?> 32 <?php tpl_includeFile('meta.html')?> 33 <style>body{ --kiwiki-toc-max-height:<?php echo $tocMaxHeight; ?>px}</style> 34</head> 35 36 37<body id="kiwiki" class="<?php echo $themeMode; ?>"> 38 <?php /* the "dokuwiki__top" id is needed somewhere at the top, because that's where the "back to top" button/link links to */ ?> 39 <?php /* tpl_classes() provides useful CSS classes; if you choose not to use it, the 'dokuwiki' class at least 40 should always be in one of the surrounding elements (e.g. plugins and templates depend on it) */ ?> 41 <?php $admin_page = (($ACT == "admin") && (isset($_REQUEST['page']))) ? explode("#",$_REQUEST['page'])[0]: "" ;?> 42 <div id="dokuwiki__site"> 43 <div id="dokuwiki__top" class="site <?php echo tpl_classes() ." " . $admin_page; ?>"> 44 <!-- ********** HEADER ********** --> 45 <?php include('partial/header.php');?> 46 47 <?php include('partial/before_content.php'); ?> 48 49 <?php include('partial/content.php');?> 50 51 </div> 52 <!-- ********** FOOTER ********** --> 53 <?php include('partial/footer.php'); ?> 54 <!-- GO TOP --> 55 <div id="gotop"> 56 <?php 57 58 59 $items = (new \dokuwiki\Menu\KiwikiGoTop())->getItems(); 60 echo '<a href="'.$items[0]->getLink().'" title="'.$items[0]->getTitle().'">' 61 .'<span class="icon">'.inlineSVG($items[0]->getSvg()).'</span>' 62 . '<span class="a11y">'.$items[0]->getLabel().'</span>' 63 . '</a>'; 64 ?> 65 </div> 66 </div><!-- /site --> 67 <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div> 68</body> 69</html> 70