Ignore the .twig
extensions, that's just for the code highlighting. These files are just html + BC-flavoured Liquid Markup.
This code is currently built to switch themes based on time. Only minor changes would allow changing themes by other factors, such as which domain the page is being served from.
This snippet must go at the top of each Page Template. Although it must be repeated in each, it should be far less likely to change
than the information in theme-data.json
.
An example of configuration for two themes. There's no hard limit on how many themes can be present.
An example of a full template, using some dynamic theme settings.