Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +16 -1
templates/index.html
CHANGED
|
@@ -1 +1,16 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends "base.html" %}
|
| 2 |
+
|
| 3 |
+
{% block content %}
|
| 4 |
+
<div class="text-center">
|
| 5 |
+
<h1 class="display-4">欢迎使用后台管理系统</h1>
|
| 6 |
+
{% if current_user.is_authenticated %}
|
| 7 |
+
<p class="lead">您好,{{ current_user.username }}!</p>
|
| 8 |
+
{% if current_user.is_admin %}
|
| 9 |
+
<p><a href="{{ url_for('admin.index') }}" class="btn btn-primary">进入管理后台</a></p>
|
| 10 |
+
{% endif %}
|
| 11 |
+
{% else %}
|
| 12 |
+
<p class="lead">请登录以访问管理功能</p>
|
| 13 |
+
<p><a href="{{ url_for('login') }}" class="btn btn-primary">登录</a></p>
|
| 14 |
+
{% endif %}
|
| 15 |
+
</div>
|
| 16 |
+
{% endblock %}
|