{% extends "base.html" %} {# ================================================================================ API Reference Template (Kida-Native) ================================================================================ Three-column layout optimized for API documentation sites: - Left sidebar: Navigation tree - Center: Content - Right sidebar: Contextual Graph + TOC + metadata Usage: Set `template: autodoc/python/single.html` in frontmatter Or set `type: autodoc-python` to auto-select this template TEMPLATE VARIABLES: - page: Page object with title, metadata, tags (required) - content: Rendered HTML content - params: Cascading parameters (page → section → site) - toc_items: Table of contents items - toc: Rendered TOC HTML KIDA FEATURES USED: - Optional chaining (?.) for safe attribute access - Null coalescing (??) for defaults - {% let %} for template-scoped caching ================================================================================ #} {% from 'partials/navigation-components.html' import breadcrumbs, page_navigation, toc %} {% from 'partials/components/tags.html' import tag_list %} {% block content %} {# Template-scoped caching #} {% let page_tags = page?.tags ?? [] %} {% let css_class = params?.css_class ?? '' %} {# Three-column documentation layout #}
{# Left Sidebar: Navigation #} {# Main Content #}
{# Page Hero: Breadcrumbs + Title + Description + Metadata #} {# Supports variants: classic (default) or magazine (set via hero_style) #} {% include 'partials/page-hero.html' %} {# Article Content - flattened structure #}
{# Track Navigation (Top) #} {% include 'partials/track_nav.html' %} {{ content | safe }} {# Tags #} {% if page_tags | length > 0 %} {% end %}
{# Track Navigation (Bottom) #} {% include 'partials/track_nav.html' %} {# Page navigation (prev/next) at bottom #} {% if page %} {{ page_navigation(page) }} {% end %}
{# Right Sidebar: Contextual Graph + TOC + Metadata #} {% include 'partials/docs-toc-sidebar.html' %}
{# Mobile sidebar toggle button #} {# Sidebar overlay for mobile #} {% end %} {# Sidebar toggle functionality is handled by interactive.js #} {# Graph scripts loaded in base.html #}