登录上线

This commit is contained in:
2025-11-09 20:31:37 +08:00
parent e650a087ca
commit aba94c074a
35 changed files with 675 additions and 5919 deletions

View File

@@ -0,0 +1,40 @@
{% load static %}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>安全登录</title>
<link rel="preload" href="{% static 'accounts/login.js' %}" as="script">
<style>
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; background: #f5f6fa; }
.container { max-width: 360px; margin: 12vh auto; padding: 24px; background: #fff; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
h1 { font-size: 20px; margin: 0 0 16px; }
label { display: block; margin: 12px 0 6px; color: #333; }
input { width: 100%; padding: 10px 12px; border: 1px solid #dcdde1; border-radius: 6px; }
button { width: 100%; margin-top: 16px; padding: 10px 12px; background: #2d8cf0; color: #fff; border: none; border-radius: 6px; cursor: pointer; }
button:disabled { background: #9bbcf0; cursor: not-allowed; }
.error { color: #d93025; margin-top: 10px; min-height: 20px; }
.hint { color: #888; font-size: 12px; margin-top: 10px; }
</style>
</head>
<body>
<div class="container">
<h1>登录到系统</h1>
<form id="loginForm">
{% csrf_token %}
<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 id="loginBtn" type="submit">登录</button>
<div id="error" class="error"></div>
</form>
</div>
<script src="{% static 'accounts/login.js' %}"></script>
</body>
</html>