| 1 |
{%- macro default_tag_class(tag) -%} |
| 2 |
{%- if tag %}e-default-{{ tag | e('html_attr') }}{% endif -%} |
| 3 |
{%- endmacro -%} |
| 4 |
|
| 5 |
{%- macro render_base_classes(id, base_styles, settings, extra_classes, tag) -%} |
| 6 |
{%- import _self as self -%} |
| 7 |
{{- ['elementor-element', 'elementor-element-' ~ id, 'e-con', 'e-atomic-element', base_styles.base, self.default_tag_class(tag)] | merge(settings.classes | default([])) | merge(extra_classes | default([])) | join(' ') -}} |
| 8 |
{%- endmacro -%} |
| 9 |
|
| 10 |
{%- macro render_data_attributes(id, type, interaction_id) -%} |
| 11 |
data-id="{{ id }}" data-element_type="{{ type }}" data-e-type="{{ type }}" data-interaction-id="{{ interaction_id }}" |
| 12 |
{%- endmacro -%} |
| 13 |
|
| 14 |
{%- macro render_custom_attributes(settings, editor_attributes) -%} |
| 15 |
{%- if settings._cssid is defined and settings._cssid is not empty %} id="{{ settings._cssid | e }}"{% endif -%} |
| 16 |
{%- if settings.attributes is defined and settings.attributes is not empty %} {{ settings.attributes | raw }}{% endif -%} |
| 17 |
{%- if editor_attributes is defined and editor_attributes is not empty %} {{ editor_attributes | raw }}{% endif -%} |
| 18 |
{%- endmacro -%} |
| 19 |
|
| 20 |
{%- macro render_link_attributes(link) -%} |
| 21 |
{%- if link is defined and link.href is defined and link.href is not empty -%} |
| 22 |
{%- if link.tag | default('a') == 'button' %} data-action-link="{{ link.href | e }}"{% else %} href="{{ link.href | e }}"{% endif -%} |
| 23 |
{%- if link.target is defined and link.target is not empty %} target="{{ link.target | e }}"{% endif -%} |
| 24 |
{%- endif -%} |
| 25 |
{%- endmacro -%} |
| 26 |
|
| 27 |
{%- macro render_interactions(interactions) -%} |
| 28 |
data-interactions="{{ interactions | json_encode | e('html_attr') }}" |
| 29 |
{%- endmacro -%} |
| 30 |
|