project posts

Project: Website theme switcher

I finally made a theme switcher for my website. Ever since I saw the CSS Zen Garden, I loved the idea of using the same markup with completely different appearances. This led to a desire to have multiple themes and an ability to switch them on my own site. Early on I didn’t have the ability, and later I didn’t, have the energy or time, or decide on the way I wanted to do it. There are performance and complexity considerations, as well as needing to make decent themes other than the default one. My eventual desire to have a static-friendly site complicated the performance aspect as well.

Some browsers have a built in way to change to alternate stylesheets, but they stupidly download all of them even when they’re not being used. I’m not doing that. So JS or a server-side cookie solution are needed, and the latter won’t work for static sites. I try to minimize the JS on my site and didn’t want something heavy or complex, especially if it were loading before page render.

Recently, I had the energy and decided on a simple, lightweight JS way to do it. I decided to start it even without real alternative themes.

Continue reading post "Project: Website theme switcher"

Ghosts.js

A few years back, to make my site more festive for Hallowe’en, I made a script to have ghosts move around my web-page. I based it on my snow script for winter / Christmas, using the basic structure, reducing the number of moving objects, and changing their movement to look better for ghosts. I meant to post about it. This year I decided to break it out into its own Github repo, which led to me refining it and cleaning it up somewhat. See the ghosts.js repo and the ghosts.js demo.

Continue reading post "Ghosts.js"

</toby>