{% if catalog_items | length > 0 %}
{% call filter_rail(label='Documentation catalog', cls='chirp-theme-doc-catalog-rail') %}
{% for item in catalog_items %}
{% let item_title = item?.title ?? 'Untitled' %}
{% let item_href = item?.href ?? '#' %}
{% let item_children = item?.children ?? [] %}
{% let is_active = (item?.is_current ?? false) or (item?.is_in_trail ?? false) or (item?.is_expanded ?? false) %}
{{ catalog_mark(item_title, item_href, loop.index) }}
{{ item_title }}
{% end %}
{% with config.search.ui as ui %}
{% if ui.modal ?? false %}
{% else %}
{{ icon('magnifying-glass', size=18) }}
Search
{% end %}
{% end %}
{% with theme_menu_id='theme-menu-rail' %}{% include 'partials/theme-controls.html' %}{% end %}
{% end %}
{% end %}
{% call sidebar(cls='chirp-theme-docs-nav', current_path=current_path, aria_label='Documentation sections') %}
{% slot header %}
{% unless is_autodoc %}
{% include 'partials/version-selector.html' %}
{% end %}
{% end %}
{% if root_section %}
{% let nav_context = get_nav_context(page, root_section=root_section) %}
{% with nav_context?.root as root_item %}
{{ nav_node(root_item, 0) }}
{% end %}
{% else %}
{% for item in catalog_items %}
{{ nav_node(item, 0) }}
{% end %}
{% end %}
{% end %}