refactor(frontend): 重构站点数据面板与签到组件

将原有的站点统计卡片重构为bento布局样式,把签到组件内嵌到站点数据面板中,统一UI风格并简化代码结构
This commit is contained in:
2026-09-14 01:15:59 +08:00
parent 996a870015
commit e8882664fb
4 changed files with 202 additions and 117 deletions

View File

@@ -605,6 +605,101 @@ h1, h2, h3, h4 {
white-space: nowrap;
}
/* 站点数据 bento 统计瓦片 */
.j13-pulse {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
}
.j13-pulse-cell {
min-width: 0;
padding: 11px 12px 10px;
background: var(--panel-2);
border: 1px solid var(--line);
border-radius: var(--r-sm);
}
.j13-pulse-lab {
display: flex;
align-items: center;
gap: 5px;
font-size: 11.5px;
color: var(--ink-3);
white-space: nowrap;
}
.j13-pulse-num {
margin-top: 6px;
font-size: 21px;
font-weight: 800;
line-height: 1.05;
letter-spacing: -0.015em;
color: var(--ink);
font-variant-numeric: tabular-nums;
}
.j13-pulse-foot {
display: flex;
align-items: center;
gap: 3px;
margin-top: 6px;
font-size: 10.5px;
line-height: 1;
color: var(--ink-3);
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.j13-pulse-foot.is-up {
color: var(--ok);
font-weight: 600;
}
.j13-pulse-dot {
position: relative;
width: 6px;
height: 6px;
border-radius: 9999px;
background: var(--ok);
flex-shrink: 0;
}
.j13-pulse-dot::after {
content: "";
position: absolute;
inset: -3px;
border-radius: 9999px;
background: var(--ok);
opacity: 0.4;
animation: j13-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes j13-ping {
0% { transform: scale(0.6); opacity: 0.5; }
70%, 100% { transform: scale(1.9); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
.j13-pulse-dot::after {
animation: none;
opacity: 0.25;
}
}
/* 卡内签到条:分隔线 + 紧凑按钮 */
.j13-pulse-checkin {
margin-top: 10px;
padding-top: 11px;
border-top: 1px solid var(--line);
}
.j13-pulse-checkin-btn {
gap: 4px;
padding: 6px 11px;
font-size: 12px;
white-space: nowrap;
}
.j13-pulse-checkin-done {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 6px 11px;
border-radius: 9999px;
font-size: 12px;
font-weight: 600;
white-space: nowrap;
}
/* 热门榜单 */
.j13-rank {
position: relative;

View File

@@ -201,6 +201,7 @@ export default async function HomePage({ searchParams }: HomePageProps) {
{overview && (
<div className="mt-6">
<CommunityPanelsMobile
stats={overview.stats}
hot={overview.hot}
activeUsers={overview.active_users}
announcements={overview.announcements}