Diary Data (2026-03-03_sinobuz.txt)

Hey. iDestyKK here. Let's talk about website theming and SINOBUZ.

What is SINOBUZ?

SINOBUZ is a theming style inspired by beatmania IIDX 24: SINOBUZ. That game had a unique theme where the interface of the game changed depending on the day of the week that you played. In Japanese, each day is associated with an element and kanji character. As such, I wanted my site to minorly change its theme depending on the date that the server was reporting at UTC time. This is SINOBUZ.

Here is the asset sheet for CN_Web, the site you are currently viewing:



You will notice that there are like 7 different types of backgrounds and string options toward the centre and right sides of the sheet. Those correspond to the days of the week. I didn't want to change the background colour or make any massive changes to the site layout every single day of the week because I liked the pink look of the default site. However, I did want the element shown, as well as the day shown somewhere on the home page.

How do I implement this in PHP?

Simple. I implement a function called get_day_of_week_short, and call it in several places with string concatenation to force specific stylesheets and images to load. The function is extremely simple:

PHP Code
function day_of_week_short() {
	$num = date("w");

	switch ($num) {
		case 0: return "sun";
		case 1: return "mon";
		case 2: return "tue";
		case 3: return "wed";
		case 4: return "thu";
		case 5: return "fri";
		case 6: return "sat";
	}
}

This gets the date and then returns a small string. Like, today is Tuesday. So it will return "tue". Then I have a stylesheet loaded at the top of the HTML file like this:

HTML/PHP Code
<link rel  = "stylesheet"
      type = "text/css"
      href = "./data/css/main-<?php echo day_of_week_short(); ?>.css">

The date is determined at the server level. This means it is timezone-agnostic and is based on UTC time. So the day may not always align with your current day. If you live in Japan, for instance, it will be 9 hours off.

This is not the first time I have done something like this...

On 2017/10/15, almost 9 years ago, I unveiled that I did the same thing to my ZSH config, which you can see here:



You can get this theme specifically in my CN_Experience repo on GitHub.

Conclusion

I feel like I could do much more with this mechanic. I could get really creative and make a stunning website that completely changes the theme every single day. I also thought of taking the "secret" string and further adjusting the theme. You can combine multiple CSS themes together and the combinations are nearly limitless. Maybe I'll do something like that in the future. But for now, this is where I'll leave it. Minor changes to the site every single day. I think that's good enough.