| 1 |
{%- if settings.svg.html is defined and settings.svg.html is not empty -%} |
| 2 |
{%- set classes = settings.classes | merge([base_styles.base]) | join(' ') -%} |
| 3 |
{%- set id_attribute = settings._cssid is not empty ? 'id="' ~ settings._cssid | e('html_attr') ~ '"' : '' -%} |
| 4 |
{%- if settings.link.href is defined and settings.link.href is not empty -%} |
| 5 |
{%- set linkAttr = settings.link.tag == 'a' ? 'href' : 'data-action-link' -%} |
| 6 |
<{{ settings.link.tag | e('html_tag') }} {{ linkAttr }}="{{ settings.link.href | raw }}" target="{{ settings.link.target }}" class="{{ classes }}" data-interaction-id="{{ interaction_id }}" |
| 7 |
{%- if id_attribute is not empty %} {{ id_attribute }}{% endif -%} |
| 8 |
{%- if settings.attributes is defined and settings.attributes is not empty %} {{ settings.attributes | raw }}{% endif -%} |
| 9 |
>{{ settings.svg.html | raw }}</{{ settings.link.tag | e('html_tag') }}> |
| 10 |
{%- else -%} |
| 11 |
<div class="{{ classes }}" data-interaction-id="{{ interaction_id }}" |
| 12 |
{%- if id_attribute is not empty %} {{ id_attribute }}{% endif -%} |
| 13 |
{%- if settings.attributes is defined and settings.attributes is not empty %} {{ settings.attributes | raw }}{% endif -%} |
| 14 |
>{{ settings.svg.html | raw }}</div> |
| 15 |
{%- endif -%} |
| 16 |
{%- endif -%} |
| 17 |
|