chore: 去掉未上线前的旧兼容垫片,板块流收口到首页

鉴权只认 cookie、SEO 只走 Next、sort 与推荐对齐;删除 Bearer、Go sitemap、post_type 回填等冗余路径。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-16 05:04:47 +08:00
parent 0e61a14ea3
commit 833bcd33a1
33 changed files with 715 additions and 548 deletions

View File

@@ -2,7 +2,7 @@
import Link from "next/link";
import { useSearchParams } from "next/navigation";
import { PenSquare, Home, ChevronRight } from "lucide-react";
import { PenSquare, Home } from "lucide-react";
import type { BoardWithCount, User } from "@/lib/api";
// 首页壳内板块切换:仅替换中栏帖子流,不离开工作台
@@ -34,26 +34,14 @@ export function WorkspaceNav({ boards }: { boards: BoardWithCount[]; user?: User
</Link>
</div>
{/* 板块目录:标题可点击进入板块汇总列表页(/boards);
下方板块卡片点击不离开工作台,仅在中栏筛选该板块帖子流 */}
{/* 板块目录:纯分区标题;下方卡片仅在中栏筛选该板帖子流 */}
<div>
<Link
href="/boards"
className="group px-1 mb-2 flex items-center justify-between text-[11.5px] font-medium tracking-[0.08em] uppercase text-[var(--ink-3)] hover:text-[var(--accent)] transition-colors"
aria-label="进入板块目录列表页"
>
<span className="flex items-center">
<span>板块目录</span>
<ChevronRight
size={12}
className="ml-0.5 opacity-0 -translate-x-0.5 group-hover:opacity-100 group-hover:translate-x-0 transition-all"
aria-hidden="true"
/>
</span>
<div className="px-1 mb-2 flex items-center justify-between text-[11.5px] font-medium tracking-[0.08em] uppercase text-[var(--ink-3)]">
<span>板块目录</span>
{boards.length > 0 && (
<span className="tracking-normal tabular-nums">{boards.length} 个</span>
)}
</Link>
</div>
<div className="space-y-2">
{boards.map((b, i) => (
<Link