Migrated badges to BS5.

This commit is contained in:
Jan Böhmer 2022-07-24 22:39:32 +02:00
parent 6885aefbe7
commit 270d622265
9 changed files with 36 additions and 36 deletions

View file

@ -25,7 +25,7 @@
{% endif %}
{% endmacro %}
{% macro string_to_tags(string, class="badge badge-info") %}
{% macro string_to_tags(string, class="badge bg-info") %}
{% for tag in string|split(',') %}
<a href="{{ url('part_list_tags', {'tag': tag | trim}) }}" class="{{ class }}" >{{ tag | trim }}</a>
{% endfor %}
@ -33,16 +33,16 @@
{% macro m_status_to_badge(status, class="badge") %}
{% if status is not empty %}
{% set color = " badge-secondary" %}
{% set color = " bg-secondary" %}
{% if status == "active" %}
{% set color = " badge-success" %}
{% set color = " bg-success" %}
{% elseif status == "nrfnd" %}
{% set color = " badge-warning" %}
{% set color = " bg-warning" %}
{% elseif status == "eol" %}
{% set color = " badge-warning" %}
{% set color = " bg-warning" %}
{% elseif status == "discontinued" %}
{% set color = " badge-danger" %}
{% set color = " bg-danger" %}
{% endif %}
<span class="{{ class ~ color}}" title="{{ ("m_status." ~ status ~ ".help") | trans }}">