{# ABOUTME: P3 (#183) status filter chip row — All / Unread / Reading / Finished. #} {# State lives in the URL ?status=... so the filter is shareable / refresh-safe. #} {%- set active = query.filters.get('status') -%} {%- set chips = [ ('All', none), ('Unread', 'unread'), ('Reading', 'reading'), ('Finished', 'finished'), ] -%} {%- set other_filters = {} -%} {%- for fk, fv in query.filters.items() if fk != 'status' -%} {%- set _ = other_filters.update({fk: fv}) -%} {%- endfor -%}
{% for label, value in chips %} {%- set is_active = (active == value) if value is not none else (active is none) -%} {{ label }} {% endfor %}