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="...">#} {# <img src="..." class="rounded mr-2" alt="...">#}
<i class="fas fa-fw {{ flash_symbol }} mr-2"></i> <i class="fas fa-fw {{ flash_symbol }} mr-2"></i>
<strong class="mr-auto">{{ flash_title|trans }}</strong> <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"> <button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<div class="toast-body {{ flash_bg }}"> <div class="toast-body {{ flash_bg }}">
{{ message | trans}} {{ message | trans }}
</div> </div>
</div> </div>
{% endfor %} {% endfor %}