feat: 关于本站对齐站点公告,增加全部与管理入口
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
32
frontend/components/site-doc/AboutSiteHeader.tsx
Normal file
32
frontend/components/site-doc/AboutSiteHeader.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
import Link from "next/link";
|
||||
import { Info } from "lucide-react";
|
||||
|
||||
const linkClass =
|
||||
"meta text-[12px] font-normal transition-colors hover:text-[var(--accent)]";
|
||||
|
||||
/** 关于本站模块标题栏:与站点公告一致,全员「全部」、管理员另见「管理」 */
|
||||
export default function AboutSiteHeader({
|
||||
title = "关于本站",
|
||||
canManage,
|
||||
}: {
|
||||
title?: string;
|
||||
canManage?: boolean;
|
||||
}) {
|
||||
return (
|
||||
<div className="flex items-center justify-between gap-2 shrink-0">
|
||||
<p className="j13-module-title !mb-0">
|
||||
<Info size={15} style={{ color: "var(--accent)" }} /> {title}
|
||||
</p>
|
||||
<span className="inline-flex items-center gap-2 shrink-0">
|
||||
<Link href="/about" className={linkClass}>
|
||||
全部
|
||||
</Link>
|
||||
{canManage ? (
|
||||
<Link href="/admin/pages" className={linkClass}>
|
||||
管理
|
||||
</Link>
|
||||
) : null}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user