fc / apiSystem /templates /admin /login.html
jun2024's picture
Upload 2241 files
b4f2238 verified
Raw History Blame Contribute Delete
9.79 kB
<!DOCTYPE html>
<html lang="zh-hans">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>登录 | 法穿AI案件管理系统</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
overflow: hidden;
}
/* 动态背景粒子 */
.particles {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
overflow: hidden;
z-index: 0;
}
.particle {
position: absolute;
width: 4px;
height: 4px;
background: rgba(255, 255, 255, 0.3);
border-radius: 50%;
animation: float 15s infinite;
}
@keyframes float {
0%, 100% {
transform: translateY(100vh) rotate(0deg);
opacity: 0;
}
10% {
opacity: 1;
}
90% {
opacity: 1;
}
100% {
transform: translateY(-100vh) rotate(720deg);
opacity: 0;
}
}
/* 登录卡片 */
.login-container {
position: relative;
z-index: 1;
width: 100%;
max-width: 420px;
padding: 20px;
}
.login-card {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(20px);
border-radius: 24px;
padding: 40px;
box-shadow:
0 25px 50px rgba(0, 0, 0, 0.3),
inset 0 0 0 1px rgba(255, 255, 255, 0.1);
animation: slideUp 0.6s ease-out;
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Logo 和标题 */
.logo-section {
text-align: center;
margin-bottom: 30px;
}
.logo {
width: 70px;
height: 70px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 20px;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 15px;
box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% {
box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}
50% {
box-shadow: 0 10px 40px rgba(102, 126, 234, 0.6);
}
}
.logo svg {
width: 36px;
height: 36px;
fill: white;
}
.title {
color: #fff;
font-size: 24px;
font-weight: 600;
margin-bottom: 8px;
}
.subtitle {
color: rgba(255, 255, 255, 0.6);
font-size: 14px;
}
/* 表单样式 */
.form-group {
margin-bottom: 20px;
position: relative;
}
.form-label {
display: block;
color: rgba(255, 255, 255, 0.8);
font-size: 13px;
font-weight: 500;
margin-bottom: 8px;
}
.form-input {
width: 100%;
padding: 14px 16px;
background: rgba(255, 255, 255, 0.08);
border: 2px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
color: #fff;
font-size: 15px;
transition: all 0.3s ease;
outline: none;
}
.form-input::placeholder {
color: rgba(255, 255, 255, 0.4);
}
.form-input:focus {
border-color: #667eea;
background: rgba(255, 255, 255, 0.12);
box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}
.form-input:hover {
border-color: rgba(255, 255, 255, 0.2);
}
/* 错误提示 */
.error-note {
background: rgba(255, 107, 107, 0.15);
border: 1px solid rgba(255, 107, 107, 0.3);
border-radius: 10px;
padding: 12px 16px;
margin-bottom: 20px;
color: #ff6b6b;
font-size: 13px;
}
/* 提交按钮 */
.submit-btn {
width: 100%;
padding: 16px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border: none;
border-radius: 12px;
color: #fff;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
margin-top: 10px;
position: relative;
overflow: hidden;
}
.submit-btn:hover {
transform: translateY(-2px);
box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}
.submit-btn:active {
transform: translateY(0);
}
.submit-btn::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 0;
height: 0;
background: rgba(255, 255, 255, 0.2);
border-radius: 50%;
transform: translate(-50%, -50%);
transition: width 0.6s, height 0.6s;
}
.submit-btn:active::after {
width: 300px;
height: 300px;
}
/* 注册链接 */
.register-link {
text-align: center;
margin-top: 25px;
padding-top: 20px;
border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.register-link span {
color: rgba(255, 255, 255, 0.6);
font-size: 14px;
}
.register-link a {
color: #667eea;
text-decoration: none;
font-weight: 600;
margin-left: 5px;
transition: color 0.3s;
}
.register-link a:hover {
color: #8b9ff5;
}
/* 响应式 */
@media (max-width: 480px) {
.login-card {
padding: 30px 25px;
}
.title {
font-size: 20px;
}
}
</style>
</head>
<body>
<!-- 动态粒子背景 -->
<div class="particles" id="particles"></div>
<div class="login-container">
<div class="login-card">
<!-- Logo -->
<div class="logo-section">
<div class="logo">
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M12 3L1 9l4 2.18v6L12 21l7-3.82v-6l2-1.09V17h2V9L12 3zm6.82 6L12 12.72 5.18 9 12 5.28 18.82 9zM17 15.99l-5 2.73-5-2.73v-3.72L12 15l5-2.73v3.72z"/>
</svg>
</div>
<h1 class="title">欢迎回来</h1>
<p class="subtitle">法穿AI案件管理系统</p>
</div>
<!-- 表单 -->
<form method="post" action="{{ app_path }}">
{% csrf_token %}
{% if form.errors %}
<div class="error-note">
用户名或密码错误,请重试
</div>
{% endif %}
<div class="form-group">
<label class="form-label" for="id_username">用户名/真实姓名</label>
<input type="text" name="username" id="id_username" class="form-input" placeholder="请输入中文姓名" autofocus required>
</div>
<div class="form-group">
<label class="form-label" for="id_password">密码</label>
<input type="password" name="password" id="id_password" class="form-input" placeholder="请输入密码" required>
<input type="hidden" name="next" value="{{ next }}">
</div>
<button type="submit" class="submit-btn">登录</button>
</form>
<!-- 注册链接 -->
<div class="register-link">
<span>还没有账号?</span>
<a href="{% url 'admin_register' %}">立即注册</a>
</div>
</div>
</div>
<script>
// 创建动态粒子
function createParticles() {
const container = document.getElementById('particles');
const particleCount = 50;
for (let i = 0; i < particleCount; i++) {
const particle = document.createElement('div');
particle.className = 'particle';
particle.style.left = Math.random() * 100 + '%';
particle.style.animationDelay = Math.random() * 15 + 's';
particle.style.animationDuration = (Math.random() * 10 + 10) + 's';
particle.style.width = (Math.random() * 4 + 2) + 'px';
particle.style.height = particle.style.width;
container.appendChild(particle);
}
}
createParticles();
</script>
</body>
</html>