From eab9fb6fa709992eb84705bcd3aa0758a1ab765d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Mon, 4 Jun 2018 15:29:49 +0200 Subject: [PATCH 001/169] =?UTF-8?q?=F0=9F=92=A1=20type=20hint=20must=20be?= =?UTF-8?q?=20direcetly=20in=20front=20of=20hinted=20variable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- detail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detail.php b/detail.php index d69c24a..fdc2afe 100755 --- a/detail.php +++ b/detail.php @@ -344,8 +344,8 @@ include('tpl/favicon_tiles.php'); /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ /* open street maps if geo data is available */ -/** @var helper_plugin_spatialhelper_index $spatial */ /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ + /** @var \helper_plugin_spatialhelper_index $spatial */ $spatial = plugin_load('helper', 'spatialhelper_index'); if ($spatial && plugin_load('helper', 'geophp')) { global $IMG; From 2673e6cbd9e1c6e645c720efa7360ab5b9c601bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Mon, 4 Jun 2018 15:36:56 +0200 Subject: [PATCH 002/169] =?UTF-8?q?=F0=9F=90=9B=20Apply=20.dokuwiki=20clas?= =?UTF-8?q?s=20to=20div=20below=20body=20to=20better=20mirror=20dokwuki=20?= =?UTF-8?q?template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This may have unintended side-effects, but so far looks good. --- main.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.php b/main.php index fef4678..d3bc13e 100755 --- a/main.php +++ b/main.php @@ -69,9 +69,9 @@ $showSidebar = true; /* #dokuwiki__top used as anchor for "back to top" button/link links */ $classWideContent = ($ACT === "show") ? "": "wide-content "; ?> - + -
+
Date: Mon, 4 Jun 2018 17:45:42 +0200 Subject: [PATCH 003/169] =?UTF-8?q?=F0=9F=92=84=20Remove=20unneccesary(=3F?= =?UTF-8?q?)=20color=20definition=20for=20the=20edit=20area?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This caused problems with the WYSIWYG editor which expects to styles of the wiki to apply in the edit-area as well --- css/plugins/edit.less | 6 ------ 1 file changed, 6 deletions(-) diff --git a/css/plugins/edit.less b/css/plugins/edit.less index 888ab5c..2f0288a 100644 --- a/css/plugins/edit.less +++ b/css/plugins/edit.less @@ -37,12 +37,6 @@ padding-bottom: 1rem; } - * { - &:not(button) { - color: @color-editBox; - } - } - @media @screen_max-xs { div.summary { label[for=edit__summary] { From c300cc822dd4b4868999de027a3f19f4ebd43056 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Mon, 4 Jun 2018 17:46:49 +0200 Subject: [PATCH 004/169] =?UTF-8?q?=F0=9F=94=96=20Version=20upped?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template.info.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template.info.txt b/template.info.txt index 65e213f..dc60d1d 100755 --- a/template.info.txt +++ b/template.info.txt @@ -1,7 +1,7 @@ base sprintdoc author Jana Deutschlaender email dokuwiki@cosmocode.de -date 2018-05-12 +date 2018-06-04 name sprintDoc Template desc modern, responsive template that integrates multiple plugins url https://www.dokuwiki.org/template:sprintdoc From 347e7cdd75526dafcdf2e43e4201c75556f50ca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Sat, 7 Jul 2018 11:01:28 +0200 Subject: [PATCH 005/169] =?UTF-8?q?=F0=9F=92=84=20improve=20display=20of?= =?UTF-8?q?=20(struct)=20bureaucracy=20fields?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bureaucracy handles field width already responsivly --- css/plugins/bureaucracy.less | 1 - 1 file changed, 1 deletion(-) diff --git a/css/plugins/bureaucracy.less b/css/plugins/bureaucracy.less index 3ba0143..80f6012 100755 --- a/css/plugins/bureaucracy.less +++ b/css/plugins/bureaucracy.less @@ -57,7 +57,6 @@ span { float: left; - width: 50%; text-align: right; line-height: @line-height-default; padding-top: .2em; From ac38b51b0462f034eec1718374d8460b23914931 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 20 Jul 2018 23:53:06 +0200 Subject: [PATCH 006/169] Version upped --- template.info.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template.info.txt b/template.info.txt index dc60d1d..668a719 100755 --- a/template.info.txt +++ b/template.info.txt @@ -1,7 +1,7 @@ base sprintdoc author Jana Deutschlaender email dokuwiki@cosmocode.de -date 2018-06-04 +date 2018-07-07 name sprintDoc Template desc modern, responsive template that integrates multiple plugins url https://www.dokuwiki.org/template:sprintdoc From 28b3de4fafcb85f93d447bc09400d9c19924d1b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Thu, 30 Aug 2018 13:47:06 +0200 Subject: [PATCH 007/169] =?UTF-8?q?=F0=9F=90=9B=20Fix=20styles=20hiding=20?= =?UTF-8?q?highlightparent=20plugin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit plugin filename had typo, when z-index: -1 was removed from dokuwiki__content::before side-effects on highlightparent weren't checked --- css/area_content.less | 10 ---------- .../{hightlight_parent.less => highlight_parent.less} | 11 +++++++++++ 2 files changed, 11 insertions(+), 10 deletions(-) rename css/plugins/{hightlight_parent.less => highlight_parent.less} (55%) diff --git a/css/area_content.less b/css/area_content.less index 8b83013..6aa15ba 100755 --- a/css/area_content.less +++ b/css/area_content.less @@ -27,16 +27,6 @@ clear: both; padding-top: 1em; // as h1 } - - #plugin__highlightparent { - clear: none; - display: block; - - + * { - clear: both; - padding-top: 1em; // as h1 - } - } } } } diff --git a/css/plugins/hightlight_parent.less b/css/plugins/highlight_parent.less similarity index 55% rename from css/plugins/hightlight_parent.less rename to css/plugins/highlight_parent.less index a59a4df..ac61e29 100644 --- a/css/plugins/hightlight_parent.less +++ b/css/plugins/highlight_parent.less @@ -5,6 +5,17 @@ /* + + + + + global + + + + + */ +#plugin__highlightparent { + clear: none; + display: block; + position: relative; + + + * { + clear: both; + padding-top: 1em; // as h1 + } +} + @media @screen_max-md { #plugin__highlightparent { clear: both; From 153875bae42be7094aec26edea44f8c4c3b39479 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 30 Aug 2018 23:53:18 +0200 Subject: [PATCH 008/169] Version upped --- template.info.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template.info.txt b/template.info.txt index 668a719..402e946 100755 --- a/template.info.txt +++ b/template.info.txt @@ -1,7 +1,7 @@ base sprintdoc author Jana Deutschlaender email dokuwiki@cosmocode.de -date 2018-07-07 +date 2018-08-30 name sprintDoc Template desc modern, responsive template that integrates multiple plugins url https://www.dokuwiki.org/template:sprintdoc From 72fce92ac121a74e87e40ba0b5429b32fed11dd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Thu, 13 Sep 2018 13:19:43 +0200 Subject: [PATCH 009/169] =?UTF-8?q?=F0=9F=92=84=20Fix=20highlights=20in=20?= =?UTF-8?q?headline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reset style broke highlighting in headlines without visible benefit See #14 --- css/base.less | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/css/base.less b/css/base.less index b79477c..4c28f07 100755 --- a/css/base.less +++ b/css/base.less @@ -199,18 +199,6 @@ header, .elementsReset(); } -div, span, object, -h1, h2, h3, h4, h5, h6, p, blockquote, -a, abbr, em,acronym, img, strong, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -input, select, option, textarea, button { - font-size: 1rem; - line-height: 100%; -} - - ol, ul { list-style: none outside none; From 07a6211583014e9c3aa819b007639d54439c138f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Thu, 13 Sep 2018 13:42:33 +0200 Subject: [PATCH 010/169] =?UTF-8?q?=F0=9F=9A=B8=20Make=20entire=20quick=20?= =?UTF-8?q?search=20row=20clickable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See #14 --- css/area_main-sidebar-search.less | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/css/area_main-sidebar-search.less b/css/area_main-sidebar-search.less index 743b1b5..a217291 100644 --- a/css/area_main-sidebar-search.less +++ b/css/area_main-sidebar-search.less @@ -152,13 +152,20 @@ background-color: #FFF; padding: 0; - strong, + strong { + color: @quicksearch-button-color; + padding: 0.25rem 0.5rem + } + ul li { color: @quicksearch-button-color; - padding: .25rem .5rem; - * { + a { + display: block; + padding: 0.25rem 0.5rem; + overflow: hidden; color: inherit; + text-overflow: ellipsis; } } From c675d15e37aaabf6154e361a6950a3114ae5fc7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Thu, 13 Sep 2018 13:43:39 +0200 Subject: [PATCH 011/169] =?UTF-8?q?=F0=9F=94=96=20Version=20upped?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template.info.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template.info.txt b/template.info.txt index 402e946..970c154 100755 --- a/template.info.txt +++ b/template.info.txt @@ -1,7 +1,7 @@ base sprintdoc author Jana Deutschlaender email dokuwiki@cosmocode.de -date 2018-08-30 +date 2018-09-13 name sprintDoc Template desc modern, responsive template that integrates multiple plugins url https://www.dokuwiki.org/template:sprintdoc From 2765267e5950f94fbe7ab8dadc1397192f1b8739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Mon, 8 Oct 2018 13:15:14 +0200 Subject: [PATCH 012/169] =?UTF-8?q?=F0=9F=90=9B=20(css)=20Remove=20double?= =?UTF-8?q?=20styles=20for=20super-/subscript?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/base.less | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/css/base.less b/css/base.less index 4c28f07..ba4e2f0 100755 --- a/css/base.less +++ b/css/base.less @@ -351,22 +351,6 @@ nav > ul { font-size: 80%; } - sub, - sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; - } - - sup { - top: -0.5em; - } - - sub { - bottom: -0.25em; - } - svg:not(:root) { overflow: hidden; } From e548bee22566c10ca9ad7977494d92cb02d0ed9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Mon, 8 Oct 2018 13:16:06 +0200 Subject: [PATCH 013/169] =?UTF-8?q?=F0=9F=92=84=20(css)=20Fix=20styling=20?= =?UTF-8?q?for=20struct=20bureaucracy=20form=20fields?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See cosmocode/dokuwiki-plugin-struct#404 --- css/plugins/struct.less | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/css/plugins/struct.less b/css/plugins/struct.less index 5c07d5c..a7f32b8 100755 --- a/css/plugins/struct.less +++ b/css/plugins/struct.less @@ -124,6 +124,27 @@ margin-left: @small-spacing; } } + + /* struct fields for bureaucracy forms */ + .bureaucracy__plugin { + .field { + clear: both; + + label { + padding: 0; + + .label { + text-align: right; + font-weight: bold; + padding: 0; + } + } + + .input { + line-height: 2.5em; + } + } + } } From 645b04c3411c9ae7396a76d2570ab6d2417265a2 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 8 Oct 2018 23:53:16 +0200 Subject: [PATCH 014/169] Version upped --- template.info.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template.info.txt b/template.info.txt index 970c154..2ccfe03 100755 --- a/template.info.txt +++ b/template.info.txt @@ -1,7 +1,7 @@ base sprintdoc author Jana Deutschlaender email dokuwiki@cosmocode.de -date 2018-09-13 +date 2018-10-08 name sprintDoc Template desc modern, responsive template that integrates multiple plugins url https://www.dokuwiki.org/template:sprintdoc From ed91dc00ee442b02a6e87512608960a7b9578672 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 11 Mar 2019 12:08:18 +0100 Subject: [PATCH 015/169] support the quicksubscribe plugin --- css/plugins/quicksubscribe.less | 24 ++++++++++++++++++++++++ style.ini | 1 + tpl/nav-page-attributes.php | 8 ++++++++ 3 files changed, 33 insertions(+) create mode 100644 css/plugins/quicksubscribe.less diff --git a/css/plugins/quicksubscribe.less b/css/plugins/quicksubscribe.less new file mode 100644 index 0000000..afc1b60 --- /dev/null +++ b/css/plugins/quicksubscribe.less @@ -0,0 +1,24 @@ +/** + * This file provides styles for the quicksubscribe plugin + */ + +.page-attributes { + li.plugin_quicksubscribe { + a.plugin_qsub_subscribe { + svg { + width: 1.6em; + height: 1.6em; + font-size: 0.82rem; + fill: @ini_nav_menu_hover_color; + } + } + + a:hover, + a:focus, + a:active { + svg { + fill: @ini_nav_menu_hover_bg; + } + } + } +} diff --git a/style.ini b/style.ini index 2a80c8b..0c266e4 100755 --- a/style.ini +++ b/style.ini @@ -108,6 +108,7 @@ css/plugins/extension__manager.less = all css/plugins/folded.less = all css/plugins/configmanager.less = all css/plugins/starred.less = all +css/plugins/quicksubscribe.less = all css/plugins/data.less = all diff --git a/tpl/nav-page-attributes.php b/tpl/nav-page-attributes.php index 0d6b2ac..f79d40c 100755 --- a/tpl/nav-page-attributes.php +++ b/tpl/nav-page-attributes.php @@ -7,6 +7,8 @@ $doPlugin = plugin_load('helper', 'do'); $qcPlugin = plugin_load('helper', 'qc'); /** @var \action_plugin_starred $starredPlugin */ $starredPlugin = plugin_load('action', 'starred'); +/** @var \helper_plugin_quicksubscribe $quickSubPlugin */ +$quickSubPlugin = plugin_load('helper', 'quicksubscribe'); if($doPlugin !== null || $qcPlugin !== null || $starredPlugin !== null) { echo '
    '; @@ -48,6 +50,12 @@ if($starredPlugin !== null) { echo ''; } +if($quickSubPlugin !== null) { + echo '
  • '; + echo $quickSubPlugin->tpl_subscribe(); + echo '
  • '; +} + if($doPlugin !== null || $qcPlugin !== null || $starredPlugin !== null) { echo "
"; } From e9519300fa79ccddc87db87a4ab9348fe1b3722a Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 11 Mar 2019 23:53:22 +0100 Subject: [PATCH 016/169] Version upped --- template.info.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template.info.txt b/template.info.txt index 2ccfe03..eb4f219 100755 --- a/template.info.txt +++ b/template.info.txt @@ -1,7 +1,7 @@ base sprintdoc author Jana Deutschlaender email dokuwiki@cosmocode.de -date 2018-10-08 +date 2019-03-11 name sprintDoc Template desc modern, responsive template that integrates multiple plugins url https://www.dokuwiki.org/template:sprintdoc From 72166b7941a75a535d86f35171a05d4fd2953004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jana=20Deutschla=CC=88nder?= Date: Mon, 11 Mar 2019 16:08:20 +0100 Subject: [PATCH 017/169] #17: make header layout configurable --- conf/default.php | 2 +- conf/metadata.php | 9 +++++ css/area_header.less | 72 +++++++++++++++++++++++++++++++++++++ css/area_nav-usertools.less | 70 ++++++++++++++++++++++++++++++++++++ css/base_structure.less | 10 ++++++ detail.php | 2 +- lang/de/settings.php | 4 +++ lang/en/settings.php | 3 ++ main.php | 2 +- 9 files changed, 171 insertions(+), 3 deletions(-) diff --git a/conf/default.php b/conf/default.php index 9f1418e..1ca4c37 100755 --- a/conf/default.php +++ b/conf/default.php @@ -5,4 +5,4 @@ */ $conf['sidebar_sections'] = 'h1,h2,h3,h4,h5'; - +$conf['header_layout'] = 'header-default'; diff --git a/conf/metadata.php b/conf/metadata.php index 274f7c5..dd94e6f 100755 --- a/conf/metadata.php +++ b/conf/metadata.php @@ -9,3 +9,12 @@ $meta['sidebar_sections'] = array( 'li.level1 > .li', ), ); + +$meta['header_layout'] = array( + 'multichoice', + '_choices' => array( + 'header-default', + 'header-compact', + 'header-hidden', + ), + ); diff --git a/css/area_header.less b/css/area_header.less index f524543..0eb54dd 100755 --- a/css/area_header.less +++ b/css/area_header.less @@ -207,3 +207,75 @@ } } } + + +/* + + + + + layout option compact + + + + + */ +.header-compact { + #dokuwiki__header { + .main-title.desktop-only p.claim, + p.claim { + display: none; + } + + // desktop + @media @screen_min-md { + div.claim { + vertical-align: top; + } + + .main-title.desktop-only { + vertical-align: top; + } + + .main-title.desktop-only, + .logo { + padding-top: 0.4rem + } + } + + // mobile middle + @media @screen_max-md { + + .logo { + display: block; + position: absolute; + top: 0; + left: 3rem; + + .mobile-only { + margin: .4rem; + height: 1.75rem; + } + } + + .main-title:not([class*="desktop-only"]) { + display: inline-block; + vertical-align: top; + padding-left: 1.75rem; + } + + p.title { + font-size: 1rem; + } + } + + @media @screen_max-sm { + min-height: 2.7rem; + } + + @media @screen_max-xxs { + min-height: 70px; // needed for menu select toolbar + + .logo { + left: 2rem; + } + + .menu-tool-select { + padding-top: .3rem; + } + + } + + + } +} diff --git a/css/area_nav-usertools.less b/css/area_nav-usertools.less index 46aa165..c3e382b 100755 --- a/css/area_nav-usertools.less +++ b/css/area_nav-usertools.less @@ -297,3 +297,73 @@ } // a } // ul } // nav-usertools + + +/* + + + + + layout option compact + + + + + */ +.header-compact { + #dokuwiki__usertools.nav-usertools { + + // mobile + @media @screen_max-md { + left: 6rem; + + ul { + overflow: hidden; + + li.user { + color: @ini_background_site; + + bdi { + position: absolute; + width: 0; + padding: 0; + text-indent: -10000px; + + &:before { + transition: @transition background-color; + background-color: @ini_background_site; + color: @ini_nav_menu_color; + text-indent: 0; + } + } + + > a { + padding: 0 .2em; + color: @ini_nav_menu_hover_bg; + + bdi { + &:before { + background-color: @ini_nav_menu_hover_bg; + color: @ini_nav_menu_hover_color; + } + } + + &:hover { + color: @ini_nav_menu_hover_color; + + bdi { + &:before { + background-color: @ini_nav_menu_hover_color; + color: @ini_nav_menu_hover_bg; + } + } + } + } + + bdi + bdi { + display: none; + } + } + } + } + + @media @screen_max-sm { + ul li { + position: static; + float: right; + top: 0; right: 0; + } + } + } +} + diff --git a/css/base_structure.less b/css/base_structure.less index 0048ad4..1ef944e 100755 --- a/css/base_structure.less +++ b/css/base_structure.less @@ -166,6 +166,16 @@ } } + /* + + + + + layout option compact + + + + + */ + .header-compact { + .header { + .row > .col-xs-12 { + height: auto; + min-height: fit-content; + } + } + } + .tools { .row > .col-xs-12 { position: absolute; diff --git a/detail.php b/detail.php index fdc2afe..fa90150 100755 --- a/detail.php +++ b/detail.php @@ -65,7 +65,7 @@ include('tpl/favicon_tiles.php'); - +
.li'] = 'Top-level Listeneinträge in verschachtelten Listen'; + +$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'; diff --git a/lang/en/settings.php b/lang/en/settings.php index c210f07..b37442c 100755 --- a/lang/en/settings.php +++ b/lang/en/settings.php @@ -11,4 +11,7 @@ $lang['sidebar_sections_o_h1,h2'] = '1st and 2nd order headings'; $lang['sidebar_sections_o_h1,h2,h3,h4,h5'] = 'All headings'; $lang['sidebar_sections_o_li.level1 > .li'] = 'Top-level list items'; +$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'; diff --git a/main.php b/main.php index d3bc13e..990e4a8 100755 --- a/main.php +++ b/main.php @@ -69,7 +69,7 @@ $showSidebar = true; /* #dokuwiki__top used as anchor for "back to top" button/link links */ $classWideContent = ($ACT === "show") ? "": "wide-content "; ?> - +
Date: Mon, 11 Mar 2019 16:29:31 +0100 Subject: [PATCH 018/169] #17: set min-height for compact header with neither logo nor title --- css/area_header.less | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/css/area_header.less b/css/area_header.less index 0eb54dd..e46c549 100755 --- a/css/area_header.less +++ b/css/area_header.less @@ -212,6 +212,8 @@ /* + + + + + layout option compact + + + + + */ .header-compact { #dokuwiki__header { + min-height: 2.7rem; + .main-title.desktop-only p.claim, p.claim { display: none; @@ -258,11 +260,7 @@ font-size: 1rem; } } - - @media @screen_max-sm { - min-height: 2.7rem; - } - + @media @screen_max-xxs { min-height: 70px; // needed for menu select toolbar From c1e0eaa8303a36a2701cb9109f231a7ab8d2c2bf Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 12 Mar 2019 10:40:53 +0100 Subject: [PATCH 019/169] added support for the sitemapnavi plugin When installed the navigation can be switched between the default sidebar based navigation and the site tree --- Template.php | 80 ++++++++++++++++++++++++++++----- css/area_main-sidebar-tabs.less | 19 ++++++++ css/plugins/sitemapnavi.less | 10 +++++ lang/de/lang.php | 4 ++ lang/en/lang.php | 3 ++ main.php | 1 + style.ini | 3 +- tpl/main-sidebar-nav.php | 9 ++-- 8 files changed, 113 insertions(+), 16 deletions(-) create mode 100644 css/area_main-sidebar-tabs.less create mode 100644 css/plugins/sitemapnavi.less diff --git a/Template.php b/Template.php index ba66389..163fcfc 100644 --- a/Template.php +++ b/Template.php @@ -11,15 +11,19 @@ namespace dokuwiki\template\sprintdoc; */ class Template { - /** - * @var array loaded plugins - */ + /** @var array loaded plugins */ protected $plugins = array( 'sqlite' => null, 'tagging' => null, 'magicmatcher' => null, + 'tplinc' => null, + 'sitemapnavi' => null, ); + /** @var string the type of special navigation to use */ + protected $nav = ''; + + /** * Get the singleton instance * @@ -36,12 +40,26 @@ class Template { */ protected function __construct() { $this->initializePlugins(); + $this->initNavigationCookie(); /** @var \Doku_Event_Handler */ global $EVENT_HANDLER; $EVENT_HANDLER->register_hook('PLUGIN_TPLINC_LOCATIONS_SET', 'BEFORE', $this, 'registerIncludes'); } + /** + * Load all the plugins we support directly + */ + protected function initializePlugins() { + $this->plugins['sqlite'] = plugin_load('helper', 'sqlite'); + if($this->plugins['sqlite']) { + $this->plugins['tagging'] = plugin_load('helper', 'tagging'); + $this->plugins['magicmatcher'] = plugin_load('syntax', 'magicmatcher_issuelist'); + } + $this->plugins['tplinc'] = plugin_load('helper', 'tplinc'); + $this->plugins['sitemapnavi'] = plugin_load('helper', 'sitemapnavi'); + } + /** * Makes include position info available to the tplinc plugin * @@ -71,15 +89,57 @@ class Template { } /** - * Load all the plugins we support directly + * Sets a cookie to remember the requested special navigation */ - protected function initializePlugins() { - $this->plugins['sqlite'] = plugin_load('helper', 'sqlite'); - if($this->plugins['sqlite']) { - $this->plugins['tagging'] = plugin_load('helper', 'tagging'); - $this->plugins['magicmatcher'] = plugin_load('syntax', 'magicmatcher_issuelist'); + protected function initNavigationCookie() { + if ($this->plugins['sitemapnavi'] === null) return; + global $INPUT; + + $nav = $INPUT->str('nav'); + if($nav) { + set_doku_pref('nav', $nav); + $this->nav = $INPUT->str('nav'); + } else { + $this->nav = get_doku_pref('nav', 'sidebar'); } - $this->plugins['tplinc'] = plugin_load('helper', 'tplinc'); + } + + /** + * Return the navigation for the sidebar + * + * Defaults to the standard sidebar mechanism, but supports also the sitemapnavi plugin + * + * @return string + */ + public function getNavigation() { + global $ID; + global $conf; + + // add tabs if multiple navigation types available + $header = ''; + if ($this->plugins['sitemapnavi'] !== null) { + $header = ''; + } + + // decide what to show + if ($this->nav === 'sitetree') { + // site tree created by sitemapnavi plugin + $nav = ''; + } else { + // main navigation, loaded from standard sidebar, fixed up by javascript + $nav = ''; + } + + return $header . $nav; } /** diff --git a/css/area_main-sidebar-tabs.less b/css/area_main-sidebar-tabs.less new file mode 100644 index 0000000..9674def --- /dev/null +++ b/css/area_main-sidebar-tabs.less @@ -0,0 +1,19 @@ +#dokuwiki__aside ul.sidebar-tabs { + margin-top: 0; + margin-bottom: @nav-margin; + + border-bottom: 1px solid @ini_nav_menu_color; + + li { + display: inline-block; + border: 1px solid @ini_nav_menu_color; + padding: 0.25em 0.5em; + margin-bottom: -1px; + border-top-right-radius: @fix_border-radius; + border-top-left-radius: @fix_border-radius; + + &.active { + border-bottom: 1px solid @ini_background_site; + } + } +} diff --git a/css/plugins/sitemapnavi.less b/css/plugins/sitemapnavi.less new file mode 100644 index 0000000..75c6f3f --- /dev/null +++ b/css/plugins/sitemapnavi.less @@ -0,0 +1,10 @@ +#plugin__sitemapnavi { + padding-left: @nav-margin*2.5; + padding-bottom: @nav-margin; + margin-bottom: @nav-margin; + border-bottom: 1px solid @ini_nav_menu_color; + + li { + line-height: @line-height-bigger; + } +} diff --git a/lang/de/lang.php b/lang/de/lang.php index b86959c..478cb44 100755 --- a/lang/de/lang.php +++ b/lang/de/lang.php @@ -59,6 +59,10 @@ $lang['image_detail'] = 'Detailinformationen zum Bild'; $lang['mode_edit'] = 'Seite bearbeiten'; +$lang['nav_sidebar'] = 'Navigation'; +$lang['nav_sitemap'] = 'Seitenbaum'; + + /** * preferences colors */ diff --git a/lang/en/lang.php b/lang/en/lang.php index 48d6210..af8c4b2 100755 --- a/lang/en/lang.php +++ b/lang/en/lang.php @@ -59,6 +59,9 @@ $lang['image_detail'] = 'image details'; $lang['mode_edit'] = 'Editing Page'; +$lang['nav_sidebar'] = 'Navigation'; +$lang['nav_sitemap'] = 'Site Tree'; + /** * preferences colors */ diff --git a/main.php b/main.php index 990e4a8..20bd84a 100755 --- a/main.php +++ b/main.php @@ -9,6 +9,7 @@ */ use dokuwiki\template\sprintdoc\Template; +Template::getInstance(); if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */ header('X-UA-Compatible: IE=edge,chrome=1'); diff --git a/style.ini b/style.ini index 0c266e4..519d234 100755 --- a/style.ini +++ b/style.ini @@ -70,6 +70,7 @@ css/area_nav-usertools.less = all css/area_nav-pagetools.less = all css/area_nav-metabox.less = all css/area_main-sidebar-nav.less = all +css/area_main-sidebar-tabs.less = all css/area_main-sidebar-search.less = all css/area_main-content.less = all css/area_main-content-secedit.less = all @@ -109,7 +110,7 @@ css/plugins/folded.less = all css/plugins/configmanager.less = all css/plugins/starred.less = all css/plugins/quicksubscribe.less = all - +css/plugins/sitemapnavi.less = all css/plugins/data.less = all diff --git a/tpl/main-sidebar-nav.php b/tpl/main-sidebar-nav.php index 3079428..43e2a23 100644 --- a/tpl/main-sidebar-nav.php +++ b/tpl/main-sidebar-nav.php @@ -1,8 +1,7 @@ - + +getNavigation(); +?> +