← All changes
|
modules/atomic-widgets/elements/atomic-svg/atomic-svg.html.twig
+6
-15
4.0.9
→
trunk
View file →
| @@ -1,15 +1,6 @@ | ||
| 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 is defined and settings.link.attributes is not empty -%} | |
| 5 | - <{{ settings.link.tag | e('html_tag') }} {{ settings.link.attributes | raw }} class="{{ classes }}" data-interaction-id="{{ interaction_id }}" | |
| 6 | - {%- if id_attribute is not empty %} {{ id_attribute }}{% endif -%} | |
| 7 | - {%- if settings.attributes is defined and settings.attributes is not empty %} {{ settings.attributes | raw }}{% endif -%} | |
| 8 | - >{{ settings.svg.html | raw }}</{{ settings.link.tag | e('html_tag') }}> | |
| 9 | - {%- else -%} | |
| 10 | - <div class="{{ classes }}" data-interaction-id="{{ interaction_id }}" | |
| 11 | - {%- if id_attribute is not empty %} {{ id_attribute }}{% endif -%} | |
| 12 | - {%- if settings.attributes is defined and settings.attributes is not empty %} {{ settings.attributes | raw }}{% endif -%} | |
| 13 | - >{{ settings.svg.html | raw }}</div> | |
| 14 | - {%- endif -%} | |
| 15 | -{%- endif -%} | |
| 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 classes = settings.classes | merge([base_styles.base, m.default_tag_class(tag)]) | join(' ') -%} | |
| 4 | +<{{ tag | e('html_tag') }} | |
| 5 | + {%- if has_link %}{{ m.render_link_attributes(settings.link) }}{% endif %} class="{{ classes }}" data-interaction-id="{{ interaction_id }}" | |
| 6 | + {{- m.render_custom_attributes(settings) }}>{{ settings.svg.html | raw }}</{{ tag | e('html_tag') }}> | |