{#- Expects: a (an item of announcements.items: title, summary, url, date, date_text, cover, source, mandatory; fallback when present). Optional: ann_h (heading tag, default h3). The source comes first: on a school's site it says who the announcement is from (left out on the author's own site). -#} {% from "blocks/picture.html" import picture %} {% set h = ann_h|default('h3') %} {% set mandatory = a.mandatory is defined and a.mandatory %}
{% if a.source and a.source != site.name %}

{% set icon = 'authority' %}{% set icon_cls = '' %}{% include "blocks/icon.html" %}{{ t('announcements.from') }}: {{ a.source }}

{% endif %}
<{{ h }} class="ann__title">{{ a.title }} {% if a.summary %}

{{ a.summary }}

{% endif %} {% if a.date or mandatory or (a.fallback is defined and a.fallback) %}

{% if a.date %}{% endif %}{% if mandatory %}{{ t('announcements.mandatory') }}{% endif %}{% if a.fallback is defined and a.fallback %}{{ t('fallback.tag') }}{% endif %}

{% endif %}
{% if a.cover %}
{{ picture(a.cover, '7rem') }}
{% endif %}