{% extends base_template %}

{% block content %}
<h2>Recent posts from {{ first_name }} {{ last_name }}</h2>
{% for post in recent_posts %}
<div class="post-preview">
    <a href="{% url 'blog_post' post.slug %}">
        <h2 class="post-title">
            {{ post.title }}
        </h2>
        <h3 class="post-subtitle">
            {{ post.summary }}
        </h3>
    </a>
    <p class="post-meta">Posted by <a href="{% url 'blog_author' post.author.slug %}">{{ post.author.first_name }} {{ post.author.last_name }}</a> on {{ post.created }}</p>
</div>
<hr>
{% endfor %}

{% endblock %}


