{% extends "base.html" %}
{% block extra_head %}
<link rel="stylesheet" href="{{ static_url('/static/css/feed.css') }}">
{% endblock %}
{% block content %}
<div class="saved-page">
    <h1 class="saved-title">Topics</h1>
    <p class="subtitle">Browse posts by topic.</p>

    <div class="topics-grid">
        {% for t in topics %}
        <div class="topic-card card-link-host">
            {% set _href = "/topics/" ~ t.key %}
            {% set _label = t.label %}
            {% include "_card_link.html" %}
            <span class="badge badge-{{ t.key }}">{{ t.label }}</span>
            <span class="topic-card-count">{{ t.post_count }} post{{ 's' if t.post_count != 1 else '' }}</span>
        </div>
        {% endfor %}
    </div>
</div>
{% endblock %}
