ui: 导航圆润与用户信息展示;详情页作者与关注;主页粉丝/关注与卡片网格

This commit is contained in:
2025-12-07 11:25:50 +08:00
parent b497fe97f3
commit a60d9d1e54
5 changed files with 78 additions and 29 deletions

View File

@@ -3,7 +3,18 @@
{% block content %}
<div class="card mb-3">
<div class="p-3">
<h3 class="mb-2">{{ post.title }}</h3>
<div class="d-flex justify-content-between align-items-center mb-2">
<div class="d-flex align-items-center gap-3">
<span class="avatar">{{ post.user.username[:1]|upper }}</span>
<div>
<h3 class="mb-1">{{ post.title }}</h3>
<a class="text-decoration-none" href="{{ url_for('users.profile', user_id=post.user.id) }}">{{ post.user.username }}</a>
</div>
</div>
{% if current_user.is_authenticated and current_user.id != post.user.id %}
<a class="btn btn-brand" href="{{ url_for('follows.follow', user_id=post.user.id) }}">关注作者</a>
{% endif %}
</div>
<p class="text-secondary">{{ post.description }}</p>
<span class="badge bg-light text-dark">{{ post.visibility.value }}</span>
</div>