feat: initial postcard manager - FastAPI + Jinja2 + SQLite

This commit is contained in:
2026-07-05 16:06:03 +08:00
commit 0eca60300f
24 changed files with 1304 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
{% extends "base.html" %}
{% block title %}Dashboard - Postcard Manager{% endblock %}
{% block content %}
<h1>👋 欢迎,{{ user.username }}</h1>
<section class="section">
<div class="section-header">
<h2>Profiles</h2>
</div>
{% if profiles %}
<div class="card-grid">
{% for p in profiles %}
<a href="/profiles/{{ p.id }}/postcards" class="card">
<h3>{{ p.nickname }}</h3>
<div class="stats">
<span class="stat">📬 {{ stats[p.id].total }}</span>
<span class="stat sent">寄出 {{ stats[p.id].sent }}</span>
<span class="stat delivered">送达 {{ stats[p.id].delivered }}</span>
<span class="stat received">收到 {{ stats[p.id].received }}</span>
</div>
</a>
{% endfor %}
</div>
{% else %}
<p class="empty">还没有 Profile<a href="/profiles">去创建一个</a></p>
{% endif %}
</section>
{% endblock %}