New thoughts on managing my posts
11 September 2025
Heya! I'm simply making a short update post and noting down some of the things I'm mulling over regarding long-term managing of this site. These can sometimes come to me on a whim and if I don't note them down I might forget.
So, regarding new updates, there's really only one so far: Have you read some of my recent media posts? If you have, you may have noticed me implementing a new spoiler button! It looks like this, try it!
Here's a spoiler, woohoo! Hello! Quick, hide me!
It's probably a bit messy, code-wise, but it's working perfectly for my purposes and it's the easiest way I could think of to make it. The way it works is basically: I have two distinct classes. I assign one of them to the elements I want to hide, and give it a style "visibility: hidden". This ensures that the elements will not be visible at all (although they will not disappear altogether; the space they occupy will still be there). To the other class, I will give a style "visibility: visible", but I will not add this class manually to anything (it would be unnecessary work; visible is the default for every element). The spoiler button is, of course, an input with the type "button", and its value is "CLICK TO SEE SPOILERS". On click, it calls the following Javascript function:
- IF the button's value is "CLICK TO SEE SPOILERS", THEN:
- Change the elements with the hidden class to the visible class
- Change the button's value to "CLICK TO HIDE SPOILERS"
- OTHERWISE, THEN:
- Change the elements with the visible class to the hidden class
- Change the button's value to "CLICK TO SEE SPOILERS"
As you can see, this way every time the button is clicked, the function will first evaluate the button's value as its cue, and then act accordingly, changing the class of every single hidden element in the page. Note that with this method, it is only the elements that are given the hidden class in the first place getting toggled on and off. Using this method, I have hidden paragraphs "p" and fragments of paragraphs "span", but it would work with any other element, such as spoilery images, for example.
Now, onto my current conundrums. I'm still not sure how I'm gonna manage the code for all of this, but I'm sure with Javascript I can figure it out if I try.
I've been filling the site with posts lately, which got me thinking of how I could manage the blog pages long-term, and the site as a whole, once it's just brimming with posts (possibly not too far from now, haha, especially the media blog). It's confusing and not too comfortable to have visitors just endlessly scroll down the summary cards with no cue whatsoever where they are. This can be especially annoying on mobile, because the menu is not fixed on there. Right now it's not a problem, but when the media blog has like 100 links to posts, it will be. SO, I want to use Javascript to automatically generate "pages" (that is, to generate buttons that will each show only 10 of the title cards, for example), and which will only appear when the number of cards is larger than 10. I'll have to fudge around with this, but I have already figured out how to loop through all the cards (I did it for the automated placeholder images). I'll need to figure out how to automatically sort them in groups and assign those groups to automatically generated links. Every time the user clicks a link, there would need to be a function that deletes everything and sorts the cards again according to the chosen group. Mmmmm...
I have also been thinking about the affiliate links... I really like having them at the foot of all the pages, because that makes them the most easily accessible from everywhere, and won't be too bothersome. But... I hadn't thought about what I'd do to add more, other than copy-pasting the links on EVERY single page again (and with this being a blog where every post is a new html page, you can imagine how IMPOSSIBLE that would get when I've reached like 100 posts). I should instead make a Javascript function containing an array of affiliates, and have it paste that code on the page's foot every time the page loads. That way I would just need to add the new affiliate to that Javascript function, and boom, automatically shows in every single page. Will note that down.
One never really runs out of things to do! Fun!