File size: 6,140 Bytes
c2a1150
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97514f5
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
{% extends "base.html" %}

{% block title %}管理员登录 - Wisdom Hub{% endblock %}

{% block content %}
<div class="login-container" style="
    min-height: calc(100vh - 8rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #FEEEDA 0%, #B3CFEF 100%);
">
    <div class="login-form" style="
        width: 100%;
        max-width: 420px;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.8));
        backdrop-filter: blur(10px);
        padding: 3rem;
        border-radius: 24px;
        box-shadow: 0 8px 32px rgba(99, 145, 197, 0.15);
        border: 1px solid rgba(99, 145, 197, 0.2);
    ">
        <div class="form-header" style="
            text-align: center;
            margin-bottom: 2.5rem;
        ">
            <div class="logo-container" style="
                margin-bottom: 1.5rem;
            ">
                <i class="fas fa-feather" style="
                    font-size: 3rem;
                    background: linear-gradient(135deg, #6391C5, #C5CDFD);
                    -webkit-background-clip: text;
                    -webkit-text-fill-color: transparent;
                "></i>
            </div>
            <h2 style="
                font-size: 1.75rem;
                font-weight: 600;
                color: #6391C5;
                margin-bottom: 0.5rem;
            ">管理员登录</h2>
            <p style="
                color: #6391C5;
                font-size: 0.9375rem;
            ">请输入您的管理员账号密码</p>
        </div>

        <form method="POST" style="display: flex; flex-direction: column; gap: 1.5rem;">
            {% with messages = get_flashed_messages() %}
                {% if messages %}
                    <div style="
                        background: rgba(99, 145, 197, 0.1);
                        border: 1px solid #B3CFEF;
                        padding: 1rem;
                        border-radius: 12px;
                        color: #6391C5;
                        font-size: 0.875rem;
                        text-align: center;
                    ">
                        {{ messages[0] }}
                    </div>
                {% endif %}
            {% endwith %}

            <div class="form-group" style="position: relative;">
                <div style="
                    position: absolute;
                    left: 1rem;
                    top: 50%;
                    transform: translateY(-50%);
                    color: #6391C5;
                ">
                    <i class="fas fa-user"></i>
                </div>
                <input type="text" name="username" placeholder="用户名" required style="
                    width: 100%;
                    padding: 1rem 1rem 1rem 2.75rem;
                    border: 2px solid #B3CFEF;
                    border-radius: 12px;
                    font-size: 1rem;
                    transition: all 0.3s ease;
                    color: #6391C5;
                    background: rgba(255, 255, 255, 0.7);
                ">
            </div>

            <div class="form-group" style="position: relative;">
                <div style="
                    position: absolute;
                    left: 1rem;
                    top: 50%;
                    transform: translateY(-50%);
                    color: #6391C5;
                ">
                    <i class="fas fa-lock"></i>
                </div>
                <input type="password" name="password" placeholder="密码" required style="
                    width: 100%;
                    padding: 1rem 1rem 1rem 2.75rem;
                    border: 2px solid #B3CFEF;
                    border-radius: 12px;
                    font-size: 1rem;
                    transition: all 0.3s ease;
                    color: #6391C5;
                    background: rgba(255, 255, 255, 0.7);
                ">
            </div>

            <button type="submit" style="
                width: 100%;
                padding: 1rem;
                background: linear-gradient(135deg, #6391C5, #C5CDFD);
                color: white;
                border: none;
                border-radius: 12px;
                font-size: 1rem;
                font-weight: 500;
                cursor: pointer;
                transition: all 0.3s ease;
                margin-top: 1rem;
            ">登录</button>

            <div style="
                text-align: center;
                margin-top: 1.5rem;
                font-size: 0.875rem;
            ">
                <a href="{{ url_for('main.index') }}" style="
                    color: #6391C5;
                    text-decoration: none;
                    transition: color 0.3s ease;
                ">
                    <i class="fas fa-arrow-left" style="margin-right: 0.5rem;"></i>返回首页
                </a>
            </div>
        </form>
    </div>
</div>

<script>
document.querySelectorAll('input').forEach(input => {
    input.addEventListener('focus', () => {
        input.style.borderColor = '#6391C5';
        input.style.background = 'rgba(255, 255, 255, 0.9)';
        input.style.boxShadow = '0 0 0 4px rgba(99, 145, 197, 0.1)';
    });

    input.addEventListener('blur', () => {
        input.style.borderColor = '#B3CFEF';
        input.style.background = 'rgba(255, 255, 255, 0.7)';
        input.style.boxShadow = 'none';
    });
});

document.querySelector('button[type="submit"]').addEventListener('mouseenter', function() {
    this.style.transform = 'translateY(-2px)';
    this.style.boxShadow = '0 4px 12px rgba(99, 145, 197, 0.2)';
});

document.querySelector('button[type="submit"]').addEventListener('mouseleave', function() {
    this.style.transform = 'none';
    this.style.boxShadow = 'none';
});

document.querySelector('a').addEventListener('mouseenter', function() {
    this.style.color = '#C5CDFD';
});

document.querySelector('a').addEventListener('mouseleave', function() {
    this.style.color = '#6391C5';
});
</script>
{% endblock %}