Templating a WordPress theme with Twig

Well, that wasn’t as painful as I thought it would be. Some googling and a couple of experiments went a long way, and now I have a partial, unstyled, Twig-based theme happily running on WordPress.

Twig is a templating engine for php. It has more than enough features to get me going, setting it up is as easy as falling off a tree, and I haven’t used it much, which makes it a good candidate for me. Continue reading “Templating a WordPress theme with Twig”

The blog refactoring of 2013

While I was writing the last few posts, the messiness of the blog’s code base started grating. A while back I’d rebuilt the template from scratch so I wouldn’t have pieces of page all over – I hate having elements opening in one file and closing in another – but even so, the structure of the scripts and styles isn’t all that great. Today I started reorganizing stuff so I can bring it up to shape with shiny new toys. And this time, I’ll try to do it in a more organized way; writing about it helps, as I have to get my thoughts in order to do that – and I can’t write text and code at the same time. The pauses will be handy.

Continue reading “The blog refactoring of 2013”

Canvas Animation using interpolation

While drawing things on the canvas and scooting around them is nice, it gets old very fast. Instantaneously, if you’re an end user (unless you’re on a page for looking at things, in which case, no foul). On the other hand, there are far more efficient ways of rendering porn and/or amusing pictures of cats, so I’m going to go ahead and assume that we want to liven things up with some animation.

Continue reading “Canvas Animation using interpolation”