Work has been keeping me diverted (“diverted”, not “busy” or “fulfilled” or suchlike) which means Project Acquis has taken a bit of a back seat.
But there was something else I wanted to do, with my rail patronage site.
The map version has been around for quite some time now. It gets a refresh in various ways every so often; last year I re-did all of the pin graphics, and I updated all the political information before starting the new contract (yes, two years after the actual election and all of the boundary changes).
But I’d always wanted to do a sortable, filterable table version, so that I could look at all of the stations in a particular area and get an overview. So I did this as well.
Adapting the php script to produce the HTML table? Easy. Well, it was once I realised why it was printing out $table 2,594 times instead of the content of the variable $table.
Incorporating DataTables, a free, locally-produced (Scotland) set of scripts to do the sorting and filtering? A doddle, though adding some of the whistles and bells and customising took slightly longer.
Doing the fixed menu bar at the top? Nightmare.
Having to relearn lots of css calls is not as much fun as I’m not making it sound. The worst part was trying to incorporate it into the map version – basically, I gave up and used display: hidden until I can work it out. I’m not using frames, but the menu needs to appear on the right-hand side (on a normal screen) and not cover up any of the information. And it isn’t working.
If this isn’t working, what chance have I got with this website, and it’s much, much longer css file?
For my test page I cheated slightly and copied over the original css file from this site. What I’d intended to do was start with a blank file, and bring things in as and when. Instead, I deleted stuff I knew I wouldn’t ever need in the Brave New World. So I still have a very messy css file to deal with.
But it’s still something I want to do. Things at WordPress are kicking off again…