1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-25 11:29:57 +04:00
Files
tabler/pages/_includes/ui/icon.html
2019-10-23 19:59:27 +02:00

25 lines
680 B
HTML

{% removeemptylines %}
{% assign svg-file="svg/" | append: include.icon | append: ".svg" %}
{% capture svg-icon %}
{% include {{ svg-file }} %}
{% endcapture %}
{% assign replace-to = "icon" %}
{% if include.right %}
{% assign replace-to = replace-to | append: " icon-right" %}
{% endif %}
{% if include.class %}
{% assign replace-to = replace-to | append: ' ' | append: include.class %}
{% endif %}
{% if include.color %}
{% assign replace-to = replace-to | append: ' text-' | append: include.color %}
{% endif %}
{% assign replace-to = 'class="' | append: replace-to | append: '"' %}
{{ svg-icon | replace_regex: 'class=\"[^"]+\"', replace-to }}
{% endremoveemptylines %}