messages.html.twig 423 B

1234567891011121314
  1. {% set status_mapping = {'info':'green', 'error': 'red', 'warning': 'yellow'} %}
  2. {% if grav.messages.all %}
  3. <div id="messages">
  4. {% for message in grav.messages.fetch %}
  5. {% set scope = message.scope|e %}
  6. {% set color = status_mapping[scope] %}
  7. <div class="notices {{ scope }} {{ color }}"><p>{{ message.message|raw }}</p></div>
  8. {% endfor %}
  9. </div>
  10. {% endif %}