Show datetime in flash notices in white, if background is dark.

This highly increases readability of the datetime for most flashes.
This commit is contained in:
Jan Böhmer 2022-07-23 21:47:30 +02:00
parent 2ac45fd869
commit 5e366bec32

View file

@ -17,13 +17,13 @@
{# <img src="..." class="rounded mr-2" alt="...">#}
<i class="fas fa-fw {{ flash_symbol }} mr-2"></i>
<strong class="mr-auto">{{ flash_title|trans }}</strong>
<small class="text-muted">{{ "now" | format_datetime("short", "short") }}</small>
<small class="{% if "text-white" in flash_bg %}text-white{% else %}text-muted{% endif %}">{{ "now" | format_datetime("short", "short") }}</small>
<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="toast-body {{ flash_bg }}">
{{ message | trans}}
{{ message | trans }}
</div>
</div>
{% endfor %}