{% extends "base.html" %} {% from 'partials/navigation-components.html' import breadcrumbs with context %} {# API Reference List Template Used for API documentation section indexes (module/package overview). Shows modules and packages in a clean, reference-style layout. Context variables: - section: Section object with API modules - posts: List of module pages (may be empty) - subsections: List of package/module subsections - content_type: 'api-reference' #} {% block content %} {# Three-column documentation layout #}
{# Left Sidebar: API Navigation #} {# Main Content #}
{# Breadcrumbs #} {{ breadcrumbs(section if section is defined else page) }}

📦 {{ section.title if section else title | default('API Reference') }}

{% if section and section.metadata.get('description', '') %}

{{ section.metadata.get('description', '') }}

{% else %}

Complete API documentation and reference

{% endif %}
{# API Statistics #} {% if section %}
{% set module_count = (posts | length) + (subsections | length) %} {% set all_pages = section.regular_pages_recursive %}
{{ module_count }} {{ 'module' if module_count == 1 else 'modules' }}
{% if subsections %}
{{ subsections | length }} {{ 'package' if subsections | length == 1 else 'packages' }}
{% endif %} {% if all_pages %}
{{ all_pages | length }} total pages
{% endif %}
{% endif %} {# Package/Module Grid #} {% if subsections or posts %}
{# Subsections (packages with multiple modules) #} {% if subsections %}

Packages

{% for subsection in subsections %}
{{ subsection.title }} {% if subsection.metadata.get('description', '') %} {{ subsection.metadata.get('description', '') }} {% endif %} {% if subsection.regular_pages %} {# Count only non-index pages #} {% set content_pages = subsection.regular_pages | rejectattr('url', 'equalto', subsection.index_page.url if subsection.index_page else '') | list %} {% if content_pages %} {{ content_pages | length }} module{{ 's' if content_pages | length != 1 }} {% endif %} {% endif %}
{% endfor %}
{% endif %} {# Direct module pages #} {% if posts %}

Modules

{% for post in posts %}
{{ post.title }} {% if post.metadata.get('description') %} {{ post.metadata.get('description') }} {% elif post.content %} {{ post.content | striptags | truncate(120) }} {% endif %} {% if post.metadata.get('classes') %} {{ post.metadata.get('classes') | length }} class{{ 'es' if post.metadata.get('classes') | length != 1 else '' }} {% endif %} {% if post.metadata.get('functions') %} {{ post.metadata.get('functions') | length }} function{{ 's' if post.metadata.get('functions') | length != 1 }} {% endif %}
{% endfor %}
{% endif %}
{% else %} {# Empty state #}

No API documentation available yet.

{% endif %} {# NO PAGINATION - Reference docs should not be paginated #}
{# Right Sidebar: Optional space for future TOC or related content #}
{# Mobile sidebar toggle button #} {# Sidebar overlay for mobile #} {% endblock %} {# Sidebar toggle functionality is handled by interactive.js #}