Question
I would like to duplicate one of my favourite
DokuWiki features:
Indended text and headlines:
here's a screenshot:
I can easily indent the headlines using css
margin but i have no idea how to automaticly indent the text like the headline...
Any ideas?
Environment
--
CarloSchulz - 27 Mar 2007
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
Indent as in
DokuWiki looks quite nice, yes. Someone with good css knowledge could help. Bumping this topic in the hope someone will reply.
--
PeterThoeny - 08 May 2007
I had a look into the css files of
DokuWiki.
These are the styles responsible for indenting headlines ans text:
/* special headlines */
div.dokuwiki h1 {font-size: 160%; margin-left: 0px; font-weight: bold;}
div.dokuwiki h2 {font-size: 150%; margin-left: 20px;}
div.dokuwiki h3 {font-size: 140%; margin-left: 40px; border-bottom: none; font-weight: bold;}
div.dokuwiki h4 {font-size: 120%; margin-left: 60px; border-bottom: none; font-weight: bold;}
div.dokuwiki h5 {font-size: 100%; margin-left: 80px; border-bottom: none; font-weight: bold;}
/* indent different sections */
div.dokuwiki div.level1 {margin-left: 3px;}
div.dokuwiki div.level2 {margin-left: 23px;}
div.dokuwiki div.level3 {margin-left: 43px;}
div.dokuwiki div.level4 {margin-left: 63px;}
div.dokuwiki div.level5 {margin-left: 83px;}
It seems like
DokuWiki puts the text underneath the headlines into a
< d i v > and links them automatically to the corresponding css class.
Is this approach (easily) reproduceable with TWiki? Any ideas or pointers?
--
CarloSchulz - 08 May 2007
Header generation is hard-coded in TWiki. You might want to look at the implementation of TOC (in TWiki.pm) for inspiration for how a plugin might reformat headers to include the <div> tags.
--
CrawfordCurrie - 14 May 2007
Thanks for the pointer Crawford. Unfortunately I'm not a coder and I don't really unterstand what's going on in TWiki.pm.
I'm far away from programming my own plugin that could solve this issue
Thanks anyway
--
CarloSchulz - 30 May 2007
Closing after more than 30 days of inactivity...
--
PeterThoeny - 06 Jul 2007