[dokuwiki] Update to default template

  • From: Martin Gill <martin@xxxxxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Mon, 11 Aug 2008 21:23:05 +0100

Hi,

While writing a template I made some updates to the default style.ini that I believe might be worth adding to the default template.

Not sure how to submit my changes so that they are reviewed/discussed/accepted for the main code line, so I'm posting them here.

The changes add support to allow users to easily configure the colours used for the GESHI code highlighting. Other colours should probably be chosen, as these are my preferences and intended for a dark background. The GESHI plugin seems to use the default colours, as I was unable to find anywhere to configure it.

Regards,

Martin

--Implementation Details--------------------

Add a new file "code_highlight.css" to the template's directory (contents at end of email)

I used a seperate file as this allows it to be easily excluded if GESHI isn't used (just commenting out the include). It also means those wanting simple changes can just modify the style.ini, but those wanting more detailed changes can easily find and modify the stylesheet as part of the template, without having to dig into GESHI.

Add to the style.ini as follows:

[stylesheets]
code_highlight.css = screen

[replacements]
; Syntax Highlighting for GESHI
__syntax_br0__ = "Yellow"
__syntax_co1__ = "LightSlateGray"
__syntax_co2__ = "LightSlateGray"
__syntax_coMULTI__ = "LightSlateGray"
__syntax_es0__ = "LightSlateGray"
__syntax_kw1__ = "Lime"
__syntax_kw2__ = "GreenYellow"
__syntax_kw3__ = "LawnGreen"
__syntax_kw4__ = "LimeGreen"
__syntax_kw5__ = "MediumSpringGreen"
__syntax_me0__ = "Yellow"
__syntax_nu0__ = "Orange"
__syntax_re0__ = "Cyan"
__syntax_re1__ = "Cyan"
__syntax_re2__ = "Cyan"
__syntax_re4__ = "Blue"
__syntax_sc0__ = "BlueViolet"
__syntax_sc1__ = "DarkOrchid"
__syntax_sc2__ = "DarkMagenta"
__syntax_st0__ = "Red"


------ New code_highlight.css ------
/*
* Style sheet for code highlighting.
* This supplements the defaul style's provided by geshi
* and allows for the colours to be modified more easily.
*
* @author Martin Gill <martin@xxxxxxxxxxxxxxxxx>
*/

/* syntax highlighting code */
.code .br0  { color: __syntax_br0__; }
.code .co1  { color: __syntax_co1__; font-style: italic; }
.code .co2  { color: __syntax_co2__; font-style: italic; }
.code .coMULTI  { color: __syntax_coMULTI__; font-style: italic; }
.code .es0  { color: __syntax_es0__; font-weight: bold; }
.code .kw1  { color: __syntax_kw1__; }
.code .kw2  { color: __syntax_kw2__; font-weight: bold; }
.code .kw3  { color: __syntax_kw3__; }
.code .kw4  { color: __syntax_kw4__; }
.code .kw5  { color: __syntax_kw5__; }
.code .me0  { color: __syntax_me0__; }
.code .nu0  { color: __syntax_nu0__; }
.code .re0  { color: __syntax_re0__; }
.code .re1  { color: __syntax_re1__; }
.code .re2  { color: __syntax_re2__; }
.code .re4  { color: __syntax_re4__; }
.code .sc0  { color: __syntax_sc0__; }
.code .sc1  { color: __syntax_sc1__; }
.code .sc2  { color: __syntax_sc2__; }
.code .st0  { color: __syntax_st0__; }



--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts:

  • » [dokuwiki] Update to default template