{%- with messages = get_flashed_messages(with_categories=true) -%}
 {%- if messages %}
  {%- for category, message in messages %}
   {%- if category == "error" %}
    <div class="ui icon error message">
     <i class="warning icon"></i>
     <div class="content">
      <div class="header">
       An error occured!
      </div>
   {%- else %}
    <div class="ui icon info message">
     <i class="info icon"></i>
     <div class="content">
      <div class="header">
       Notice
      </div>
   {%- endif %}
     {{ message }}
     </div>
    </div>
  {%- endfor %}
 {%- endif %}
{%- endwith %}