{# Import smart link macro for intelligent URL handling #} {% import "../../includes/macros/smart-link.html" as links %} {% set c = module.content %} {% set g = module.grid %} {% set is = module.icon_style %} {% set cs = module.card_style %} {% set colors = module.colors %} {% set spacing = module.spacing %} {% set a = module.advanced %} {# Build CSS classes #} {% set module_classes = "icon-grid" %} {% set module_classes = module_classes ~ " icon-grid--align-" ~ g.text_alignment %} {% set module_classes = module_classes ~ " icon-grid--" ~ cs.variant %} {% if cs.hover_effect %} {% set module_classes = module_classes ~ " icon-grid--hover" %} {% endif %} {% if a.custom_class %} {% set module_classes = module_classes ~ " " ~ a.custom_class %} {% endif %}
{# Section Header #} {% if c.section_heading or c.section_subheading %}
{% if c.section_heading %}

{{ c.section_heading|escape }}

{% endif %} {% if c.section_subheading %}

{{ c.section_subheading|escape }}

{% endif %}
{% endif %} {# Grid #}
{% for item in c.items %} {% set item_tag = item.link_url.href ? 'a' : 'div' %} <{{ item_tag }} class="icon-grid__item{% if is.background %} icon-grid__item--icon-bg icon-grid__item--icon-{{ is.background_shape }}{% endif %}" {% if item.link_url.href %}href="{{ item.link_url.href }}" {{ links.attrs(item.link_url.href) }}{% endif %}> {# Icon #} {# Content #}

{{ item.title|escape }}

{% if item.description %}

{{ item.description|escape }}

{% endif %} {% if item.link_text and not item.link_url %} {# Link text without URL - just show as text #} {% elif item.link_text and item.link_url %} {{ item.link_text|escape }} → {% endif %} {% endfor %}
{% require_css %} {% end_require_css %}