{#- Expects: tiles (list with name, url, kind). Quick links with an icon chosen by section kind. Optional: tiles_limit (default 8). A site can have 25 sections: the first tiles_limit are shown, the rest open in place under «Other sections» (
, no JavaScript). One section is never left alone behind the button. -#} {% macro tile(s) %}
  • {% set icon = s.kind %}{% set icon_cls = '' %}{% include "blocks/icon.html" %}{{ s.name }}{% set icon = 'arrow' %}{% set icon_cls = 'tile__arrow' %}{% include "blocks/icon.html" %}
  • {% endmacro %} {% if tiles %} {% set tl_max = tiles_limit|default(8) %} {% set tl = tl_max if tiles|length > tl_max + 1 else tiles|length %} {% if tiles|length > tl %}
    {{ t('home.more_sections') }}{{ tiles|length - tl }}{% set icon = 'chevron' %}{% set icon_cls = 'tiles-more__chevron' %}{% include "blocks/icon.html" %}
    {% endif %} {% endif %}