91 lines
4.4 KiB
HTML
91 lines
4.4 KiB
HTML
<!-- admin_login.html -->
|
|
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
<div class="repo-min-h-screen repo-flex repo-items-center repo-justify-center" style="padding: 16px;">
|
|
<div style="width: 100%; max-width: 420px;">
|
|
<div class="repo-card">
|
|
<div class="repo-card__body repo-py-6">
|
|
<!-- 徽标 -->
|
|
<div class="repo-text-center repo-mb-6">
|
|
<div class="repo-flex repo-items-center repo-justify-center repo-mb-4">
|
|
<div class="repo-avatar repo-avatar--lg" style="background: var(--repo-color-primary); color: #fff;">
|
|
<i class="fas fa-lock"></i>
|
|
</div>
|
|
</div>
|
|
<h1 class="repo-text-lg repo-font-bold">管理员登录</h1>
|
|
<p class="repo-text-sm repo-text-secondary">DVS博客管理系统</p>
|
|
</div>
|
|
|
|
<!-- 错误信息 -->
|
|
{% if error %}
|
|
<div class="repo-message" style="position: static; transform: none; animation: none; margin-bottom: 16px; border-left: 3px solid var(--repo-color-danger);">
|
|
<i class="fas fa-exclamation-circle" style="color: var(--repo-color-danger);"></i>
|
|
<span>{{ error }}</span>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<!-- 登录表单 -->
|
|
<form method="POST" action="{{ url_for('admin_login') }}">
|
|
<div class="repo-mb-4">
|
|
<label for="password" class="repo-text-sm repo-font-medium repo-mb-2 repo-block">管理员密码</label>
|
|
<div class="repo-relative">
|
|
<input type="password" id="password" name="password" required
|
|
class="repo-input" placeholder="请输入管理员密码"
|
|
style="padding-right: 40px;">
|
|
<button type="button" onclick="togglePassword()"
|
|
class="repo-absolute" style="right: 10px; top: 8px; color: var(--repo-color-text-tertiary); background: none; border: none;">
|
|
<i class="far fa-eye" id="pwdIcon"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 安全提示 -->
|
|
<div class="repo-card repo-mb-4" style="border-color: rgba(59,130,246,0.3); background: rgba(59,130,246,0.05);">
|
|
<div class="repo-card__body" style="padding: 12px 16px;">
|
|
<div class="repo-flex repo-gap-2">
|
|
<i class="fas fa-shield-alt" style="color: var(--repo-color-primary);"></i>
|
|
<div>
|
|
<p class="repo-text-sm repo-font-medium" style="color: var(--repo-color-primary);">安全提示</p>
|
|
<p class="repo-text-xs repo-text-secondary">密码使用SHA256加密存储,请确保在安全环境下登录</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<button type="submit" class="repo-btn repo-btn--primary repo-w-full" style="padding: 10px;">
|
|
<i class="fas fa-sign-in-alt repo-mr-2"></i>登录系统
|
|
</button>
|
|
</form>
|
|
|
|
<!-- 返回链接 -->
|
|
<div class="repo-text-center repo-mt-6 repo-pt-4 repo-border-t">
|
|
<a href="/" class="repo-text-sm repo-text-secondary">
|
|
<i class="fas fa-arrow-left repo-mr-2"></i>返回博客首页
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="repo-text-center repo-mt-4">
|
|
<p class="repo-text-xs repo-text-tertiary">
|
|
<i class="fas fa-server repo-mr-1"></i>系统版本:v2.0.1
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function togglePassword() {
|
|
var input = document.getElementById('password');
|
|
var icon = document.getElementById('pwdIcon');
|
|
if (input.type === 'password') {
|
|
input.type = 'text';
|
|
icon.className = 'far fa-eye-slash';
|
|
} else {
|
|
input.type = 'password';
|
|
icon.className = 'far fa-eye';
|
|
}
|
|
}
|
|
</script>
|
|
{% endblock %} |