using font awesome icon to render color dot (#1656)

This commit is contained in:
Kevin Papst
2020-04-23 16:47:50 +02:00
committed by GitHub
parent 12c4205785
commit f8331b74c7
7 changed files with 16 additions and 17 deletions

View File

@@ -119,20 +119,20 @@
{% macro label_color_dot(type, isVisible, name, url, color) %}
<span class="label-{{ type }}{{ isVisible ? '' : ' label-invisible' }}">
<span class="dot"{% if color is not empty %} style="background-color:{{ color }}"{% endif %}></span>
<span class="name">
{% if url is not empty %}
<i class="dot {{ 'dot'|icon }} fa-fw"{% if color is not empty %} style="color:{{ color }}"{% endif %}></i>
{%- if url is not empty -%}
<a href="{{ url }}">{{ name }}</a>
{% else %}
{%- else -%}
{{ name }}
{% endif %}
{%- endif -%}
</span>
</span>
{% endmacro %}
{% macro color_dot(color, tooltip) %}
<span class="label-color" data-toggle="tooltip" data-placement="top" title="{{ tooltip }}">
<span class="dot" style="background-color:{{ color }}"></span>
<i class="dot {{ 'dot'|icon }} fa-fw"{% if color is not empty %} style="color:{{ color }}"{% endif %}></i>
</span>
{% endmacro %}
@@ -159,7 +159,7 @@
{% endmacro %}
{% macro badge(title, color) %}
<span class="badge" style="background-color:{{ color|default('#dd4b39') }}">{{ title|trans }}</span>
<span class="badge" style="background-color:{{ color }}">{{ title|trans }}</span>
{% endmacro %}
{% macro alert(type, description, title, icon) %}