{% extends "base.html" %}
{% block extra_head %}
<link rel="stylesheet" href="{{ static_url('/static/css/feed.css') }}">
<link rel="stylesheet" href="{{ static_url('/static/css/post.css') }}">
{% endblock %}
{% block content %}
<div class="saved-page">
    <a href="/topics" class="back-link">&larr; All topics</a>
    <h1 class="saved-title">
        <span class="badge badge-{{ topic }}">{{ topic_label }}</span>
        posts
    </h1>

    <div class="feed-posts" role="feed" aria-label="{{ topic_label }} posts">
        {% for item in posts %}
        {% set _author = item.author %}{% set _time = item.time_ago %}{% set _show_share = true %}{% set _show_comment_form = true %}{% include "_post_card.html" %}
        {% else %}
        <div class="empty-state">No {{ topic_label.lower() }} posts yet.</div>
        {% endfor %}
    </div>

    {% include "_load_more.html" %}
</div>
{% endblock %}
