115 lines
6.8 KiB
HTML
115 lines
6.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>管理面板 · lv8girl</title>
|
|
<style>
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
:root {
|
|
--bg: #0f0f1a;
|
|
--surface: #1a1a2f;
|
|
--surface-light: #252540;
|
|
--border: #2d2d4a;
|
|
--text: #e0e0f0;
|
|
--text-soft: #b0b0d0;
|
|
--text-hint: #8080a0;
|
|
--primary: #c5a572;
|
|
--primary-light: #d4b78c;
|
|
--accent: #a58e6d;
|
|
--gradient: linear-gradient(135deg, #c5a572, #9a7e5a);
|
|
--sidebar-width: 220px;
|
|
}
|
|
body { background: var(--bg); color: var(--text); font-family: -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif; line-height: 1.6; }
|
|
.admin-wrapper { display: flex; min-height: 100vh; }
|
|
.sidebar { width: var(--sidebar-width); background: var(--surface); border-right: 1px solid var(--border); padding: 20px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
|
|
.sidebar-header { padding: 0 20px 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
|
|
.sidebar-header .logo { font-size: 1.6rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 5px; }
|
|
.sidebar-header p { color: var(--text-soft); font-size: 0.85rem; }
|
|
.sidebar-menu { list-style: none; }
|
|
.sidebar-menu li { margin: 5px 0; }
|
|
.sidebar-menu a { display: block; padding: 10px 20px; color: var(--text-soft); text-decoration: none; transition: 0.2s; border-left: 4px solid transparent; }
|
|
.sidebar-menu a:hover, .sidebar-menu a.active { background: var(--surface-light); border-left-color: var(--primary); color: var(--primary); }
|
|
.sidebar-menu .separator { height: 1px; background: var(--border); margin: 15px 20px; }
|
|
.main-content { flex: 1; padding: 20px 30px; }
|
|
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
|
|
.page-title { font-size: 1.8rem; font-weight: 600; color: var(--primary); }
|
|
.user-info { display: flex; align-items: center; gap: 15px; }
|
|
.user-info span { background: var(--surface-light); padding: 6px 16px; border-radius: 30px; color: var(--text); }
|
|
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
|
|
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
|
|
.stat-number { font-size: 2.5rem; font-weight: 700; color: var(--primary); line-height: 1.2; margin-bottom: 4px; }
|
|
.stat-label { color: var(--text-hint); font-size: 0.95rem; }
|
|
.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
|
|
table { width: 100%; border-collapse: collapse; }
|
|
th { background: var(--surface-light); padding: 12px 15px; text-align: left; font-weight: 600; color: var(--primary); border-bottom: 1px solid var(--border); }
|
|
td { padding: 12px 15px; border-bottom: 1px solid var(--border); color: var(--text-soft); }
|
|
tr:last-child td { border-bottom: none; }
|
|
tr:hover { background: var(--surface-light); }
|
|
.actions a { margin-right: 10px; color: var(--text-hint); text-decoration: none; }
|
|
.actions a:hover { color: var(--primary); }
|
|
.actions .delete { color: #ff6b6b; }
|
|
.actions .delete:hover { color: #ff4d4d; }
|
|
.actions .approve { color: var(--primary); }
|
|
.actions .approve:hover { color: var(--primary-light); }
|
|
.message { background: var(--surface-light); border-left: 4px solid var(--primary); padding: 12px 20px; margin-bottom: 20px; border-radius: 8px; color: var(--text); }
|
|
@media (max-width: 768px) { .admin-wrapper { flex-direction: column; } .sidebar { width: 100%; height: auto; position: static; } }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="admin-wrapper">
|
|
<aside class="sidebar">
|
|
<div class="sidebar-header">
|
|
<div class="logo">lv8girl</div>
|
|
<p>管理面板</p>
|
|
</div>
|
|
<ul class="sidebar-menu">
|
|
<li><a href="/admin" class="{{if eq .Page "dashboard"}}active{{end}}">📊 仪表盘</a></li>
|
|
<li><a href="/admin/pending_posts" class="{{if eq .Page "pending_posts"}}active{{end}}">⏳ 待审核帖子</a></li>
|
|
<li><a href="/admin/pending_users" class="{{if eq .Page "pending_users"}}active{{end}}">👥 待审核用户</a></li>
|
|
<li><a href="/admin/posts" class="{{if eq .Page "posts"}}active{{end}}">📝 帖子管理</a></li>
|
|
<li><a href="/admin/users" class="{{if eq .Page "users"}}active{{end}}">👥 用户管理</a></li>
|
|
<li><a href="/admin/comments" class="{{if eq .Page "comments"}}active{{end}}">💬 评论管理</a></li>
|
|
<li class="separator"></li>
|
|
<li><a href="/">🏠 返回首页</a></li>
|
|
</ul>
|
|
</aside>
|
|
|
|
<main class="main-content">
|
|
<div class="top-bar">
|
|
<h1 class="page-title">仪表盘</h1>
|
|
<div class="user-info"><span>{{.Username}}</span></div>
|
|
</div>
|
|
{{if .Message}}<div class="message">{{.Message}}</div>{{end}}
|
|
|
|
<div class="stats-grid">
|
|
<div class="stat-card">
|
|
<div class="stat-number">{{.Stats.Posts}}</div>
|
|
<div class="stat-label">帖子总数</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-number">{{.Stats.Users}}</div>
|
|
<div class="stat-label">注册用户</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-number">{{.Stats.Comments}}</div>
|
|
<div class="stat-label">评论总数</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-number">{{.Stats.Likes}}</div>
|
|
<div class="stat-label">点赞总数</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-number">{{.Stats.Online}}</div>
|
|
<div class="stat-label">实时在线</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-number">{{.Stats.Pending}}</div>
|
|
<div class="stat-label">待审核帖子</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
</body>
|
|
</html>
|