From e1bb41cd928f5663d8aab01c378004787b5f4dd1 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Tue, 24 Oct 2017 13:10:22 +0100 Subject: [PATCH] sidebar: Re-enable this standard functionality This means if a sidebar file exists in a namespace or parent namespace it will be rendered alongside the document. Way good for index cutouts or workflows --- public_html/lib/tpl/e/css/modifications.css | 10 ++++++++++ public_html/lib/tpl/e/main.php | 17 +++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/public_html/lib/tpl/e/css/modifications.css b/public_html/lib/tpl/e/css/modifications.css index b2c3c236..072ad17e 100644 --- a/public_html/lib/tpl/e/css/modifications.css +++ b/public_html/lib/tpl/e/css/modifications.css @@ -90,6 +90,16 @@ h1, h2, h3, h4, h5, h6, } } +#dokuwiki__aside { + float: right; + position: relative; + background-color: #282828; + padding-left: 10px; + padding-right: 10px; + margin-right: 15px; + min-width: 250px; +} + @media screen and (max-width: 768px) { table.columns-plugin { border: none; diff --git a/public_html/lib/tpl/e/main.php b/public_html/lib/tpl/e/main.php index e0eae4e0..2f1fd48c 100644 --- a/public_html/lib/tpl/e/main.php +++ b/public_html/lib/tpl/e/main.php @@ -18,6 +18,9 @@ $showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER # this affects our grid layout later ( see 'if ($showTOC)' ) $showTOC = ($ACT == "show") && tpl_toc(true); +$hasSidebar = page_findnearest($conf['sidebar']); +$showSidebar = $hasSidebar && ($ACT=='show'); + ?> @@ -94,6 +97,20 @@ $showTOC = ($ACT == "show") && tpl_toc(true);
+ + + +
+ +