{#- Home block «Announcements» from announcements.items (up to 5, newest first). Optional: ann_band (true: a full-width band with its own .wrap), ann_tint (the band is tinted), ann_cls (extra class), ann_title_cls (class of the heading, default band__title). The list page is //announcements/ (docs/stage2.md); announcements.url is used when the core sends it. -#} {#- the urgent one is already in the strip above the header: it is not repeated here -#} {% set ns_ann = namespace(items=[]) %} {% if announcements is defined and announcements and announcements.items %} {% set ann_urgent_url = announcements.urgent.url if announcements.urgent else '' %} {% for a in announcements.items %}{% if a.url != ann_urgent_url %}{% set ns_ann.items = ns_ann.items + [a] %}{% endif %}{% endfor %} {% endif %} {% if ns_ann.items %} {% set ann_list_url = announcements.url if (announcements.url is defined and announcements.url) else site.url ~ 'announcements/' %}
{% if ann_band %}
{% endif %}
    {% for a in ns_ann.items %}
  • {% set ann_h = 'h3' %}{% include "blocks/announcement-item.html" %}
  • {% endfor %}
{% if ann_band %}
{% endif %}
{% endif %}