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 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.

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 History Action Size Date Who Comment
PNGpng DokuWiki_IndendedTextAndHeadlines.png r1 manage 6.9 K 2007-03-27 - 11:01 UnknownUser  
PNGpng dokuWiki_Css.png r1 manage 26.4 K 2007-05-08 - 09:13 UnknownUser screenshot of dokuwiki with cssviewer
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2007-07-06 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.