feat(web): split video and up rankings and add about page

This commit is contained in:
kairee committed 2026-11-01 11:33:15 +08:00
1 parent 5a656d42a8
commit c0b0286395
9 files changed
+298 -98

No files matched your search

+6 -1
View File
@@ -46,7 +46,7 @@ export async function renderVideo(root, { params, query }) {
root.innerHTML = `<section class="page video-page">
<header class="page-head">
<a class="back-link" href="/rank?scope=video&sort=heat">← 返回榜单</a>
<a class="back-link" href="/videos">← 返回视频榜</a>
<div class="head-actions">
${detail.url ? `<a class="button ghost" href="${escapeAttr(detail.url)}" target="_blank" rel="noreferrer">打开 B 站</a>` : ""}
</div>
@@ -60,11 +60,13 @@ export async function renderVideo(root, { params, query }) {
${detail.up_mid ? `<a class="inline-link" href="/up/${detail.up_mid}">${escapeHtml(detail.up_name || "未知 UP")}</a>` : escapeHtml(detail.up_name || "未知 UP")}
<span>${escapeHtml(formatDate(detail.pubdate))}</span>
<span>${escapeHtml(formatDuration(detail.duration))}</span>
${detail.pages ? `<span>${formatNumber(detail.pages)} P</span>` : ""}
${detail.folder_title ? badge(detail.folder_title) : ""}
${badge(statusLabel(detail.status), `status-${detail.status}`)}
${samples < 2 ? badge("样本不足", "warning") : ""}
</div>
${detail.blacklisted ? `<p class="section-note warning-text">该 UP 在黑名单中;黑名单只影响未来发现,不影响当前视频追踪。</p>` : ""}
${detail.up_follower_backfilled ? `<p class="section-note">UP 粉丝数为回填值,不是真实的入库时点。</p>` : ""}
</div>
</div>
@@ -75,6 +77,9 @@ export async function renderVideo(root, { params, query }) {
<div><span>综合热度</span><strong>${formatScore(detail.heat)}</strong></div>
<div><span>全库百分位</span><strong>${detail.heat_percentile === null || detail.heat_percentile === undefined ? "—" : `前 ${Math.max(0, 100 - detail.heat_percentile).toFixed(0)}%`}</strong></div>
<div><span>播放日增</span><strong>${detail.growth?.available ? formatDelta(detail.growth.delta) : "—"}</strong></div>
<div><span>内容效率</span><strong>${detail.efficiency == null ? "—" : `${formatCount(detail.efficiency)}/小时`}</strong></div>
<div><span>互动效率</span><strong>${detail.interaction_efficiency == null ? "—" : `${formatCount(detail.interaction_efficiency)}/小时`}</strong></div>
<div><span>UP 粉丝(入库时)</span><strong>${formatCount(detail.up_follower)}</strong></div>
<div><span>快照数</span><strong>${samples}</strong></div>
<div><span>最近快照</span><strong>${escapeHtml(detail.snapshot_date || "—")}</strong></div>
</div>