公开页补齐自引用 Canonical 与按类型的结构化数据,图片补上说明文字。
后台设置和内容编辑改成可导航布局;部署用访客 origin 生成 Canonical,避免落到容器地址。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,7 +10,7 @@ function realVersion(pkgVersion: string): string {
|
||||
return !pkgVersion || pkgVersion === "0.0.0" || pkgVersion === "0.1.0" ? "" : pkgVersion;
|
||||
}
|
||||
|
||||
// 极简页脚:版权 + 合规链接 + 实时性能指标
|
||||
// 极简页脚:左侧版权 / 版本 / 耗时,右侧备案等链接
|
||||
export default function Footer({
|
||||
siteName = "姜十三社区",
|
||||
links = [],
|
||||
@@ -20,6 +20,7 @@ export default function Footer({
|
||||
}) {
|
||||
const year = new Date().getFullYear();
|
||||
const brand = siteName.trim() || "姜十三社区";
|
||||
const visibleLinks = links.filter((item) => item.label.trim() && item.url.trim());
|
||||
|
||||
return (
|
||||
<footer
|
||||
@@ -29,10 +30,13 @@ export default function Footer({
|
||||
}}
|
||||
>
|
||||
<div className="max-w-[1440px] mx-auto px-4 sm:px-6 py-4 flex items-center justify-between gap-x-4 gap-y-2 flex-wrap">
|
||||
<span className="meta text-[12px] whitespace-nowrap">© {year} {brand}</span>
|
||||
{links.length > 0 ? (
|
||||
<nav aria-label="页脚链接" className="flex flex-wrap items-center gap-x-3 gap-y-1 min-w-0">
|
||||
{links.map((item) => (
|
||||
<div className="flex items-center gap-x-3 gap-y-1 flex-wrap min-w-0">
|
||||
<span className="meta text-[12px] whitespace-nowrap">© {year} {brand}</span>
|
||||
<FooterTiming version={realVersion(pkg.version)} />
|
||||
</div>
|
||||
{visibleLinks.length > 0 ? (
|
||||
<nav aria-label="页脚链接" className="flex flex-wrap items-center justify-end gap-x-3 gap-y-1 min-w-0 ml-auto">
|
||||
{visibleLinks.map((item) => (
|
||||
<a
|
||||
key={`${item.label}-${item.url}`}
|
||||
href={item.url}
|
||||
@@ -44,7 +48,6 @@ export default function Footer({
|
||||
))}
|
||||
</nav>
|
||||
) : null}
|
||||
<FooterTiming version={realVersion(pkg.version)} />
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user