diff options
Diffstat (limited to 'lib/tpl/dokuwiki/main.php')
-rw-r--r-- | lib/tpl/dokuwiki/main.php | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php index 57c94f174..563d9c949 100644 --- a/lib/tpl/dokuwiki/main.php +++ b/lib/tpl/dokuwiki/main.php @@ -10,15 +10,15 @@ if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */ -$showSidebar = $conf['sidebar'] && page_exists($conf['sidebar']) && ($ACT=='show'); -?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>" - lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>"> +$hasSidebar = page_findnearest($conf['sidebar']); +$showSidebar = $hasSidebar && ($ACT=='show'); +?><!DOCTYPE html> +<html lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]--> <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title> + <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script> <?php tpl_metaheaders() ?> <meta name="viewport" content="width=device-width,initial-scale=1" /> <?php echo tpl_favicon(array('favicon', 'mobile')) ?> @@ -28,7 +28,8 @@ $showSidebar = $conf['sidebar'] && page_exists($conf['sidebar']) && ($ACT=='show <body> <!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]--> <div id="dokuwiki__site"><div id="dokuwiki__top" - class="dokuwiki site mode_<?php echo $ACT ?> <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>"> + class="dokuwiki site mode_<?php echo $ACT ?> <?php echo ($showSidebar) ? 'showSidebar' : ''; + ?> <?php echo ($hasSidebar) ? 'hasSidebar' : ''; ?>"> <?php include('tpl_header.php') ?> @@ -37,10 +38,13 @@ $showSidebar = $conf['sidebar'] && page_exists($conf['sidebar']) && ($ACT=='show <?php if($showSidebar): ?> <!-- ********** ASIDE ********** --> <div id="dokuwiki__aside"><div class="pad include group"> - <?php tpl_flush() ?> - <?php tpl_includeFile('sidebarheader.html') ?> - <?php tpl_include_page($conf['sidebar']) ?> - <?php tpl_includeFile('sidebarfooter.html') ?> + <h3 class="toggle"><?php echo hsc(ucfirst($conf['sidebar'])) ?></h3> + <div class="content"> + <?php tpl_flush() ?> + <?php tpl_includeFile('sidebarheader.html') ?> + <?php tpl_sidebar() ?> + <?php tpl_includeFile('sidebarfooter.html') ?> + </div> </div></div><!-- /aside --> <?php endif; ?> |