Craig Rowe

Techlead / Developer

12th April 2009

The Old Switcharoo

Having had only non-designer girls appreciate my design for cargowire I managed to cajole co-Headscapist Ed Merritt into creating an alternative.

Ed provided me with a flat image source to work from (so I can be blamed for the ragged CSS implementation which will no doubt be fixed up over time) and I decided, instead of throwing away my design, to implement a style chooser (based on the classic 'alternate stylesheet' ALA article).

This is all relatively simple stuff. The main issue I had was that I was running sIFR which would already have run before a user switches styles. This essentially throws away my ability to switch styles without a page refresh (whereby my JS can check for the style in use before running sIFR).

Additionally Eds design contained some slightly different content to my own, and this meant some markup changes, which I was kind of against. However I would rather add markup and modify my css for the original design to hide it, than add in content using jQuery for an alternate design. If anything semantically speaking the changes added to the content anyway but it did highlight how coupled designs and content can be regardless of an abstracted presentation layer.

A Javascript switcher is available at the base of the page if you wish to check out the results.

I'm off to investigate a nice way to turn sIFR off dynamically...


Other Recent Posts

The Barn site is live!(3rd April 2012)

For the last few weeks I've been pulling together the concept of 'The Barn'. Ostensibly it's a company blog, but to me it's a bit nicer than that. …

Barcamp Bournemouth 4(7th March 2012)

Having made the trip twice before I was looking forward to Barcamp Bournemouth. It's probably my favourite small event. Partly because it's so close, partly because it's a great venue but mainly because there's always something interesting and new (at least new to me) going on.…

WP7 vs iPhone(16th February 2012)

Ok so if you follow me on twitter you may know that towards the end of last year I took part in 'Alphalabs'. Organised by onedotzero this was a competition aimed at encouraging developers and artists to work together on the Lumia 800 platform.…

Cargowire has a new design(5th February 2012)

Apparently doodling can be good for you. Although when I do it, it's not so good for Ed Merritt.…

Why you should try to be a middle class developer(16th August 2011)

You may not know this but this blog has been xml based since its inception (in fact there's a longstanding, not yet achieved, task to 'replace' it with a 'better' persistant storage mechanism -- clearly I must agree then, that the perfect is the enemy of the good). But anyway... don't worry. I'm not about to do anotherblogaboutxml.