Skip to content
Permalink
Browse files

Offer option to show arrow on the left or right side

Default is left side, reproduces current behaviour in dokuwiki-sidebar.

Known issues: config options need translations
  • Loading branch information...
micgro42 committed Oct 10, 2016
1 parent 68bf61e commit d65126c0687c082439e19e70653f30e50aa7a995
Showing with 27 additions and 2 deletions.
  1. +3 −0 conf/default.php
  2. +3 −0 conf/metadata.php
  3. +18 −2 style.less
  4. +3 −0 syntax.php
@@ -0,0 +1,3 @@
<?php
$conf['arrow'] = 'left';
@@ -0,0 +1,3 @@
<?php
$meta['arrow'] = array('multichoice','_choices' => array('left', 'right', 'none'));
@@ -1,2 +1,18 @@
div#dokuwiki__aside li.open { list-style-image: url(../../images/open.png); }
div#dokuwiki__aside li.close { list-style-image: url(../../images/closed.png); }
div.plugin__navi {

&.left {
li.open { list-style-image: url(../../images/open.png); }
li.close { list-style-image: url(../../images/closed.png); }

}

&.right {
li.open {
background: no-repeat top right/0.8em url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAAANlBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC3dmhyAAAAEXRSTlMAAQcJCgsUIDZGW2Jjmt75/Rmge4gAAABISURBVBjTY2CgJWDmwBRj4RPkxiImiC4KEuNHEwWJcbPyoYiyQLgsyKJwDpIoNiY2TUyYxnMxsAlgOISXgYGdE827PIy0CEUAdlAEbg1NcZ0AAAAASUVORK5CYII=);
}
li.close {
background: no-repeat top right/0.8em url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUBAMAAAB/pwA+AAAAMFBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABaPxwLAAAAD3RSTlMAAQIECiMlYWJ3psPc3v2CpcpnAAAARklEQVQIW2NgIAgUoLQBg9QVCIvjGUP8Xwcws/83A8d/sDCY6gcLg0kwHyoHEoBIgUSggiDh+VBjgMIwQZghYMB+hIF8AABJKyB+OnNcUQAAAABJRU5ErkJggg==);
}

}
}
@@ -116,8 +116,11 @@ function render($format, Doku_Renderer $R, $data) {
$R->info['cache'] = false; // no cache please
$path = $this->getOpenPath($data, $opt);
$arrowLocation = $this->getConf('arrow');
$R->doc .= '<div class="plugin__navi ' . $arrowLocation . '">';
$this->renderTree($data, $path, $R);
$R->doc .= '</div>';
return true;
}

0 comments on commit d65126c

Please sign in to comment.
You can’t perform that action at this time.