{% load i18n brickwork_components %} {% comment %} Docs table of contents (icvoss/django-brickwork#627): the labelled "On this page" landmark over a consumer-authored heading outline. Reuses the existing .bw-docs-toc / __title / __list / __sub chrome in shell.css; this file is the first-class composition, not a parallel treatment. Preferred call: {% bw_toc items=... active=... %} (validates shape, matches active by href or bare id). Also {% include %}able with the same context keys when the caller already trusts its items list. Required context: items: sequence of {label, href} mappings; optional children=[{label, href}] one level deep (rendered as .bw-docs-toc__sub siblings, matching the article archetype's flat outline). Empty or absent items render nothing (no empty landmark). Optional: active: href or bare id of the current location; matching link gets aria-current="location". Omit for no current marker. heading: title text (default translated "On this page"). heading_id: id pairing the title with aria-labelledby (default "bw-toc-heading"). States: with items (normal) and empty (renders nothing). Active is a marker on one link, not a visual state of the nav. Accessibility: a single