Published

Update to colour JS on piperhaywood.com

Just pushed an update to the colour JS on piperhaywood.com. The HSL colour has been looking pretty muddy recently, partly since it’s an orange-y hue this time of year, but mostly because sunrise and sunset weren’t being taken in to account properly. Before, the lightness value changed gradually between 12:01am and midnight. Now it looks a little more “sunny” in the daytime. Will need to keep monitoring the min/max values, yellow could be problematic.

Published

Topographies

Topographies (perspex and cut paper)

Topographies is a series of cut-paper compositions. Each layer is sandwiched between 540 × 540mm sheets of 10mm perspex. The photo above is from the 2011 postgraduate degree show at Byam Shaw School of Art (Central Saint Martins, London).

I love them, but they are very heavy and unwieldy. There are a few remaining, get in touch if interested.

Published

WordPress function for images with ‘srcset’ attribute

Wrote a function returning an image element with srcset and sizes attributes. See this Gist for the function and this Gist for an example of the function in use (would need to be within the WP loop).

Wanted to give a front-end dev like Sam the ability to define the important bits, including the default image size for the src attribute, the media queries for the sizes attribute, and classes for the img element if necessary.

Edit 23 Jan 2019
This isn’t necessary anymore, responsive images have been part of WP core since v4.4. They’re implemented on wp_content automatically via a filter. Use their related functions if you need to do something custom. Responsive images are behaving a little erratically on my site though, so will have to take a look at why that might be happening.