diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2021-02-26 11:30:18 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2021-02-26 12:03:32 -0800 |
commit | fc9edfb1b65260f41f204d11bf130ceb35cb84e0 (patch) | |
tree | 3620d3c2c5b40e4b6a9c5cac7bb63f7a284eedc5 /python/fatcat_web/templates | |
parent | 901e4f4c23398e19e2595c374f2fa45e4773e992 (diff) | |
download | fatcat-fc9edfb1b65260f41f204d11bf130ceb35cb84e0.tar.gz fatcat-fc9edfb1b65260f41f204d11bf130ceb35cb84e0.zip |
web: reduce flash() usage; have logins redirect
Diffstat (limited to 'python/fatcat_web/templates')
-rw-r--r-- | python/fatcat_web/templates/base.html | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/python/fatcat_web/templates/base.html b/python/fatcat_web/templates/base.html index 8cdc3fbf..73f33d0d 100644 --- a/python/fatcat_web/templates/base.html +++ b/python/fatcat_web/templates/base.html @@ -101,14 +101,17 @@ <main class="ui main container" style="margin-top: 6em; margin-bottom: 2em;" {% block main_extra_attr %}{% endblock %}> {% with messages = get_flashed_messages() %} {% if messages %} - <div class="ui message"> + <div class="ui info message" style="margin: 1em auto; max-width: 45em;"> {# Needs more javascript: <i class="close icon"></i> #} - <div class="header">Flash Message!</div> - <ul class="list"> - {% for message in messages %} - <li>{{ message|safe }} - {% endfor %} - </ul> + {% if messages|length == 1 %} + <div class="header">{{ messages[0]|safe }}</div> + {% else %} + <ul class="list"> + {% for message in messages %} + <li>{{ message|safe }} + {% endfor %} + </ul> + {% endif %} </div> {% endif %} {% endwith %} |