{{ sub_title }}
{% if sub_desc %}{{ sub_desc }}
{% end %}{% extends "base.html" %} {# ================================================================================ Chronological Archive Template (Kida-Native v2) ================================================================================ Blog-style sections with dated posts in reverse chronological order. KIDA FEATURES SHOWCASED: - {% let %} multi-assignment for template-scoped variables - {% unless %} for cleaner negative conditionals - {% break %} for loop control (limit featured posts) - {% continue %} to skip items in iteration - Range expressions (1..N) for pagination display - {% match %} for pluralization and conditional dispatch - {% embed %} for card component composition - Optional chaining (?.) for null-safe access - Null coalescing (??) for smart defaults - Pipeline operator (|>) for filter chains - {% spaceless %} for clean HTML output USAGE: - Blog posts - News articles - Any time-ordered content ================================================================================ #} {% from 'partials/navigation-components.html' import breadcrumbs, section_navigation, pagination %} {% from 'partials/components/article.html' import article_card %} {# Maximum featured posts to show before breaking #} {% let MAX_FEATURED = 3 %} {% block content %} {# Template-scoped variables with multi-let #} {% let page_or_section = section ?? page, page_title = title ?? section?.title ?? 'Archive', page_desc = description ?? section?.params?.description ?? '', archive_posts = posts ?? [], archive_subsections = subsections ?? [], total_pages = total_pages ?? 1, current_page = current_page ?? 1, archive_posts_count = archive_posts | length, base_url = base_url ?? section?.href ?? '/archive/' %} {% let total_posts = total_posts ?? archive_posts_count %}
{{ desc }}
{% end %} {% if total_pages > 1 %}{% spaceless %} Showing {{ archive_posts | length }} of {{ total_posts }} {% match total_posts %} {% case 1 %}post {% case _ %}posts {% end %} {% if current_page > 1 %} (Page {{ current_page }} of {{ total_pages }}){% end %} {% end %}
{% end %}{{ sub_desc }}
{% end %}To add posts:
content/{{ section_path.relative_to(content_dir) if section_path and content_dir else '' }}/my-post.md
date: 2025-01-01💡 Posts in this section will be displayed in reverse chronological order.