From d4c5a4240d4ad400c94011005d6e7ec5a4fa5948 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 20 Apr 2017 11:52:12 +0200 Subject: [PATCH 1/3] integrate star toggle for starred plugin --- css/plugins/starred.less | 11 +++++++---- style.ini | 1 + tpl/nav-page-attributes.php | 13 ++++++++++--- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/css/plugins/starred.less b/css/plugins/starred.less index 6c3e0c6..85e9a27 100644 --- a/css/plugins/starred.less +++ b/css/plugins/starred.less @@ -3,8 +3,11 @@ */ -/* + + + + + global + + + + + */ - -#dokuwiki__site { - +.page-attributes .starred svg { + height: 1.6em; + width: 1.6em; +} + +.page-attributes .starred.on svg { + fill: @ini_link; } diff --git a/style.ini b/style.ini index e65c476..1cba47d 100755 --- a/style.ini +++ b/style.ini @@ -105,6 +105,7 @@ css/plugins/edittable.less = all css/plugins/extension__manager.less = all css/plugins/folded.less = all css/plugins/configmanager.less = all +css/plugins/starred.less = all ; _____________ print styles _____________ diff --git a/tpl/nav-page-attributes.php b/tpl/nav-page-attributes.php index 6fceac4..3b55f1a 100755 --- a/tpl/nav-page-attributes.php +++ b/tpl/nav-page-attributes.php @@ -5,9 +5,10 @@ if(!defined('DOKU_INC')) die(); $doPlugin = plugin_load('helper', 'do'); /** @var \helper_plugin_qc $qcPlugin */ $qcPlugin = plugin_load('helper', 'qc'); +/** @var \action_plugin_starred $starredPlugin */ +$starredPlugin = plugin_load('action', 'starred'); - -if($doPlugin !== null || $qcPlugin !== null) { +if($doPlugin !== null || $qcPlugin !== null || $starredPlugin !== null) { echo '"; } From 728071e818f4ed725ee0ff36df0de1eb9c375b28 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 20 Apr 2017 12:06:55 +0200 Subject: [PATCH 2/3] nicer starred styles on hover --- css/plugins/starred.less | 28 ++++++++++++++++++++++------ tpl/nav-page-attributes.php | 2 +- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/css/plugins/starred.less b/css/plugins/starred.less index 85e9a27..f15c941 100644 --- a/css/plugins/starred.less +++ b/css/plugins/starred.less @@ -2,12 +2,28 @@ * This file provides styles for starred plugin */ +.page-attributes { -.page-attributes .starred svg { - height: 1.6em; - width: 1.6em; + li.plugin_starred { + .starred svg { + margin-top: .1em; + width: 1.6em; + height: 1.6em; + font-size: 0.82rem; + fill: @ini_nav_menu_color; + } + + .starred.on svg { + fill: @ini_link; + } + + a:hover, + a:active { + .starred svg { + fill: @ini_nav_menu_hover_bg; + } + } + + } } -.page-attributes .starred.on svg { - fill: @ini_link; -} diff --git a/tpl/nav-page-attributes.php b/tpl/nav-page-attributes.php index 3b55f1a..84bbf77 100755 --- a/tpl/nav-page-attributes.php +++ b/tpl/nav-page-attributes.php @@ -42,7 +42,7 @@ if($doPlugin !== null) { } if($starredPlugin !== null) { - echo '
  • '; + echo '
  • '; $starredPlugin->tpl_starred(); echo '
  • '; } From 1fc95e4da6733dbfd6643acd48333894b4f013bf Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 20 Apr 2017 13:18:08 +0200 Subject: [PATCH 3/3] integrate the own stared pages into the sidebar --- css/plugins/starred.less | 12 +++++++++++- img/star-circle.svg | 1 + lang/en/lang.php | 1 + tpl/main-sidebar-nav.php | 29 +++++++++++++++++++++++++++++ 4 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 img/star-circle.svg diff --git a/css/plugins/starred.less b/css/plugins/starred.less index f15c941..057a04c 100644 --- a/css/plugins/starred.less +++ b/css/plugins/starred.less @@ -3,7 +3,6 @@ */ .page-attributes { - li.plugin_starred { .starred svg { margin-top: .1em; @@ -27,3 +26,14 @@ } } +nav.nav-starred { + ul { + list-style: none; + li { + margin-left: 0; + svg { + vertical-align: middle; + } + } + } +} diff --git a/img/star-circle.svg b/img/star-circle.svg new file mode 100644 index 0000000..b71b998 --- /dev/null +++ b/img/star-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/lang/en/lang.php b/lang/en/lang.php index 3b01cd1..99ea8a3 100755 --- a/lang/en/lang.php +++ b/lang/en/lang.php @@ -23,6 +23,7 @@ $lang['head_menu_status'] = 'site status'; $lang['head_breadcrumb'] = 'location indicator'; $lang['head_menu_trace'] = 'Last Visited Pages'; $lang['head_meta_box'] = 'meta data for this page'; +$lang['head_menu_starred'] = 'Starred Pages'; $lang['jump_to_quicksearch'] = 'Jump to quick search'; diff --git a/tpl/main-sidebar-nav.php b/tpl/main-sidebar-nav.php index 4fe6344..7998827 100644 --- a/tpl/main-sidebar-nav.php +++ b/tpl/main-sidebar-nav.php @@ -48,6 +48,35 @@ +loadStars(); +if($stars): + ?> + + + +