feat: 初始版本,圆角主题与首次管理员引导

This commit is contained in:
2025-12-07 10:53:52 +08:00
commit 63db6a0815
43 changed files with 1293 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
{% extends 'base.html' %}
{% block title %}编辑资料{% endblock %}
{% block content %}
<h3>编辑资料</h3>
<form method="post">
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
<div class="mb-3"><label class="form-label">简介</label><textarea class="form-control" name="bio"></textarea></div>
<div class="mb-3"><label class="form-label">年级</label><input class="form-control" name="grade"></div>
<div class="mb-3"><label class="form-label">班级</label><input class="form-control" name="class_name"></div>
<button class="btn btn-primary" type="submit">保存</button>
</form>
{% endblock %}

View File

@@ -0,0 +1,10 @@
{% extends 'base.html' %}
{% block title %}通知{% endblock %}
{% block content %}
<h3>通知</h3>
<ul>
{% for n in items %}
<li>{{ n.type }} {{ n.created_at }}</li>
{% endfor %}
</ul>
{% endblock %}

View File

@@ -0,0 +1,20 @@
{% extends 'base.html' %}
{% block title %}主页{% endblock %}
{% block content %}
<div class="d-flex justify-content-between align-items-center">
<h3>{{ user.username }}</h3>
{% if current_user.is_authenticated and current_user.id != user.id %}
<a class="btn btn-outline-primary" href="{{ url_for('follows.follow', user_id=user.id) }}">关注</a>
{% endif %}
</div>
<p>{{ user.profile.bio }}</p>
<hr>
<h5>作品</h5>
<div class="row">
{% for p in user.posts %}
<div class="col-md-4">
<a href="{{ url_for('posts.detail', post_id=p.id) }}">{{ p.title }}</a>
</div>
{% endfor %}
</div>
{% endblock %}