mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-08 14:29:42 +00:00
Create template for environment banner
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
{% if chill_main_config.top_banner is defined and chill_main_config.top_banner.text is defined %}
|
||||
{% set banner_text = '' %}
|
||||
{% set current_locale = app.request.locale %}
|
||||
|
||||
{% if chill_main_config.top_banner.text[current_locale] is defined %}
|
||||
{% set banner_text = chill_main_config.top_banner.text[nl] %}
|
||||
{% else %}
|
||||
{% set banner_text = chill_main_config.top_banner.text|first %}
|
||||
{% endif %}
|
||||
|
||||
{% if banner_text %}
|
||||
<div class="top-banner w-100 text-center py-2"
|
||||
style="{% if chill_main_config.top_banner.color is defined %}color: {{ chill_main_config.top_banner.color }};{% endif %}{% if chill_main_config.top_banner.background_color is defined %}background-color: {{ chill_main_config.top_banner.background_color }};{% endif %}">
|
||||
{{ banner_text }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
@@ -26,6 +26,10 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% if chill_main_config.top_banner is defined and chill_main_config.top_banner.visible is true %}
|
||||
{{ include('@ChillMain/Layout/_top_banner.html.twig') }}
|
||||
{% endif %}
|
||||
|
||||
{% if responsive_debug is defined and responsive_debug == 1 %}
|
||||
{{ include('@ChillMain/Layout/_debug.html.twig') }}
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user