register.html
2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>注册 - WeChat Viewer</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
background: #f0f2f5;
display: flex; align-items: center; justify-content: center;
min-height: 100vh;
}
.login-card {
background: white;
border-radius: 12px;
padding: 40px 32px;
width: 360px; max-width: 90vw;
box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}
.login-card h1 {
font-size: 22px; color: #2c3e50; text-align: center;
margin-bottom: 4px;
}
.login-card .subtitle {
font-size: 13px; color: #95a5a6; text-align: center;
margin-bottom: 28px;
}
.login-card label {
display: block; font-size: 13px; color: #555;
margin-bottom: 6px; font-weight: 500;
}
.login-card input {
width: 100%; padding: 10px 14px;
border: 1px solid #ddd; border-radius: 8px;
font-size: 15px; margin-bottom: 18px;
outline: none; transition: border-color .2s;
}
.login-card input:focus { border-color: #3498db; }
.login-card button {
width: 100%; padding: 12px;
background: #2c3e50; color: white;
border: none; border-radius: 8px;
font-size: 16px; font-weight: 600;
cursor: pointer; transition: background .2s;
}
.login-card button:hover { background: #34495e; }
.login-card .error {
color: #e74c3c; font-size: 13px; text-align: center;
margin-bottom: 14px; padding: 8px; background: #fdf0ef;
border-radius: 6px;
}
.login-card .foot {
text-align: center; font-size: 13px; color: #95a5a6; margin-top: 20px;
}
.login-card .foot a { color: #3498db; text-decoration: none; }
</style>
</head>
<body>
<div class="login-card">
<h1>WeChat Viewer</h1>
<div class="subtitle">注册账号 · 仅可查看日报</div>
{% if error %}
<div class="error">{{ error }}</div>
{% endif %}
<form method="POST" action="/register">
<label for="username">用户名</label>
<input id="username" name="username" type="text" placeholder="2-20位,字母数字下划线" required autofocus>
<label for="password">密码</label>
<input id="password" name="password" type="password" placeholder="至少6位" required>
<label for="password2">确认密码</label>
<input id="password2" name="password2" type="password" placeholder="再次输入密码" required>
<button type="submit">注 册</button>
</form>
<div class="foot">已有账号?<a href="/login">去登录</a></div>
</div>
</body>
</html>