pkc-ys/PKCYsManage/templates/login.html
2024-11-02 02:00:46 +08:00

124 lines
2.8 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ titleName }}{{ PKC_VERSION }}</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
<style>
body {
margin: 0;
font-family: 'Arial', sans-serif;
background-color: #0c0c0c;
color: #ffffff;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
overflow: hidden;
}
.login-container {
background: rgba(20, 20, 20, 0.9);
border-radius: 10px;
padding: 2rem;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
width: 400px;
position: relative;
overflow: hidden;
}
.login-container h1 {
text-align: center;
margin-bottom: 1rem;
font-size: 2rem;
color: #00ccff;
}
.login-container input {
width: 100%;
padding: 1rem;
margin: 0.5rem 0;
border: none;
border-radius: 5px;
background: #222;
color: #ffffff;
font-size: 1rem;
transition: background 0.3s;
}
.login-container input:focus {
background: #333;
outline: none;
}
.login-container button {
width: 100%;
padding: 1rem;
background: #00ccff;
border: none;
border-radius: 5px;
font-size: 1.2rem;
color: #ffffff;
cursor: pointer;
transition: background 0.3s;
}
.login-container button:hover {
background: #0099cc;
}
.message {
color: #ff0000;
text-align: center;
margin-top: 1rem;
}
.background-animation {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
background: linear-gradient(120deg, #00ccff, #ff00ff);
animation: gradient 6s ease infinite;
}
@keyframes gradient {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
</style>
</head>
<body>
<div class="background-animation"></div>
<div class="login-container">
<h1>{{ titleName }}</h1>
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
<div class="message">
{% for category, message in messages %}
{% if category != 'success' %}
<p class="{{ category }}">{{ message }}</p>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% endwith %}
<form method="POST" action="/login">
<input type="text" id="username" name="username" placeholder="用户名" required>
<input type="password" id="password" name="password" placeholder="密码" required>
<button type="submit">登录</button>
</form>
</div>
</body>
</html>