feat: 公文三栏单页布局,并修复时间线目录跳转与样式
公告/单页对齐帖子详情三栏壳;时间线按日锚点可跳转,条目改为日志行并用暖金日期区分 feat 色。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
20
frontend/lib/pageGlyph.ts
Normal file
20
frontend/lib/pageGlyph.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user