[pmwiki-users] New skin: Pukka Float

Hans design at flutesong.net
Thu Mar 17 08:50:39 CST 2005


I could not get the Pukka Float working out of the zip,
got the same results than on pmwiki.org. The reason must lie
in how you try to highjack the css files as php files with the
.htaccess trick. Somehow this trick does not work here.

Now your intention was to "stitch" various css files together.
I played around trying to achieve this using a skin.php file
(contents below). I got the skin working with this file, by not using
the stitch-*.css files and not using the .htacess file.
The main restriction with this skin.php is a loss of discrimination of
a linked and an imported css file in the template. And that the
choosen css code gets put into the $HTMLStylesFmt variable, which
makes for  all the style code appearing in the html header. It would
have been nice to write it all to a new css file (or two: one for
linking, and one for @import), but I failed to find a way to get
permission to write this file.

Anyway it works. The question I am asking myself now is: Does it
speed page loading up if there are less css file modules to load, or
does it slow down because $HTMLStylesFmt needs to be constructed with
all the styles for each page. My experience with using a few
stylesheets to load (in Gemini) is that the browser starts caching the
css files and the page loading goes quick then.

Best, 
~Hans                           

Content of skin.php (one array with all the options, and some code to
read the choosen css files and put it into $HTMLStylesFmt):

<?php if (!defined('PmWiki')) exit();

$CssOption = array (
### Important stuff -- don't turn them off
        'layout-flowed-1.css',
        'font-proportions-1.css',

### Font sizes
        #'font-size-100.css',
        #'font-size-115.css',
        'font-size-76.css',
        #'font-size-85.css',

### Font face combinations
        #'font-face-georgia.css',
        'font-face-georgia_trebuchet.css',
        #'font-face-georgia_verdana.css',
        #'font-face-lucida.css',
        #'font-face-lucida_georgia.css',
        #'font-face-lucida_palatino.css',
        #'font-face-lucida_trebuchet.css',
        #'font-face-sans_serif.css',
        #'font-face-serif_sans.css',
        #'font-face-verdana.css',
        #'font-face-verdana_georgia.css',
        #'font-face-verdana_palatino.css',
        #'font-face-verdana_trebuchet.css',

### Other font options
        #'font-headers-bold_italic.css',
        'font-headers-normal_italic.css',

### Colour Schemes -- see note in readme
        'color-default-beige.css',
        #'color-default-grey.css',
        #'color-websafe.css',

### Optional Features
        #'feature-attr-off.css',
        #'feature-author-off.css',
        #'feature-feed-off.css',
        #'feature-navlink_underlines-off.css',
        #'feature-sidebar-off.css',
        'feature-table_borders-on.css',
        #'feature-upload-off.css',

### Important stuff -- don't turn it off
        'layout-undo_flowed.css',
        'layout-hide_access_links.css',
        'layout-navlists.css',

### Layout options
        #'layout-fixed56em-leftsb-14em.css',
        #'layout-fixed56em-rightsb-14em.css',
        #'layout-fixed72em-leftsb-24em.css',
        #'layout-fixed72em-rightsb-24em.css',
        'layout-liquid-leftsb-14em.css',
        #'layout-liquid-leftsb-27em.css',
        #'layout-liquid-rightsb-14em.css',
        #'layout-liquid-rightsb-27em.css',

### Last but not least
        'layout-decor-1.css',   
        
);

global $HTMLStylesFmt ;
foreach ($CssOption as $filename) {
        $cssfile = $SkinDirUrl.'/css/'.$filename; 
        $fp = fopen($cssfile, "r");
        $contents = fread($fp, 4096);
        fclose($fp);
        $HTMLStylesFmt[] = $contents;
        };

?>




More information about the pmwiki-users mailing list