| 1 |
{% import 'elementor/macros' as m %} |
| 2 |
{%- set has_link = settings.link is defined and settings.link.href is defined and settings.link.href is not empty -%} |
| 3 |
{%- set link_tag = settings.link.tag | default('a') -%} |
| 4 |
{%- if has_link -%} |
| 5 |
<{{ link_tag | e('html_tag') }} |
| 6 |
{{- m.render_link_attributes(settings.link) }} class="{{ base_styles['link-base'] }} {{ m.default_tag_class(link_tag) }}" data-interaction-id="{{ interaction_id }}" |
| 7 |
> |
| 8 |
{%- endif %} |
| 9 |
<img class="{{ base_styles['base'] }} {{ m.default_tag_class('img') }} {{ settings.classes | join(' ') }}" |
| 10 |
{%- if not has_link %} data-interaction-id="{{ interaction_id }}"{% endif -%} |
| 11 |
{{- m.render_custom_attributes(settings) }} |
| 12 |
{%- for attr, value in settings.image -%} |
| 13 |
{%- if attr == 'src' %} src="{{ value | e('full_url') }}" |
| 14 |
{%- else %} {{ attr | e('html_attr') }}="{{ value }}"{% endif -%} |
| 15 |
{%- endfor %} |
| 16 |
/> |
| 17 |
{%- if has_link %} |
| 18 |
</{{ settings.link.tag | default('a') | e('html_tag') }}> |
| 19 |
{%- endif %} |
| 20 |
|