| {% extends "base.html" %} |
|
|
| {% block content %} |
| <table class="table-light"> |
| <tr> |
| <td><img src="{{ user.avatar(200) }}" class="rounded-circle" alt=""></td> |
| <td> |
| <p> |
| <form action="" method="post"> |
| <b>{{ user.username }}</b> |
|
|
| {% if user == current_user %} |
| {% if current_user.is_activated != 1 %} |
| <input id="btn" class="btn btn-warning" type="submit" name="request_button" value="激活"> |
| {% else %} |
| <span class="badge bg-success">已激活</span> |
| {% endif %} |
| {% endif %} |
| </form> |
|
|
| <p> |
| 粉丝 {{ user.followers.count() }} 关注 {{ user.followed.count() }} |
| </p> |
| <form action="" method="post"> |
| {% if user != current_user %} |
| {% if current_user.is_following(user) %} |
| <input class="btn btn-outline-primary" type="submit" name="request_button" value="Unfollow"> |
| {% else %} |
| <input class="btn btn-outline-primary" type="submit" name="request_button" value="Follow"> |
| {% endif %} |
| {% endif %} |
| </form> |
| 国家: {{ user.country }} |
| 省份: {{ user.province }} |
| 城市: {{ user.city }} |
| </p> |
|
|
| {% if user.about_me %} |
| <p>关于我: {{ user.about_me }}</p> |
| {% endif %} |
|
|
| {% if user.email %} |
| <p>我的邮箱: {{ user.email }}</p> |
| {% endif %} |
|
|
| {% if user.create_time %} |
| <p>加入时间: {{ user.create_time }}</p> |
| {% endif %} |
|
|
| {% if user==current_user %} |
| <p><a href="{{ url_for('edit_profile') }}">修改简介</a></p> |
| {% endif %} |
| </td> |
| </tr> |
| </table> |
| {% endblock %} |
|
|