{% extends "base.html" %}
{#
================================================================================
Docs Home Template (Kida-Native)
================================================================================
Optimized home page template for documentation sites.
FEATURES:
- Hero section with title and description
- Auto-discovered documentation sections
- Custom quick links support
- Clean, focused layout (no action bar)
KIDA FEATURES USED:
- {% let %} for template-scoped variables
- Optional chaining (?.) for null-safe attribute access
- Null coalescing (??) for defaults
- Pipeline operator (|>) for readable filter chains
- {% def %} for reusable template functions
- {% match %} for type dispatch
- {% spaceless %} for clean HTML output
USAGE:
Set `type: doc` on home page to auto-select
Or set `template: doc/home.html` in frontmatter
================================================================================
#}
{# =============================================================================
HELPER FUNCTIONS
============================================================================= #}
{# Render a section card with icon, title, description, and page count #}
{% def section_card(section) %}
{% let section_title = section?.title ?? 'Untitled' %}
{% let section_desc = section?.metadata?.description ?? '' %}
{% let section_pages = section?.pages ?? [] %}
{% let page_count = section_pages | length %}
{{ section_desc }} {{ link_desc }}{{ section_title }}
{% if section_desc %}
{{ link_title }}
{% if link_desc %}
{{ page_desc }}
{% end %}