Extend theming from 3 CSS variables (primary colors only) to 14 configurable properties covering colors, fonts, borders, and shape. All values are optional with sensible defaults. - New _theme.html include replaces duplicated inline injection - Wire theme include into all 7 templates (base, login, dashboard, catalog, admin_tables, activity_center, corporate_memory) - Conditional font loading: skip default Inter when custom font_url set - Config.theme_overrides() classmethod generates CSS variable dict - Visual theme-reference.html guide for instance configurators - Document all theme keys in instance.yaml.example
16 lines
512 B
HTML
16 lines
512 B
HTML
{# Theme override injection - include in ALL page <head> sections #}
|
|
{% if config.THEME_FONT_URL %}
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="{{ config.THEME_FONT_URL }}" rel="stylesheet">
|
|
{% endif %}
|
|
{% set overrides = config.theme_overrides() %}
|
|
{% if overrides %}
|
|
<style>
|
|
:root {
|
|
{% for var, val in overrides.items() %}
|
|
{{ var }}: {{ val }};
|
|
{% endfor %}
|
|
}
|
|
</style>
|
|
{% endif %}
|