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