{% extends "base.html" %}
{% block title %}Overview — Solidity Flow Navigator{% endblock %}
{% block body_class %}index-page{% endblock %}
{% block content %}
{# v0.20.0 redesign (spec §8.3): the index is reframed as a two-pane attack-
surface map — a sticky left sidebar (run summary, foldable Bindings card,
contract navigator) beside a main column whose search / filter / sort controls
sit at the very top, above a per-contract listing. Every server-rendered
feature degrades with JavaScript off; facets, sort, collapse, the bindings
fold, keyboard nav, and scroll-spy are JS-only enhancements (index.js). #}
{# v0.15.0 pins (spec §8.3): a pushpin toggle. Each is a real server-side link to
/bookmark// (works with no JavaScript; the fallback reloads and
returns to this row). index.js enhances the click to toggle in place. ``tilt``
rotates the pin: 25° in the listing, 0° (upright) in the Pinned collection. #}
{% macro bookmark_toggle(kind, ident, on, tilt=25) -%}
{% set anchor = ('e-' if kind == 'entry' else 'c-') ~ (ident | anchor_slug) -%}
{%- endmacro %}
{# A simple disclosure chevron (down when open, rotated -90° when closed via CSS).
Shared by the Bindings fold, contract collapse, and the Reads sub-section. #}
{% macro chevron(size, cls) -%}
{%- endmacro %}
{# ===== left sidebar ===== #}
{# ===== main column ===== #}
{# --- control bar: facets (top), then filter + sort. Both rows are server-
rendered but `hidden`; index.js reveals and wires them, so no-JS users get
the full listing in default order with no dead controls. --- #}
·····
sort
{# --- Pinned (only when bookmarks match this analysis) — spec §8.3. Stays put
and unfiltered; the filter narrows only the contract listing below it. #}
{% set bookmark_count = (bookmarked_contracts | length) + (bookmarked_entries | length) %}
{% if bookmark_count %}
{{ bookmark_count }}
{% endif %}
{# --- contract sections, grouped by the Project / Tests / Dependencies
divider (kept). Each contract header toggles collapse (index.js); each
entry row carries facet/sort data attributes for the client-side controls. #}
{% for group in groups %}
{% if group.contracts %}
{{ group.label }}
{% for contract in group.contracts %}
{% set count = contract.mutating_count + contract.read_only_count %}