1
0
Fork 0

app/main.py: flash a message after deleting a word (use bootstrap alerts -- make the alert dismissable).

Lanhui-flash-messages
Hui Lan 2021-08-02 19:21:41 +08:00
parent 3d5130d68d
commit c3dcc62879
1 changed files with 4 additions and 1 deletions

View File

@ -196,9 +196,12 @@ def get_flashed_messages_if_any():
messages = get_flashed_messages() messages = get_flashed_messages()
s = '' s = ''
for message in messages: for message in messages:
s += '<div class="alert alert-warning" role="alert">' s += '<div class="alert alert-warning alert-dismissible fade show" role="alert">'
s += '<h4 class="alert-heading">Congratulations</h4>' s += '<h4 class="alert-heading">Congratulations</h4>'
s += f'{message}' s += f'{message}'
s += '<button type="button" class="close" data-dismiss="alert" aria-label="Close">'
s += ' <span aria-hidden="true">&times;</span>'
s += '</button>'
s += '</div>' s += '</div>'
return s return s