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