{% from "_macros.html" import cover, source_stack %} {# Single feed card — the source of truth for both the initial feed list (_feed_items.html loops + includes this) and the HTMX Keep/Pass action swaps returned by POST /items/{id}/keep|pass (ARG-136 / ARG-139). ARG-243: one card = one event. An event and a lone document render through this same markup — no branch in the layout, only in where the card links (``/event/`` vs the unchanged ``/item/``) and how many outlets the source stack shows. Keep/Pass act on the representative document (``action_id``); ``entry=`` asks the route to re-render this same event card rather than the document's own. The bare Keep/Pass re-render of a lone card passes a plain namespace without the FeedItem helpers, hence the ``default`` fallbacks below. ``card_delay`` is supplied by the list loop for the staggered entrance animation. A bare action response has none and is marked ``card--swapped`` instead of ``rise``; the page only lifts its button row and eyebrow out of it (see .card-actions below), so it never replays the entrance. ``is_featured`` is supplied only by the first-page list loop (ARG-175); it is undefined — and thus falsy — on the bare Keep/Pass action re-render, so the magazine hero degrades to a standard card there. #} {% set kind = item.kind | default('item') %} {% set is_event = kind == 'event' %} {% set action_id = item.action_id | default(item.id) %} {% set href = item.href | default('/item/' ~ item.id) %} {% set domains = item.source_domains | default(()) %} {% set cat = (item.category.value if item.category else 'none')|lower %}