{# Folders drawn inside folders, each by its last part with a count. One
shape for a collection's documents and for what a pack contains, so the
two read alike. Every fold starts closed unless the window's `folders`
preference says open (Brian, 2026-11-04); `fold()` writes the attribute. #}
{% macro fold() %}{% if folders_open(request) %} open{% endif %}{% endmacro %}
{% macro folder_head(name, count) %}
{{ pack.description }}
{% endif %} {% if pack.unread %}{{ pack.unread }}
{% endif %} {% for shown in pack.sections %}{{ section(shown) }}{% endfor %} {% endmacro %} {# A pack as a card that opens on what it contains: on the corpus page and on the Packs page alike. #} {% macro pack_card(pack) %}