-
Notifications
You must be signed in to change notification settings - Fork 82
Flavors
Flavors are sub-sections (themes) of our website.
Examples would are "pocketcode "luna", or "pocketgalaxy. The default one if none is specified is "pocketcode"
All routes in our project are prefixed with a theme.
To allow a route like share.catrob.at/newThemeName, the new theme must be added to the themes array in config/packages/liip_theme.yaml first.
Per default, if a flavored URL is accessed, a theme with the same name is loaded. In combination with twig, the actual theme can be checked
{% if theme() == 'luna' %}
This allows us to easily add theme specific content.
For every theme, there must exist a settings file under the followingPath
assets/css/themes/<theme_name>/_theme_settings.scss.
In this file one can overwrite variables for colors, sizes, etc.)
Since CSS files are generated by a grunt job we have to add the theme to the themes array in our Gruntfile.js
Flavors are stored as strings for simplicity. Keep in mind that select-boxes in SonataAdmin need to be changed separately. (if those fields are not text-fields)
Check out /share.catrob.at/pocketcode/
- Docker - Linux/Mac/Windows
- Ubuntu - VM/Native
- Installing Elasticsearch
- Server Setup
- Using Webpack (material components)