{# Navbar notifications dropdown: a no-JS
menu, refreshed in JS mode by Unpoly polling /_construct/notifications, which returns this same fragment. Requires `construct` in context. #}
{# No aria-label on the : it would override everything inside, including the unread count, leaving the badge unannounced. The name is built from the content instead — icon label plus the count. #} {{ icon("notifications", label=construct.t("nav-notifications")) }} {# The fragment is reloaded on a 60s poll, so the count changes silently. role="status" announces a new count without interrupting. #} {% if construct.notifications.count > 0 %}{{ construct.t("crud-num-notifications", {"count": construct.notifications.count}) }}{% endif %} {% if construct.notifications.count > 0 %} {% endif %}
{{ construct.t("crud-num-notifications", {"count": construct.notifications.count}) }} {% for item in construct.notifications.get_notices() %} {% if item.icon %}{{ icon(item.icon) }}{% endif %} {{ item.title }} {% endfor %}