[dokuwiki] hideable sidebar

  • From: Thierry LEGRAS <Thierry.Legras@xxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 12 Oct 2005 10:39:52 +0200

Hi,

I modified the sidebar template to make him hideable like the table of
content (same css classes & copied javascript function)
For those who are interested by the idea, just replace these 2 files in
sidebar template (last template version & dokuwiki-2005-09-22).

This is a first shot to try the idea, comment are highly welcome either
on look and feel (position on the left does not seem perfect to me) and
on the way it is coded (sorry, i am quite new to web development...).

Few ideas i would like try:
- still on the idea to have sidebar look and feel similar to toc, i will
try to had a little arrow to move the sidebar either on the left/right.
this arrow would also be added to toc as well.
- i would like to tune the way the default index is presented/behave in
the sidebar: selecting a namespace does not open the index of the
namespace in main page, but just expand the namespace on the sidebar;
outline plugin could be usefull for that.
- ultimate goal a la emacs speedbar (if we have no dreams we are dead ;)
): merge the toc and sidebar, the toc would be just the content of a
particular page that is can be expanded/collapse.

Cheers,
Thierry.

/* TL addition for sidebartoggle */
/* sidebar is based on toc classes. see design.css; only deviation for sidebar 
elements (change right to left, etc.) and field overwritten are set here */

#sidebar {
  margin-right: 2em;
  float:left;
  }
#sidebarheader {
  text-align: right;
}

#sidebarinside {
  border: 1px solid #8cacbb;
  background-color: #ffffff;
  text-align: left;
  padding-top: 0.5em;
  padding-left: 0.5em;
  padding-bottom: 0.7em;
}

#sidebartoggle {
  float:left;
  margin-right:3px;
}

/* display only namespace tree */
#sidebarinside h1, #sidebarinside div.level1, #sidebarinside .toc {
        display: none;
}

h1, h2, h3, h4, h5, div.toc {
/* overwritte design.css values (just to keep sidebar modifications as much as 
possible out of other files) */
    clear: none;
}
* * This template is the Dokuwiki Default Template with * a few alterations * * @link http://wiki.splitbrain.org/wiki:tpl:templates * @author Andreas Gohr */ // include functions that provide sidebar functionality @require_once(dirname(__FILE__).'/tplfn_sidebar.php'); ?> " lang="" dir=""> >
[[]]
 
 
 

Other related posts:

  • » [dokuwiki] hideable sidebar