{% extends "base.html" %}
{% block title %}{{ category.name }} - 栏目文章{% endblock %}

{% block body_main %}
<div class="mb-4">
    <h1>{{ category.name }}</h1>
    <p class="lead">{{ category.description }}</p>
</div>

{% for article in articles %}
<article class="card mb-3">
    <div class="card-body">
        <h2><a href="{% url 'article_detail' article.id %}" class="text-decoration-none">{{ article.title }}</a></h2>
        <div class="text-muted mb-2">
            <span>{{ article.author }}</span> • 
            <span>{{ article.pub_date|date:"Y-m-d" }}</span>
        </div>
        <p>{{ article.excerpt }}</p>
    </div>
</article>
{% endfor %}
{% endblock %}
