From c32fbbe17eb4774de9ba01c0f1bd7276a1699bc7 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 1 Jul 2021 10:12:38 +0200 Subject: [PATCH 01/71] hide sidebar tplinc includes when sidebar is collapsed --- css/plugins/tplinc.less | 6 ++++++ style.ini | 1 + 2 files changed, 7 insertions(+) create mode 100644 css/plugins/tplinc.less diff --git a/css/plugins/tplinc.less b/css/plugins/tplinc.less new file mode 100644 index 0000000..986b145 --- /dev/null +++ b/css/plugins/tplinc.less @@ -0,0 +1,6 @@ +.wide-content { + .sidebarheader, + .sidebarfooter { + visibility: hidden; + } +} diff --git a/style.ini b/style.ini index 01efeae..d487ac6 100755 --- a/style.ini +++ b/style.ini @@ -117,6 +117,7 @@ css/plugins/quicksubscribe.less = all css/plugins/sitemapnavi.less = all css/plugins/data.less = all css/plugins/fastwiki.less = all +css/plugins/tplinc.less = all ; _____________ print styles _____________ From 049cbbfef73d3d1042b0fdd2f74a3116405612fe Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 1 Jul 2021 23:51:33 +0200 Subject: [PATCH 02/71] Version upped --- template.info.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template.info.txt b/template.info.txt index 97d1628..b4106ea 100755 --- a/template.info.txt +++ b/template.info.txt @@ -1,7 +1,7 @@ base sprintdoc author Jana Deutschlaender email dokuwiki@cosmocode.de -date 2021-06-08 +date 2021-07-01 name sprintDoc Template desc modern, responsive template that integrates multiple plugins url https://www.dokuwiki.org/template:sprintdoc From 3e1e2a1f184c1fa9310ac944093fa2809f3f9f49 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 6 Jul 2021 12:27:06 +0200 Subject: [PATCH 03/71] added option to disable the autocollapsing of the sidebar --- Template.php | 15 +++++++++++++++ conf/default.php | 1 + conf/metadata.php | 2 ++ lang/de/settings.php | 2 ++ lang/en/settings.php | 1 + main.php | 2 +- 6 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Template.php b/Template.php index 454c237..14878a3 100644 --- a/Template.php +++ b/Template.php @@ -148,6 +148,21 @@ class Template { return $header . $nav; } + /** + * Default class defining is the sidebar should collapse + * + * @return string + */ + public function fullWidthClass() { + global $ACT; + // no auto collapsing? empty class + if (!tpl_getConf('autocollapse')) return ''; + // mode show? empty class + if ($ACT === "show") return ''; + // anything else? wide content + return 'wide-content '; + } + /** * Get all the tabs to display * diff --git a/conf/default.php b/conf/default.php index 1ca4c37..0617fd4 100755 --- a/conf/default.php +++ b/conf/default.php @@ -6,3 +6,4 @@ $conf['sidebar_sections'] = 'h1,h2,h3,h4,h5'; $conf['header_layout'] = 'header-default'; +$conf['autocollapse'] = 1; diff --git a/conf/metadata.php b/conf/metadata.php index 6214fd8..ed77775 100755 --- a/conf/metadata.php +++ b/conf/metadata.php @@ -17,3 +17,5 @@ $meta['header_layout'] = array( 'header-compact', ), ); + +$meta['autocollapse'] = array('onoff'); diff --git a/lang/de/settings.php b/lang/de/settings.php index c7708ef..5bbe996 100755 --- a/lang/de/settings.php +++ b/lang/de/settings.php @@ -14,3 +14,5 @@ $lang['sidebar_sections_o_li.level1 > .li'] = 'Top-level Listeneinträge in ve $lang['header_layout'] = 'Layout des Headers anpassen:'; $lang['header_layout_o_default'] = 'großer Header für langen Wiki Titel und Tagline'; $lang['header_layout_o_compact'] = 'kompakter Header für kurzen Wiki Titel ohne Tagline'; + +$lang['autocollapse'] = 'Sidebar automatisch einklappen wenn Nicht-Inhaltsseiten angezigt werden, um mehr Platz zu haben.'; diff --git a/lang/en/settings.php b/lang/en/settings.php index b37442c..6b09179 100755 --- a/lang/en/settings.php +++ b/lang/en/settings.php @@ -15,3 +15,4 @@ $lang['header_layout'] = 'Adjust header layout:'; $lang['header_layout_o_default'] = 'generous header layout for long wiki titel and tagline'; $lang['header_layout_o_compact'] = 'compact header layout for short wiki title and hidden tagline'; +$lang['autocollapse'] = 'Automatically collapse the sidebar when viewing non-content pages for more screen estate.'; diff --git a/main.php b/main.php index b5dd694..10980a5 100755 --- a/main.php +++ b/main.php @@ -68,7 +68,7 @@ $showSidebar = true; /* #dokuwiki__top used as anchor for "back to top" button/link links */ -$classWideContent = ($ACT === "show") ? "": "wide-content "; +$classWideContent = (Template::getInstance())->fullWidthClass(); ?> From 61b5ff893805dc988d12a16503435d90a3dd83f3 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 6 Jul 2021 23:51:32 +0200 Subject: [PATCH 04/71] Version upped --- template.info.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template.info.txt b/template.info.txt index b4106ea..fe39d50 100755 --- a/template.info.txt +++ b/template.info.txt @@ -1,7 +1,7 @@ base sprintdoc author Jana Deutschlaender email dokuwiki@cosmocode.de -date 2021-07-01 +date 2021-07-06 name sprintDoc Template desc modern, responsive template that integrates multiple plugins url https://www.dokuwiki.org/template:sprintdoc From a80089cadd936799775013ddad0a90bf7a6a23d0 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 21 Jul 2021 10:47:15 +0200 Subject: [PATCH 05/71] defend against unavailable login mechanism --- tpl/nav-usertools-buttons.php | 36 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/tpl/nav-usertools-buttons.php b/tpl/nav-usertools-buttons.php index f93cbb4..c4adcd5 100755 --- a/tpl/nav-usertools-buttons.php +++ b/tpl/nav-usertools-buttons.php @@ -7,15 +7,14 @@