{% extends "base.html" %} {# API Reference Module Template Renders a Python module's API documentation using the unified autodoc skeleton. Extends base.html to inherit theme navigation, sidebars, and styling. Uses autodoc.css for all styling and autodoc/partials for components. This template receives: - element: DocElement for the module - config: Autodoc configuration - site: Site instance #} {% from 'partials/navigation-components.html' import breadcrumbs, page_navigation, toc %} {% from 'autodoc/partials/_macros/class-member.html' import class_member %} {% from 'autodoc/partials/_macros/function-member.html' import function_member %} {% block content %} {# Pre-compute element children - use getattr for safe access #} {% set element_children = getattr(element, 'children', []) %} {% set classes = element_children | selectattr('element_type', 'eq', 'class') | list %} {% set functions = element_children | selectattr('element_type', 'eq', 'function') | list %} {# Three-column documentation layout #}
{# Left Sidebar: Navigation #} {# Main Content #}
{# Page Hero: Breadcrumbs + Badges + Title + Description + Stats #} {% from 'partials/page-hero/_macros.html' import hero_element %} {{ hero_element(element, page, config) }} {# Article Content - Unified autodoc skeleton #}
{# Classes Section #} {% if classes %}

Classes

{% for cls in classes %} {{ class_member(cls, is_first=loop.first) }} {% end %}
{% end %} {# Functions Section #} {% if functions %}

Functions

{% for func in functions %} {{ function_member(func, is_first=loop.first) }} {% end %}
{% end %} {# Tags #} {% if page.tags %} {% end %}
{# Page navigation (prev/next) at bottom #} {{ page_navigation(page) }}
{# Right Sidebar: Contextual Graph + TOC + Metadata #} {% include 'partials/docs-toc-sidebar.html' %}
{# Mobile sidebar toggle button #} {# Sidebar overlay for mobile #} {% end %}