[Pmwiki-users] Re: organization of .css files in pub/

Christian Ridderström chr
Mon Feb 16 04:54:51 CST 2004


On Sun, 15 Feb 2004, Patrick R. Michaud wrote:

> Background
> ----------
> With the default layout, PmWiki tries to include the following CSS files:
>     pub/css/stdlayout.css        - basic/core styles
>     pub/css/$PageSkin.css        - styles for current skin
>     pub/css/local.css            - site-local styles
>     pub/css/$Group.css           - group-specific styles for pages in $Group
>     pub/css/$Group.$Title_.css   - page-specific styles for $Group.$Title_

> All of this is great *except* if you happen to be on an OS (such as
> Windows) that uses case-insensitive filenames.

<selfish>
	Tell them to change OS ;-)
</selfish>

> So, these need to be separated somehow.  Note that separating based on 
> whether a file comes from the distribution (e.g., a pub/localcss/ directory)
> doesn't really solve the problem, as a locally-defined skin name could still
> conflict with a locally-defined group of the same name.

First the current situation

	pmwiki
	|-- local
	|   `-- skins
	|       `-- $PageSkin.php
	`-- pub
	    `-- css
	        |-- pmwiki.css
	        |-- print.css
	        |-- stdlayout.css
	        |-- $PageSkin.css
	        |-- local.css
	        |-- $Group.css
	        `-- $Group.$Title_.css

And your suggestion:

	pmwiki
	|-- local
	|   `-- skins
	|       `-- $PageSkin.php
	`-- pub
	    `-- css
	        |-- skins
	        |   |-- pmwiki.css
	        |   |-- $PageSkin.css
	        |   `-- print.css
	        |-- stdlayout.css
	        |-- local.css
	        |-- $Group.css
	        `-- $Group.$Title_.css


Here's a structured suggestion with a deeper directory structure.

	pmwiki
	|-- local
	|   |-- ...
	|   `-- skins
	|	`-- $PageSkin.php
	`-- pub
	    `-- css
	        |-- pmwiki		# Files from distribution
	        |   |-- pmwiki.css	# which may be overwritten
	        |   |-- local.css	# when the user updates his
	        |   |-- print.css	# pmwiki-installation
	        |   `-- stdlayout.css
	        |-- wiki.d		# Group/page-specific files
	        |   |-- $Group.css
	        |   `-- $Group.$Title_.css
	        |-- skins		# User skin
	            |-- $PageSkin.css	
	            `-- $PageSkin.gif

A variation on this is to keep separate directories for each skin.


Finally, a completely different solution where everything is kept in one 
directory, but the name convention is changed (only in Windows?):

	pmwiki
	|-- local
	|   `-- skins
	|       `-- $PageSkin.php
	`-- pub
	    `-- css
	        |-- _stdlayout.css
	        |-- _local.css
	        |-- _$PageSkin.css
		|-- _pmwiki.css
		|-- _print.css
	        |-- $Group.$Title_.css
	        `-- $Group.css

/Christian

-- 
Christian Ridderstr?m                           http://www.md.kth.se/~chr






More information about the pmwiki-users mailing list