{% extends "base.html" %}

{% block content %}
 <!-- Content section (where Markdown content from _index.md appears) -->
<div class="bg-white w-full shadow overflow-hidden">
    <div class="border-t border-gray-200">
        <div class="px-4 py-5 sm:p-6">
            <div class="prose prose-indigo lg:prose-xl w-full">
                {% if section.content %}
                    {{ section.content | safe }}
                {% else %}
                    <p>This is a starter template for your Zola site with Tailwind CSS.</p>
                    <p>Edit the content in <code>content/_index.md</code> to customize this page.</p>
                {% endif %}
            </div>
        </div>
    </div>
</div>

<!-- Blog Section / List of Pages -->
<div class="mt-8 grid gap-8 grid-cols-1 md:grid-cols-2 lg:grid-cols-3">
    {% for page in section.pages %}
    <!-- Individual blog post card -->
        <a href="{{ page.permalink }}" class="bg-white overflow-hidden shadow rounded-lg hover:shadow-xl transition-shadow duration-300">
            <div class="px-4 py-5 sm:p-6">
                <h3 class="text-lg lg:text-xl font-medium text-gray-900 truncate">{{ page.title }}</h3>
                {% if page.description %}
                    <p class="mt-1 text-sm text-gray-500">{{ page.description }}</p>
                {% endif %}
                <div class="mt-4 flex items-center text-sm text-gray-500">
                    <span>{{ page.date | date(format="%B %e, %Y") }}</span>
                </div>
            </div>
        </a>
    {% endfor %}
</div>
{% endblock %}