mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 02:42:26 -05:00
Make spacing and position of banners consistent
Banners should always be the first thing on the page. Because headers already have padding we don’t want to put padding on the container. So banners should also have top padding to distance then from the red bar. They should also sit in the 3/4 column if the page has side navigation. This commit adds a new template (`withoutnav_template.html`) which extends `admin_template.html`. All views then extend one or the other, never the `admin_template.html` directly. This means that `admin_template.html` doesn’t have to make decisions about where the flash messages are displayed.
This commit is contained in:
12
app/templates/flash_messages.html
Normal file
12
app/templates/flash_messages.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{% from "components/banner.html" import banner %}
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
{% for category, message in messages %}
|
||||
{{ banner(
|
||||
message,
|
||||
'default' if category == 'default' else 'dangerous',
|
||||
delete_button="Yes, delete this template" if 'delete' == category else None
|
||||
)}}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
Reference in New Issue
Block a user