|
10 | 10 | {% endmacro %}
|
11 | 11 |
|
12 | 12 |
|
13 |
| -{% macro render_icon(name, size=config.BOOTSTRAP_ICON_SIZE, color=config.BOOTSTRAP_ICON_COLOR, title=None, desc=None) %} |
14 |
| -{% set bootstrap_colors = ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark', 'muted'] %} |
15 |
| -<svg class="bi{% if not color %}"{% elif color in bootstrap_colors %} text-{{ color }}"{% else %}" style="color: {{ color }}"{% endif %} |
16 |
| - width="{{ size }}" height="{{ size }}" fill="currentColor"> |
17 |
| - {% if title is not none %}<title>{{ title }}</title>{% endif %} |
18 |
| - {% if desc is not none %}<desc>{{ desc }}</desc>{% endif %} |
19 |
| - <use xlink:href="{{ url_for('bootstrap.static', filename='icons/bootstrap-icons.svg') }}#{{ name }}"/> |
20 |
| -</svg> |
21 |
| -{% endmacro %} |
| 13 | +{% macro render_icon(name, size=config.BOOTSTRAP_ICON_SIZE, color=config.BOOTSTRAP_ICON_COLOR, title=None, desc=None, classes=None) %} |
| 14 | +{%- set bootstrap_colors = ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark', 'muted'] -%} |
| 15 | +<svg class="bi{% if not color %}{% if classes %} {{ classes }}{% endif %}" |
| 16 | +{%- elif color in bootstrap_colors %} text-{{ color }}"{% else %}" style="color: {{ color }}"{% endif -%} |
| 17 | +{%- if size %} width="{{ size }}"{% endif %}{% if size %} height="{{ size }}"{% endif %} fill="currentColor"> |
| 18 | + {%- if title %}<title>{{ title }}</title>{% endif -%} |
| 19 | + {%- if desc %}<desc>{{ desc }}</desc>{% endif -%} |
| 20 | + <use xlink:href="{{ url_for('bootstrap.static', filename='icons/bootstrap-icons.svg') }}#{{ name }}"/></svg> |
| 21 | +{%- endmacro %} |
22 | 22 |
|
23 | 23 |
|
24 | 24 | {% macro arg_url_for(endpoint, base) %}
|
|
0 commit comments