[pmwiki-users] New Skin -- Colorimetry
DaveG
pmwiki at solidgone.com
Mon Oct 19 12:51:04 CDT 2009
Stphane Heckel wrote:
> "DaveG" wrote :
>
>> http://www.pmwiki.org/wiki/Cookbook/Colorimetry
>
> Colorimetry in action : http://wiki.noteit.free.fr/
>
> One question : I combine the toggle cookbook with some predefined 'gif'
> picture (it is static)
> Just wondering how I could associate different 'gif' depending on
> Colorimetry's colors ?
1] Create a directory in pub/ called myicons/
2] create sub-directories named after the colors. So you now have:
/pub/myicons/green/
/pub/myicons/orange/
...
3] Put the icons in the appropriate color directory.
4] Create a css file myicons.css containing a css class, with a link to
the image -- note the url does not need to contain a path since you put
the css file in the same directory as the images. You probably want a
few more styling attributes as well:
.myicon { background-image: url(myicon.gif); }
5] place a copy of the same css file (no changes needed) into each color
directory.
6] in config.php load the css file based on color:
$HTMLHeaderFmt['myicons'] = "<link rel='stylesheet' type='text/css'
href='$PubDirUrl/myicons/" .(empty($SkinColor) ?'green' :$SkinColor)
."/myicons.css' media='screen' />\n";
7] Use the class 'myicons' on whatever element you want to apply the
image styling to.
~ ~ David
More information about the pmwiki-users
mailing list