One way to apply themes to your site / app
There are several ways to manage themes. I searched for a way to control both HTML and svg images. This example is mainly built on CSS with some help from HTML and Javascript. The site is built upon a small engine of Go and Go templates which also replaces Apache and/or Nginx.
This solution is based on four main technologies.
- CSS Variables to make it more DRY
- Symbol SVG icons to be able to change svg colors
- localStorage to hold the theme variable
- hsl() colors makes it easer to change color within a theme