{% extends "base.html" %}

{% block title %}Archive: {{ year }}/{{ "%02d" | format(month) }} - {{ site.name }}{% endblock %}

{% block content %}
<div class="max-w-4xl mx-auto">
    <header class="mb-8">
        <h1 class="text-2xl font-bold text-gray-900">Archive: {{ year }}/{{ "%02d" | format(month) }}</h1>
    </header>

    <div class="space-y-6">
        {% for post in posts %}
        <article class="bg-white p-6 rounded-lg shadow">
            <h2 class="text-lg font-medium text-gray-900">
                <a href="/{{ post.type }}/{{ post.slug }}" class="hover:text-blue-600">
                    {{ post.title }}
                </a>
            </h2>
            <p class="text-gray-600 mt-2">{{ post.excerpt or (post.body | excerpt) }}</p>
            <time class="text-sm text-gray-500">{{ post.created_at[:10] }}</time>
        </article>
        {% else %}
        <p class="text-gray-500">No posts in this period.</p>
        {% endfor %}
    </div>
</div>
{% endblock %}
