Changelog


A fun and fresh way to display changes I’ve been making on my blog.

2 days ago

One more sort update and a new badge.
New Feature

Two changes for tonight. I fixed the sort when displaying the articles written. This took a bit longer due to the way the code has to search for the author.

The other change is to display a badge for races that need times—assuming you are logged in and have created races. I’d forgotten to update a race earlier this week, so it seemed fitting to have a reminder. Plus, I already had the code open from yesterday’s change.

As a side note, all these changes are just screaming at me to optimize the code. If the task wasn’t so large, and the fun I’m having adding features, I would have already made progress.


3 days ago

Changes to changes.
New Feature

Okay, I’m on a roll today. I wanted a way to highlight when changes were made, so I reused the badge code for IM’s to display changes within the last 7 days. Given that I don’t track if you view a change, the hard cutoff was easiest. I might increase the number later if I find the changes are rolling off too quickly.


3 days ago

Published date is king!
Announcement

Finished updating the site to use published date instead of the article ID as the sort. The top news and previous next buttons are working. I’m sure I need to fix some other items, but the major stuff is working.

To my surprise, I didn’t need to edit the RSS creator as it already uses published date. Win!

As a bonus, I was able to add a previous button to the main news page. In fact, it was a pretty easy fix. I just had to add one to the max news variable, saving an extra article. When I print the news, I check if that extra article exists and, if it does, displays it as a button instead.


4 days ago

Changes to published dates
Announcement

As I work to merge my old ZX81 site articles into the main site, I’m redoing how articles are sorted. Instead of relying on the article ID, I’m now sorting by published date. For now, I have moved one article while I work through each of the routines that need to be updated.

Right now, Topics and Tag Cloud are working as expected. I’m working to fix printnews—right now it is displaying the article from 2011. I expect to have it and a few other routines finished this week.


Feb 18

Showing active filter buttons.
New Feature

For some reason, when I added the filter buttons on Race Tracking and ZX81 Programs, I didn’t denote which was active. I rectified that today. I had to modify the w3schools code a bit as it wasn’t working right. My version is both targeted to just the filter buttons, and will remove all active tags applied to those buttons. Here is code:

// Add active class to the current button (highlight it)
var btnContainer = document.getElementById("runbuttons");
var btns = btnContainer.getElementsByClassName("btn");
for (var i = 0; i < btns.length; i++) {
  btns[i].addEventListener("click", function(){
  var btnContainer = document.getElementById("runbuttons");
  var current = btnContainer.getElementsByClassName("active");
  for (var i = 0; i < current.length; i++) {
  current[i].className = current[i].className.replace(" active", "");
  }
  this.className += " active";
  });
}

I’m debating switching from buttons to a select, but this will do until I make up my mind.