Themes
Configuring existing themes
Themes are configured in frontend/config/themes.json
The various images are stored on the CDN in the ui/theme directory
Adding new themes
Requires a couple extra steps:
- ThemeId in Rust: in the shared crate
- The as_str_id definition in the Rust themes.rs
Usage in code
The JSON is checked via Serde on the Rust side at crates/utils/src/themes.rs
It is also loosely checked on the element side via Typescript definitions at elements/src/_themes/themes.ts
These respectively do a bit more processing too (the element sets CSS vars and Rust sets up helpers to access data)
Note that modules are free to use the above settings however they wish, e.g. to use a specific theme mapping based on runtime conditions