69 lines
2.5 KiB
HTML
69 lines
2.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>登录</title>
|
|
<link rel="stylesheet" href="/static/css/bootstrap.min.css">
|
|
<style>
|
|
body {
|
|
background-color: #f5f5f5;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
height: 100vh;
|
|
}
|
|
.login-container {
|
|
background-color: white;
|
|
padding: 30px;
|
|
border-radius: 10px;
|
|
box-shadow: 0 0 20px rgba(0,0,0,0.1);
|
|
width: 100%;
|
|
max-width: 400px;
|
|
}
|
|
.login-title {
|
|
text-align: center;
|
|
margin-bottom: 30px;
|
|
}
|
|
.captcha-img {
|
|
cursor: pointer;
|
|
border: 1px solid #ddd;
|
|
border-radius: 4px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="login-container">
|
|
<h2 class="login-title">应用导航系统</h2>
|
|
|
|
<!-- 添加这部分代码来显示flash消息 -->
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
{% for category, message in messages %}
|
|
<div class="alert alert-{{ category }}">{{ message }}</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
<form method="POST">
|
|
<input type="hidden" name="next" value="{{ next }}">
|
|
<div class="mb-3">
|
|
<label for="username" class="form-label">用户名</label>
|
|
<input type="text" class="form-control" id="username" name="username" value="{{ request.form.username if request.form }}" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="password" class="form-label">密码</label>
|
|
<input type="password" class="form-control" id="password" name="password" value="{{ request.form.password if request.form }}" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="captcha" class="form-label">验证码</label>
|
|
<div class="input-group">
|
|
<input type="text" class="form-control" id="captcha" name="captcha" required>
|
|
<img src="{{ url_for('captcha') }}" class="captcha-img" onclick="this.src='{{ url_for('captcha') }}?'+Math.random()">
|
|
</div>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary w-100">登录</button>
|
|
</form>
|
|
</div>
|
|
</body>
|
|
</html> |