0.3, the Themes update

Oh, wow, what a week ! I have done two things that I thought it would take a lot longer: making Cyca available on Docker, and overhauling the frontend with themes. So, this is it: themes are available in Cyca since today, and the 0.3.0 release !

It was still a lot of work, and it’s the largest code update to date, and upgrading to a new version number is a proof of that.

Up until now, Cyca wasn’t suited for themes, and I don’t like to mix themes in the same stylesheet. It doesn’t scale, it’s not convenient to contribute to, hard to follow, etc.

Cyca uses Tailwind as its CSS framework, and Laravel Mix to compile assets. While both work great together, I couldn’t find a way to handle themes that suits me, so I buckled up and made it my way.

The thing is, Tailwind can be themed, but it wouldn’t produce one stylesheet per theme, so you would end up loading a large stylesheet with all the themes, instead of loading a small stylesheet. That’s bad for optimisation, of course.

And, from Laravel Mix point of view, you cannot process the same Tailwind’s configuration multiple times with different settings. So the only way to go is to have multiple Tailwind’s configuration files.

And this is how you make a theme for Cyca: by creating a Tailwind’s configuration file. It’s easier than it looks because it features good defaults, so Cyca’s themes don’t need to modify much of the basic framework’s settings.

You can change the colour scheme, fonts, and even icons, to make Cyca looks the way you want. You don’t even have to write a single line of CSS if you just want to make changes in the colour scheme, or even add a font.

And as a proof of how easy it is to create a theme, I’m glad to announce I’ve added a light theme to Cyca.

It’s really just a variation of colours, and I’ve been working for so long with a dark environment that I’m not sure about current light themes standards. But the thing is, now I can do it, and that’s all that matters. This theme, and the original – default – dark theme can be modified, transformed, altered the way you want. And you also could submit a pull request, in case you want others to benefits from your changes !