{% extends "base.html" %} {% import "_links.html" as links with context %} {% import "_table.html" as tables with context %} {#- aliased `forms`: the wiki route's context itself carries a `filters` dict (the catalog's q/state/repo values). -#} {% import "_filters.html" as forms with context %} {% block title %}Wiki — Cairn Dashboard{% endblock %} {% block content %}

Wiki

Generated wiki pages and their promotion state.

{#- The search input is an htmx trigger: typing (input changed delay:300ms) hx-gets the route and morph-swaps the results region below — no page reload. The form stays OUTSIDE #wiki-results so the swap can never touch the field; Search remains the no-htmx fallback. An unreadable manifest renders the explicit error state alone: the filters would filter nothing. -#} {% if not manifest_error %} {{ forms.form_open('/wiki', hx={'target': '#wiki-results', 'trigger': 'input changed delay:300ms'}, form_id='wiki-filters') }} {{ forms.field('text', 'q', 'Search', filters.q, placeholder='title, page id, or description') }} {{ forms.form_close('Search') }}

State: {%- set base_q = {} %} {%- if filters.q %}{% set _ = base_q.update({'q': filters.q}) %}{% endif %} {%- if filters.repo %}{% set _ = base_q.update({'repo': filters.repo}) %}{% endif %} {% for s in ["all"] + (page_states | list) %} {%- set q = dict(base_q, state=s) if s != "all" else dict(base_q) %} {% if not loop.first %} · {% endif %}{% if s == (filters.state or "all") %}{{ s }}{% else %}{{ s }}{% endif %} {%- endfor %}

{% endif %} {% include "wiki_results.html" %}
{% endblock %}