修复深色主题对比度:副标题#9ca3af(7.6:1) 标签#cbd5e0(13:1) 输入框背景#1a1d2b边框#4b5563(2.56:1) 卡片边框#374151

This commit is contained in:
Your Name
2026-07-16 22:20:24 +08:00
parent 92a0d60198
commit 6504726431
2 changed files with 14 additions and 9 deletions
+7 -5
View File
@@ -109,21 +109,23 @@ def _render_login():
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body{background:#0b0e14;color:#e2e8f0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}
.card{background:#161922;border:1px solid #1f2335;border-radius:.75rem}
.form-control{background:#0b0e14;border:1px solid #1f2335;color:#e2e8f0;border-radius:.5rem}
.form-control:focus{border-color:#818cf8;box-shadow:0 0 0 3px rgba(129,140,248,.15);background:#0b0e14;color:#e2e8f0}
.card{background:#161922;border:1px solid #374151;border-radius:.75rem}
.form-control{background:#1a1d2b;border:1px solid #4b5563;color:#e2e8f0;border-radius:.5rem}
.form-control:focus{border-color:#818cf8;box-shadow:0 0 0 3px rgba(129,140,248,.15);background:#1a1d2b;color:#e2e8f0}
.btn-primary{background:#818cf8;border-color:#818cf8;border-radius:.5rem}
.btn-primary:hover{background:#6366f1;border-color:#6366f1}
h4{color:#818cf8;font-weight:700}
.form-label{color:#cbd5e0 !important;font-size:13px;font-weight:500}
.card .text-muted{color:#9ca3af !important}
</style></head>
<body class="d-flex align-items-center justify-content-center" style="min-height:100vh">
<div class="card shadow-lg p-5" style="width:380px">
<h4 class="text-center mb-2">SOCKS Manager</h4>
<p class="text-center text-muted small mb-4">SOCKS5 代理管理平台</p>
<form method="post">
<div class="mb-3"><label class="form-label text-muted small">用户名</label>
<div class="mb-3"><label class="form-label small">用户名</label>
<input name="username" class="form-control" value="admin" autofocus required></div>
<div class="mb-4"><label class="form-label text-muted small">密码</label>
<div class="mb-4"><label class="form-label small">密码</label>
<input name="password" type="password" class="form-control" required></div>
<button type="submit" class="btn btn-primary w-100">登 录</button>
</form>
+7 -4
View File
@@ -11,7 +11,7 @@
/* ── 全局 ─────────────────────────────────────────────────────── */
:root {
--bg-primary:#0b0e14; --bg-secondary:#161922; --bg-tertiary:#1e2235;
--border:#1f2335; --text:#e2e8f0; --text-muted:#c8d6e5;
--border:#374151; --text:#e2e8f0; --text-muted:#9ca3af;
--accent:#818cf8; --accent-hover:#6366f1;
--green:#10b981; --red:#ef4444; --yellow:#f59e0b; --gray:#6b7280;
--card-bg:#161922; --input-bg:#0b0e14;
@@ -62,11 +62,10 @@ a:hover { color:var(--accent-hover); }
.table-dark { background:var(--card-bg); }
/* ── 表单 ─────────────────────────────────────────────────────── */
.form-label { color:var(--text-muted); font-size:13px; margin-bottom:.3rem; font-weight:500; }
.form-control, .form-select { background:var(--input-bg); border:1px solid var(--border);
.form-control, .form-select { background:#1a1d2b; border:1px solid #4b5563;
color:var(--text); border-radius:.4rem; font-size:14px; padding:.5rem .7rem; }
.form-control:focus, .form-select:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(129,140,248,.12);
background:var(--input-bg); color:var(--text); }
background:#1a1d2b; color:var(--text); }
.form-control::placeholder { color:#5a6178; }
.form-text { color:var(--text-muted); font-size:12px; }
.form-check-input { background-color:var(--input-bg); border-color:var(--border); }
@@ -143,6 +142,10 @@ code { background:var(--bg-tertiary); color:var(--accent); padding:.15rem .4rem;
::-webkit-scrollbar-track { background:var(--bg-primary); }
::-webkit-scrollbar-thumb { background:var(--border); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:var(--gray); }
/* ── 覆盖 Bootstrap text-muted 提高深色背景对比度 ─────────────── */
.text-muted { color:var(--text-muted) !important; }
.form-label { color:#cbd5e0 !important; font-size:13px; margin-bottom:.3rem; font-weight:500; }
</style>
{% block extra_style %}{% endblock %}
</head>