{% load brickwork_icons %} {% comment %} Pricing comparison (Beat Phase C, icvoss/django-brickwork#543): a plan-by- capability table. Structural sibling of _pricing_table.html (tier cards), not a layout option on it: real tabular data belongs in a . Required context: none. Optional: heading (str), lede (str), note (str), caption (str). heading_id (str, default "bw-pricing-comparison-heading"): stable id for aria-labelledby on the scroll region; change it when composing two comparisons on one page. plans (list of str): column headers after the capability column. rows (list of dicts): {label, cells}. Each cell is either a plain string or a dict {included: bool} (renders tick/dash plus visually-hidden "Included" / "Not included" text). List-shaped: supply from context. An empty plans or rows list renders the intro alone (or nothing if that too is empty), never a fabricated table. States: none. Accessibility: real
with caption, scope=col/row, scroll region keyboard-reachable (tabindex=0 + aria-labelledby). Covered via sections-*.html after the example collapses to this include. Responsive: table scrolls inside its own box (contain: paint); never reflows to one column. {% endcomment %} {% if heading or lede or plans and rows %} {% with hid=heading_id|default:"bw-pricing-comparison-heading" %}
{% if heading %}

{{ heading }}

{% endif %} {% if lede %}

{{ lede }}

{% endif %} {% if plans and rows %}
{% for plan in plans %} {% endfor %} {% for row in rows %} {% for cell in row.cells %} {% endfor %} {% endfor %}
{% firstof caption "Plan comparison. Scroll sideways to see every plan." %}
Capability{{ plan }}
{{ row.label }} {% if cell.included is True %} {% bw_icon "check" size="sm" decorative=True css_class="bw-pricing-comparison__yes" %} Included {% elif cell.included is False %} {% bw_icon "minus" size="sm" decorative=True css_class="bw-pricing-comparison__no" %} Not included {% else %} {{ cell }} {% endif %}
{% endif %} {% if note %}

{{ note }}

{% endif %} {% endwith %} {% endif %}