{% extends "base.html" %}
{% block title %}Gemini Capsules{% endblock %}
{% block content %}
<div class="bbs-header">
    <h1><i class="bi bi-stars"></i> Gemini Capsules</h1>
    <p>User-published gemtext pages. <a href="{{ url_for('gemini.edit') }}">Edit your own.</a></p>
</div>
<div class="card">
    <div class="card-body p-0">
    {% if capsules %}
        <ul class="list-group list-group-flush">
            {% for c in capsules %}
                <li class="list-group-item d-flex justify-content-between">
                    <a href="{{ url_for('gemini.view', username=c.user.username) }}">
                        {{ c.title or c.user.username + "'s capsule" }}
                    </a>
                    <small class="text-muted">{{ c.updated_at.strftime('%Y-%m-%d') }}</small>
                </li>
            {% endfor %}
        </ul>
    {% else %}
        <div class="p-3 text-muted">No published capsules yet.</div>
    {% endif %}
    </div>
</div>
{% endblock %}
