{% load i18n %} {% comment %} Generic in-card "rail" navigation for sectioned pages (``/settings/``, ``/administration/``, profile pages, ...). Mirrors the GitHub-style left-rail / right-pane layout: each top-level entry renders as a Tabler "subheader" group label, with its children as ``list-group-item-action`` rows beneath. Top-level entries without children render as standalone list items. A child that itself has children renders as a nested sub-group: a small inline subheader at ``ps-3`` (1rem) and its grandchildren as rows at ``ps-6`` (2rem) — one Bootstrap spacer per nesting level (``ps-6`` is a conjunto extension; Bootstrap default jumps from 1.5rem to 3rem). Deeper nesting is not supported — flatten the menu. Usage: ```django {% include "conjunto/includes/rail.html" with items=menus.administration %} ``` Items are duck-typed against ``IMenuItem``: ``visible``, ``url``, ``has_children``, ``children``, ``selected``, ``disabled``, ``boost``, ``get_title``, ``get_icon``, ``badge``, ``badge_class``. A top-level item is treated as a "group" when it has children; the group label is always rendered as a non-clickable span (the group's children are the actionable items — making the label itself a link duplicates a child's destination and adds cognitive load). Pass ``searchable=True`` (optionally with ``search_placeholder``) to prepend a live client-side filter box: each actionable row carries a lowercased ``data-search`` haystack and toggles ``d-none`` via Alpine when the typed query no longer matches; each top-level group is wrapped in ``.cj-rail-group`` so it collapses (CSS ``:has()``) once all its rows are filtered out. The caller need not provide an ``x-data`` scope — this partial opens its own. Each row's ``data-search`` haystack is its (ancestor) titles plus an optional duck-typed ``keywords`` attribute on the item — declare ``keywords = _("…")`` on an ``IMenuItem`` to make a row findable by terms that are not in its title (e.g. words from the page it links to). Admin page bodies live in templates and are not auto-indexed, so ``keywords`` is the opt-in hook for content search on those rows. {% endcomment %} {% if searchable %}