feat: 公文三栏单页布局,并修复时间线目录跳转与样式

公告/单页对齐帖子详情三栏壳;时间线按日锚点可跳转,条目改为日志行并用暖金日期区分 feat 色。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-17 21:15:15 +08:00
parent a83276060f
commit 0b60c4299b
20 changed files with 1140 additions and 222 deletions

20
frontend/lib/pageGlyph.ts Normal file
View File

@@ -0,0 +1,20 @@
import {
BookOpen,
CircleHelp,
FileText,
Mail,
Scale,
Shield,
type LucideIcon,
} from "lucide-react";
/** 按 slug 语义选图标(关于本站目录 / 公文左栏共用) */
export function pageGlyph(slug: string): LucideIcon {
const s = slug.toLowerCase();
if (/privacy|隐私/.test(s)) return Shield;
if (/term|tos|协议|条款/.test(s)) return Scale;
if (/rule|守则|规范|公约/.test(s)) return BookOpen;
if (/contact|联系/.test(s)) return Mail;
if (/faq|help|帮助|问答/.test(s)) return CircleHelp;
return FileText;
}