mirror of
https://github.com/getgrav/grav.git
synced 2024-12-22 19:58:39 +00:00
15 lines
423 B
Twig
15 lines
423 B
Twig
{% set status_mapping = {'info':'green', 'error': 'red', 'warning': 'yellow'} %}
|
|
|
|
{% if grav.messages.all %}
|
|
<div id="messages">
|
|
{% for message in grav.messages.fetch %}
|
|
|
|
{% set scope = message.scope|e %}
|
|
{% set color = status_mapping[scope] %}
|
|
|
|
<div class="notices {{ scope }} {{ color }}"><p>{{ message.message|raw }}</p></div>
|
|
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|