{% extends "brickwork/shell/docs.html" %} {% comment %} An editorial related-content page: the full "continue reading" surface (icvoss/django-brickwork#420). Sixth archetype in the Editorial and publishing family. COPY THIS FILE into your project and edit it. It is not on the template loader path, so you cannot extend it (ADR-056). What your view must supply: crumbs breadcrumb trail: [{label, url}, ...], last unlinked docs_nav_label rail / jump label (this page uses "Related groups") docs_search_action the URL bw_search in the site header submits to source_title the article this page continues from source_href URL back to that article groups list of {id, heading, items: [{title, href, snippet, meta}]}, or () related_state "ready" | "empty" | "error" The headings and static rail copy below are typed into the template. WHY THIS IS NOT THE ARTICLE SIBLING RAIL: examples/editorial/article.html's rail is a preview of three neighbours in one category. This page is the full related-content job: multiple deliberate groups (same category, same author, further reading), each with its own heading and cards. Closing #420 with the article rail alone would understate the archetype. WHY THIS PAGE EXTENDS THE DOCS SHELL, NOT A NEW EDITORIAL SHELL: Same deciding fact as examples/editorial/article.html and ADR-091. Family taxonomy stays the examples/ directory. RELATED ROWS ARE FAMILY-NEUTRAL CARDS, not .bw-listing-list__item. States: related_state is the page's real branch. "ready": source link-back, grouped related cards, group jump rail. "empty": no related pieces curated yet. _empty_state.html; chrome stays. "error": the content store failed. bw_alert danger. LOADING: not applicable for the default server-rendered path. Accessibility: group headings are real
{% translate "The journal could not load related pieces." %}
{% elif related_state == "empty" %}{% translate "Nothing is curated beside this piece yet." %}
{% else %}{% translate "Continuing from" %} {{ source_title }}.
{% endif %} {% endblock %} {% block content %} {% if related_state == "empty" %} {% include "brickwork/components/_empty_state.html" with heading="No related pieces yet" body="Editors have not curated neighbours for this article. Return to the piece you were reading, or browse the journal home." icon="document" action_href="/journal/" action_label="Back to the journal" %} {% elif related_state == "error" %} {% bw_alert "The journal could not load related reading. Retry in a moment, or open another piece from the journal home." title="Could not load related reading" variant="danger" %} {% else %}{{ item.snippet }}
{{ item.meta }}
{% translate "Related groups" %}