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

View File

@@ -30,6 +30,8 @@ export default function MarkdownBodyClient({
}: MarkdownBodyClientProps) {
const segs = splitContentSegments(content || "");
const mdComponents = mergeMarkdownComponents(components);
// 时间线/隐藏块正文不套外层 heading 覆盖,避免预览与正文目录 id 错位
const nestedMd = mergeMarkdownComponents();
return (
<div className={className}>
@@ -49,7 +51,7 @@ export default function MarkdownBodyClient({
items={seg.items}
renderBody={(it) =>
it.body.trim() ? (
<ReactMarkdown remarkPlugins={[remarkGfm]} components={mdComponents}>
<ReactMarkdown remarkPlugins={[remarkGfm]} components={nestedMd}>
{it.body}
</ReactMarkdown>
) : null
@@ -74,7 +76,7 @@ export default function MarkdownBodyClient({
return (
<MdHideBlock key={`hide-${i}`} kind={kind} points={seg.points}>
{seg.body.trim() ? (
<ReactMarkdown remarkPlugins={[remarkGfm]} components={mdComponents}>
<ReactMarkdown remarkPlugins={[remarkGfm]} components={nestedMd}>
{seg.body}
</ReactMarkdown>
) : null}