Files
daily-paper/app/templates/login.html
T
Rain-Bus 0d293422ac feat: enhance UI, refactor services, improve templates and tests
- Replace image_extractor with pdf_image_extractor service
- Enhance pi_client with expanded API capabilities
- Improve summarizer service with additional features
- Update admin routes with more endpoints
- Add login page template
- Enhance detail page with comprehensive layout
- Improve search and trends pages
- Update base template with additional elements
- Refactor tests for better coverage
- Add validate_summary script
- Update project configuration and dependencies
2026-06-07 19:38:58 +08:00

151 lines
3.1 KiB
HTML

{% extends "base.html" %}
{% block title %}登录 — HF Daily Papers{% endblock %}
{% block content %}
<div class="login-page">
<div class="login-card">
<div class="login-header">
<h1 class="login-title">🔑 管理员登录</h1>
<p class="login-subtitle">请输入管理员账号和密码</p>
</div>
{% if error %}
<div class="login-error">
{{ error }}
</div>
{% endif %}
<form class="login-form" action="/admin/login" method="post">
<div class="login-field">
<label for="username">用户名</label>
<input
type="text"
id="username"
name="username"
placeholder="请输入用户名"
required
autofocus
/>
</div>
<div class="login-field">
<label for="password">密码</label>
<input
type="password"
id="password"
name="password"
placeholder="请输入密码"
required
/>
</div>
<button type="submit" class="login-btn">登 录</button>
</form>
</div>
</div>
<style>
.login-page {
display: flex;
justify-content: center;
align-items: center;
min-height: 60vh;
padding: 40px 16px;
}
.login-card {
width: 100%;
max-width: 400px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: 36px 32px;
box-shadow: 0 4px 24px var(--shadow);
}
.login-header {
text-align: center;
margin-bottom: 28px;
}
.login-title {
font-family: var(--font-body);
font-size: 1.4rem;
font-weight: 700;
color: var(--ink);
margin: 0 0 8px;
}
.login-subtitle {
font-size: 0.9rem;
color: var(--ink-light);
margin: 0;
}
.login-error {
background: #fce4ec;
color: #c62828;
padding: 10px 14px;
border-radius: var(--radius);
font-size: 0.85rem;
margin-bottom: 20px;
text-align: center;
}
.login-form {
display: flex;
flex-direction: column;
gap: 18px;
}
.login-field label {
display: block;
font-size: 0.85rem;
font-weight: 600;
color: var(--ink);
margin-bottom: 6px;
}
.login-field input {
width: 100%;
padding: 10px 14px;
border: 1px solid var(--border);
border-radius: var(--radius);
font-size: 0.9rem;
font-family: var(--font-sans);
background: var(--bg);
color: var(--ink);
transition: border-color 0.2s;
box-sizing: border-box;
}
.login-field input:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(27, 54, 93, 0.1);
}
.login-btn {
width: 100%;
padding: 12px;
background: var(--accent);
color: #fff;
border: none;
border-radius: var(--radius);
font-size: 0.95rem;
font-weight: 600;
cursor: pointer;
transition: background 0.2s;
font-family: var(--font-sans);
margin-top: 4px;
}
.login-btn:hover {
background: var(--accent-hover);
}
@media (max-width: 480px) {
.login-card {
padding: 28px 20px;
}
}
</style>
{% endblock %}