* @author Nicolas Prigent * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) */ if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */ @require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */ /*Get all template configurations*/ $showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && !empty($_SERVER['REMOTE_USER']) ); $showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show'); $sidebar = $conf['sidebar']; $sidebarElement = tpl_getConf('sidebarIsNav') ? 'nav' : 'aside'; $sidebarMaxHeight = tpl_getConf('SidebarMaxHeight'); $sidebar_right = tpl_getConf('SidebarRight'); $toc = tpl_toc(true); $tocMaxHeight = tpl_getConf('TocMaxHeight'); $toc_right = tpl_getConf('TocRight'); $contentMaxWidth = tpl_getConf('ContentMaxWidth'); $themeMode = tpl_getConf('DefaultTheme'); $forceTheme = tpl_getConf('ForceTheme'); $contentWidth = '100%'; $asideWidth = '20%'; if(($toc!='' || ($ACT == 'show' && page_exists($sidebar))) && $sidebar_right == $toc_right){ $contentWidth = '80%'; } if($sidebar_right != $toc_right ){ $contentWidth = '68%'; $asideWidth = '16%'; } if (!empty($_COOKIE['theme'])){ if(!$forceTheme){ $themeMode = in_array($_COOKIE['theme'], ['darkmode', 'lightmode', 'system-color']) ? $_COOKIE['theme'] : $themeMode; }else{ setcookie("theme",$themeMode); } } if (!isset($_COOKIE['theme']) || empty($_COOKIE['theme'] || !in_array($_COOKIE['theme'], ['darkmode', 'lightmode', 'system-color']))){ setcookie("theme",$themeMode); } $logoSize = array(); $logodark = tpl_getMediaFile(array(':wiki:logo-dark.png', ':logo-dark.png', 'images/logo-dark.png'), true, $logoSize, false); $logolight = tpl_getMediaFile(array(':wiki:logo-light.png', ':logo-light.png', 'images/logo-light.png'), true, $logoSize, false); $logo = tpl_getMediaFile(array(':wiki:logo.png', ':logo.png', 'images/logo.png'), true, $logoSize); /*Main html template*/ ?>