implement setting bootstrap colors

This commit is contained in:
Audrey Jensen 2023-08-09 20:49:19 +00:00
parent 688e7fba7a
commit ae1cb0e00c
2 changed files with 7 additions and 1 deletions

View File

@ -2,6 +2,7 @@ twig:
default_path: '%kernel.project_dir%/templates'
globals:
motd: '%env(MOTD)%'
motdLevel: '%env(MOTDLEVEL)%'
when@test:
twig:

View File

@ -40,7 +40,12 @@
</div>
{# Display MOTD, if one is set #}
{% if motd is defined and motd is not empty %}
<div class="alert alert-info alert-dismissible fade show" role="alert">
{% if motdLevel is defined and motdLevel is not empty %}
{% else %}
{% set motdLevel = "info" %}
{% endif %}
<div class="alert alert-{{ motdLevel }} alert-dismissible fade show" role="alert">
<div class="row justify-content-end">
<div class="col-12 justify-content-center">
<p class="text-center">{{ motd }}</p>