{# Copyright (C) 2020-2026 Graz University of Technology. invenio-override is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. Styled flash messages in invenio-override's own namespace. Importing from this path (rather than overriding "invenio_theme/macros/messages.html") guarantees the styled macro is used even on blueprint-rendered pages for example the Flask-Security login page where the invenio_theme override may resolve to the default macro instead. #} {%- macro flashed_messages(center_text=false) -%} {%- for category, msg in get_flashed_messages(with_categories=True) %} {%- set category = 'info' if category not in ['info', 'error', 'warning', 'success'] else category %}
{%- if category == 'success' %} {%- elif category == 'warning' %} {%- elif category == 'error' %} {%- else %} {%- endif %} {{ msg }}
{%- endfor %} {%- endmacro %}