yxmiler commited on
Commit
de817c4
·
verified ·
1 Parent(s): e8a9e51

Create templates/login.html

Browse files
Files changed (1) hide show
  1. templates/login.html +77 -0
templates/login.html ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <title>登录</title>
6
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap" rel="stylesheet">
7
+ <style>
8
+ :root {
9
+ --bg-primary: #f4f6f9;
10
+ --card-bg: #ffffff;
11
+ --text-primary: #2c3e50;
12
+ --text-secondary: #6c757d;
13
+ --border-color: #e2e8f0;
14
+ --primary-color: #3498db;
15
+ }
16
+ * { box-sizing: border-box; margin: 0; padding: 0; }
17
+ body {
18
+ font-family: 'Inter', sans-serif;
19
+ background-color: var(--bg-primary);
20
+ color: var(--text-primary);
21
+ display: flex;
22
+ justify-content: center;
23
+ align-items: center;
24
+ height: 100vh;
25
+ }
26
+ .login-form {
27
+ background: var(--card-bg);
28
+ padding: 40px;
29
+ border-radius: 16px;
30
+ box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
31
+ width: 100%;
32
+ max-width: 400px;
33
+ }
34
+ h2 {
35
+ text-align: center;
36
+ margin-bottom: 20px;
37
+ color: var(--text-primary);
38
+ }
39
+ input {
40
+ width: 100%;
41
+ padding: 12px 15px;
42
+ margin: 10px 0;
43
+ border: 1px solid var(--border-color);
44
+ border-radius: 8px;
45
+ font-size: 16px;
46
+ }
47
+ button {
48
+ width: 100%;
49
+ padding: 12px;
50
+ background-color: var(--primary-color);
51
+ color: white;
52
+ border: none;
53
+ border-radius: 8px;
54
+ cursor: pointer;
55
+ transition: background-color 0.3s;
56
+ }
57
+ button:hover { background-color: #2980b9; }
58
+ </style>
59
+ </head>
60
+ <body>
61
+ <div class="login-form">
62
+ <h2>管理员登录</h2>
63
+ <form action="/manager/login" method="post">
64
+ <input type="password" name="password" placeholder="输入管理员密码" required>
65
+ <button type="submit">登录</button>
66
+ </form>
67
+ </div>
68
+ {% if error %}
69
+ <div id="notification" style="position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background-color: #f44336; color: white; padding: 10px 20px; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.2); display: block; z-index: 1000;">密码错误</div>
70
+ <script>
71
+ setTimeout(() => {
72
+ document.getElementById('notification').style.display = 'none';
73
+ }, 2000);
74
+ </script>
75
+ {% endif %}
76
+ </body>
77
+ </html>