Tags:
create new tag
, view all tags

Question

I would like to duplicate one of my favourite DokuWiki features:

Indended text and headlines:

here's a screenshot:

DokuWiki_IndendedTextAndHeadlines.png

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

TWiki version: TWikiRelease04x00x05
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: suse linux
Web server: appache 2.2.0
Perl version: 5.8.x
Client OS: MS xp
Web Browser: FF 2.0.0.3
Categories: Platform, Skin

-- CarloSchulz - 27 Mar 2007

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list 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.

dokuWiki_Css.png

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 frown

Thanks anyway

-- CarloSchulz - 30 May 2007

Closing after more than 30 days of inactivity...

-- PeterThoeny - 06 Jul 2007

 
Change status to:
Topic attachments
I Attachment Action Size Date Who Comment
PNGpng DokuWiki_IndendedTextAndHeadlines.png manage 6.9 K 2007-03-27 - 11:01 CarloSchulz  
PNGpng dokuWiki_Css.png manage 26.4 K 2007-05-08 - 09:13 CarloSchulz screenshot of dokuwiki with cssviewer
Topic revision: r6 - 2007-07-06 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.