base tabler

This commit is contained in:
JACS 2026-05-01 12:46:11 -05:00
parent ac2cfa9fe1
commit 0f84beacf1
1432 changed files with 28760 additions and 1 deletions

View file

@ -0,0 +1,31 @@
{%- assign icon-name = include.icon -%}
{%- assign icon-type = include.type | default: "outline" -%}
{%- assign replace-to = "icon" -%}
{%- 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 %}
{%- if include.inline -%}
{%- assign replace-to = replace-to | append: ' icon-inline' -%}
{%- endif -%}
{%- if include['size'] -%}
{%- assign replace-to = replace-to | append: ' icon-' | append: include['size'] -%}
{%- endif -%}
{%- assign replace-to = 'class="' | append: replace-to | append: '"' -%}
{%- if site.useIconfont -%}
<i class="icon ti ti-{{ icon-name }}{% if include.color %} {{ include.color }}{% endif %}{% if include.class %} {{ include.class }}{% endif %}"></i>
{%- elsif icons[icon-name] -%}
<!-- Download SVG icon from http://tabler.io/icons/icon/{{ icon-name }} -->
{% assign svg-icon = icons[icon-name].svg[icon-type] | default: '' -%}
{%- assign svg-icon = svg-icon | replace: '<path stroke="none" d="M0 0h24v24H0z" fill="none"/>', '' -%}
{{ svg-icon | replace_regex: 'class=\"[^"]+\"', replace-to | replace: 'class="', 'aria-hidden="true" focusable="false" class="' }}
{%- endif -%}