jdeip/app/templates/login.html

48 lines
2.3 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>登录 - EIP 控制面板</title>
<style>
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; margin: 0; }
.card { width: 360px; background: #fff; padding: 32px; border-radius: 16px; box-shadow: 0 20px 40px rgba(0,0,0,0.12); }
h1 { margin: 0 0 8px; font-weight: 400; text-align: center; }
p { margin: 0 0 24px; color: #666; text-align: center; }
label { display: block; font-weight: 600; margin: 12px 0 8px; color: #333; }
input[type="text"], input[type="password"] { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; }
.btn { width: 100%; margin-top: 16px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; border: none; padding: 10px 14px; border-radius: 10px; cursor: pointer; font-size: 15px; }
.error { margin-top: 12px; background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; padding: 10px; border-radius: 8px; display: {{ 'block' if error else 'none' }}; }
</style>
<script>
document.addEventListener('DOMContentLoaded', function() {
const u = document.getElementById('username');
if (u) u.focus();
});
</script>
<script>
(function(){
if (window.top !== window.self) {
window.top.location = window.location;
}
})();
</script>
</head>
<body>
<div class="card">
<h1>登录</h1>
<p>进入 EIP IP 轮换控制面板</p>
<form method="post" action="/login">
<label for="username">用户名</label>
<input id="username" name="username" type="text" autocomplete="username" required>
<label for="password">密码</label>
<input id="password" name="password" type="password" autocomplete="current-password" required>
<button class="btn" type="submit">登录</button>
</form>
<div class="error">{{ error }}</div>
</div>
</body>
</html>