Three days ago, I talked about a simple, public calendar to update on my goal progress. Here is the current version of the calendar. Now, the progress may not look like much, but I’ve simplified it much much more coding-wise and made it more extensible.
Basically what was changed is that instead of manually creating a calendar for each one, it now dynamically creates a calendar based off of a JSON (data) file. You can actually view the file online that I am using. So here is the flow:
- Fetch the file from that url
- Go down the list of each goal
- For each goal, go to the “status” data
- The “status” contains all the months that I’ve been tracking. Right now there is only May, but it can be added to
- For each month, go through all the days. If a day is marked with anything besides “0”, then I completed it that day.
- Create the UI elements for those days
- Add it to the webpage.
Suppperr simple, but I love it. Why? Well, I actually won’t have to get into the code if I want to update a day. I can just edit the Gist, hit save, and then it will update the calendar!
Next up, multiple months!