From e4a9930b4716be77450a291f7f54a708e75be7f2 Mon Sep 17 00:00:00 2001 From: matthiasgrimm Date: Tue, 31 May 2005 20:41:55 +0200 Subject: toc toggle button The TOC toggle button was very small and inconspicuous. This patch replaces the old one with small arrows placed at the right border of the TOC header. Code cleanup in html.php: html_toc() and html_list_toc() are obsolete and have been removed. darcs-hash:20050531184155-7ef76-249f948b2a8b71d45aab2b8418db2be5eb638f6d.gz --- images/arrow_down.png | Bin 0 -> 462 bytes images/arrow_up.png | Bin 0 -> 431 bytes inc/html.php | 37 ------------------------------------- inc/parser/xhtml.php | 8 ++++++-- script.js | 4 ++-- tpl/default/design.css | 11 +++++++++++ 6 files changed, 19 insertions(+), 41 deletions(-) create mode 100644 images/arrow_down.png create mode 100644 images/arrow_up.png diff --git a/images/arrow_down.png b/images/arrow_down.png new file mode 100644 index 000000000..cc0ab149c Binary files /dev/null and b/images/arrow_down.png differ diff --git a/images/arrow_up.png b/images/arrow_up.png new file mode 100644 index 000000000..3031122e5 Binary files /dev/null and b/images/arrow_up.png differ diff --git a/inc/html.php b/inc/html.php index b08f313e1..b9f2e957b 100644 --- a/inc/html.php +++ b/inc/html.php @@ -215,43 +215,6 @@ function html_btn($name,$id,$akey,$params,$method='get'){ return $ret; } -/** - * Print the table of contents - * - * @author Andreas Gohr - */ -function html_toc($toc){ - global $lang; - $ret = ''; - $ret .= '
'; - $ret .= '
'; - $ret .= $lang['toc']; - $ret .= ' '; - $ret .= '
'; - $ret .= '
'; - $ret .= html_buildlist($toc,'toc','html_list_toc'); - $ret .= '
'; - $ret .= '
'; - return $ret; -} - -/** - * TOC item formatter - * - * User function for html_buildlist() - * - * @author Andreas Gohr - */ -function html_list_toc($item){ - $ret = ''; - $ret .= ''; - $ret .= $item['name']; - $ret .= ''; - return $ret; -} - /** * show a wiki page * diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index da5c70459..06f286a20 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -70,9 +70,13 @@ class Doku_Renderer_xhtml extends Doku_Renderer { global $lang; $this->doc .= '
'.DOKU_LF; $this->doc .= '
'; +/* $this->doc .= ' '; $this->doc .= $lang['toc']; - $this->doc .= '
'.DOKU_LF; + $this->doc .= '
'.DOKU_LF; $this->doc .= '
'.DOKU_LF; } diff --git a/script.js b/script.js index f43e9abbf..d25246c9c 100644 --- a/script.js +++ b/script.js @@ -291,10 +291,10 @@ function suggestWikiname(){ */ function showTocToggle(show,hide) { if(document.getElementById) { - document.writeln('' + + document.writeln(''); } } diff --git a/tpl/default/design.css b/tpl/default/design.css index 792f508be..14c419df4 100644 --- a/tpl/default/design.css +++ b/tpl/default/design.css @@ -472,6 +472,17 @@ div.tocheader { margin-bottom: 2px; } +div.toctoggle { + float:right; + margin-top:0.3em; + margin-right:3px; +} + +div.toctoggle img { + width:0.8em; + height:0.8em; +} + #tocinside { border: 1px solid #8cacbb; background-color: #ffffff; -- cgit v1.2.3