[Moin-user] Modifying MonthCalendar

Nir Soffer nirs at actcom.net.il
Tue Sep 13 05:42:00 EDT 2005

On 13 Sep, 2005, at 14:15, skip at pobox.com wrote:

>>> On the MonthCalendar, when your mouse passes over a day which has a
>>> page associated with it, you get a little pop up that displays any
>>> Heading 1 headings.  Is it possible to modify the MonthCalendar macro
>>> to display Heading 2 headings instead?
>     Nir> I wonder why you need this feature. Please describe how you 
> work
>     Nir> with this tool and why heading level 1 do not fit your use.
> I'll take a stab at it based on my observations of how headings are 
> used.
> Many times the settings for the browser or the CSS make level 1 
> headings
> simply way too large (this is a common problem in my experience and is
> certainly not Moin-specific), so people start their documents with 
> level 2.
> At work I also see people use lower-level headings to simply bold a 
> line of
> text.  I know neither is correct usage, but unfortunately that's life.

Maybe moin built in themes should come with smaller headings?

These are the current styles in modern (others use same or similar 

	h2, h3, h4, h5, h6
		margin: 1.5em 0 0 0;
		padding: 0;
		color: black;
		line-height: 1.2em;

	h2 {font-size: 1.6em;}
	h3 {font-size: 1.3em;}
	h4 {font-size: 1.1em;}
	h5, h6 {font-size: 1em;}

h1 is used for the page title, = this = map to <h2>this</h2>.

We can never make everyone happy. We need a design that will make 80% 
users happy, and make it easy for the other 20% to customize.

A user can use its own css file, overriding the headings:
	h2 {font-size: 1.3em;}
	h3 {font-size: 1.1em;}
	h4, h5, h6 {font-size: 1em;}

This can be applied using user css field in UserPreferences, or by the 
browser user css. For example in Safari, Preferences:Advanced:Style 
Sheet menu.

Wiki admin can clone the site theme and change the css. If you want to 
serve multiple themes, you will have more work of course. We can solve 
this by using a site css file, so the admin can override all themes 
using one site.css file, and the user override both themes and site.css 
with its own user.css file.

In many places moin does not care about which headings you start with. 
For example, if you create this page:


=== heading 1 ===

==== heading 2 ====

The toc will show:
  1. heading 1
    2. heading 2

MonthCalendar can parse pages in a similar way - show you the contents 
of the first headings used on the page, not hardcoded level 1 heading.

Best Regards,

Nir Soffer

More information about the Moin-user mailing list