feat: 移除「关于本站」按钮与功能
- PublicLayout: 删除桌面导航/下拉菜单/页脚三处入口及空页脚,移除 about 导航类型与判断 - App: 移除 /about 路由及 AboutPage 引入 - 删除 pages/About 页面 - DocumentMeta: 移除 /about 的 meta 处理与 about 描述文案(中/英) - i18n: 移除 aboutTitle / aboutIntro / footerAbout(中/英) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -11,7 +11,6 @@ import { OfficialRecommendationsPage } from "./pages/OfficialRecommendations";
|
|||||||
import { SearchPage } from "./pages/Search";
|
import { SearchPage } from "./pages/Search";
|
||||||
import { PostRedirect } from "./pages/PostRedirect";
|
import { PostRedirect } from "./pages/PostRedirect";
|
||||||
import { ScrollToTop } from "./components/ScrollToTop";
|
import { ScrollToTop } from "./components/ScrollToTop";
|
||||||
import { AboutPage } from "./pages/About";
|
|
||||||
import Favorites from "./pages/Favorites";
|
import Favorites from "./pages/Favorites";
|
||||||
import { adminUiPrefix } from "./adminPaths";
|
import { adminUiPrefix } from "./adminPaths";
|
||||||
import { AdminRouteTree } from "./adminRouteTree";
|
import { AdminRouteTree } from "./adminRouteTree";
|
||||||
@@ -46,7 +45,6 @@ export default function App() {
|
|||||||
/>
|
/>
|
||||||
<Route path="/search" element={<SearchPage />} />
|
<Route path="/search" element={<SearchPage />} />
|
||||||
<Route path="/resource/:id" element={<PostRedirect />} />
|
<Route path="/resource/:id" element={<PostRedirect />} />
|
||||||
<Route path="/about" element={<AboutPage />} />
|
|
||||||
<Route path="/favorites" element={<Favorites />} />
|
<Route path="/favorites" element={<Favorites />} />
|
||||||
</Route>
|
</Route>
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ const descriptions: Record<Lang, Record<string, string>> = {
|
|||||||
"按分类探索 ARK 官方资料,快速定位所需教材、公告、视频、图片与文件。",
|
"按分类探索 ARK 官方资料,快速定位所需教材、公告、视频、图片与文件。",
|
||||||
official: "查看 ARK 官方推荐资料,获取优先整理的重点内容与可信资源。",
|
official: "查看 ARK 官方推荐资料,获取优先整理的重点内容与可信资源。",
|
||||||
favorites: "收藏功能开发中,未来可在这里集中管理常用 ARK 资料。",
|
favorites: "收藏功能开发中,未来可在这里集中管理常用 ARK 资料。",
|
||||||
about: "了解 ARK 资料库的用途、资料范围与本站索引说明。",
|
|
||||||
search: "在 ARK 资料库中搜索标题、分类、标签、简介、文件类型与正文内容。",
|
search: "在 ARK 资料库中搜索标题、分类、标签、简介、文件类型与正文内容。",
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
@@ -28,8 +27,6 @@ const descriptions: Record<Lang, Record<string, string>> = {
|
|||||||
"View official ARK recommendations and prioritized trusted resources.",
|
"View official ARK recommendations and prioritized trusted resources.",
|
||||||
favorites:
|
favorites:
|
||||||
"Favorites are in development and will help you manage commonly used ARK resources.",
|
"Favorites are in development and will help you manage commonly used ARK resources.",
|
||||||
about:
|
|
||||||
"Learn about the ARK Library purpose, resource scope, and indexing notes.",
|
|
||||||
search:
|
search:
|
||||||
"Search ARK Library titles, categories, tags, summaries, file types, and body text.",
|
"Search ARK Library titles, categories, tags, summaries, file types, and body text.",
|
||||||
},
|
},
|
||||||
@@ -136,13 +133,6 @@ function routeMeta(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pathname === "/about") {
|
|
||||||
return {
|
|
||||||
title: t("footerAbout"),
|
|
||||||
description: metaDescription(lang, "about"),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return { title: t("brand"), description: metaDescription(lang, "home") };
|
return { title: t("brand"), description: metaDescription(lang, "home") };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -122,10 +122,6 @@ const zhDict: Dict = {
|
|||||||
resourceLangFilter: "资料语言",
|
resourceLangFilter: "资料语言",
|
||||||
filterTagClear: "清除标签",
|
filterTagClear: "清除标签",
|
||||||
filterLanguageAll: "全部语言",
|
filterLanguageAll: "全部语言",
|
||||||
aboutTitle: "关于本站",
|
|
||||||
aboutIntro:
|
|
||||||
"ARK 数据库汇总官方教材、公告、视频与常用文件,帮助社区快速获取一致版本的可信内容。\n\n本站仅供展示与索引;权利归属以官方公告为准。",
|
|
||||||
footerAbout: "关于本站",
|
|
||||||
footerAdminLogin: "管理员登录",
|
footerAdminLogin: "管理员登录",
|
||||||
adminSearchLogs: "搜索记录",
|
adminSearchLogs: "搜索记录",
|
||||||
adminMetricShares: "分享",
|
adminMetricShares: "分享",
|
||||||
@@ -254,10 +250,6 @@ const enDict: Dict = {
|
|||||||
resourceLangFilter: "Resource language",
|
resourceLangFilter: "Resource language",
|
||||||
filterTagClear: "Clear tag",
|
filterTagClear: "Clear tag",
|
||||||
filterLanguageAll: "All languages",
|
filterLanguageAll: "All languages",
|
||||||
aboutTitle: "About this site",
|
|
||||||
aboutIntro:
|
|
||||||
"The ARK library brings together official decks, announcements, videos, and common files so the community can find consistent, trustworthy versions quickly.\n\nThis site is for discovery and indexing only; rights remain with official notices.",
|
|
||||||
footerAbout: "About",
|
|
||||||
footerAdminLogin: "Admin sign-in",
|
footerAdminLogin: "Admin sign-in",
|
||||||
adminSearchLogs: "Search logs",
|
adminSearchLogs: "Search logs",
|
||||||
adminMetricShares: "Shares",
|
adminMetricShares: "Shares",
|
||||||
|
|||||||
@@ -17,8 +17,7 @@ type PublicNavWhich =
|
|||||||
| "browseLatest"
|
| "browseLatest"
|
||||||
| "browseRecommended"
|
| "browseRecommended"
|
||||||
| "browsePopular"
|
| "browsePopular"
|
||||||
| "favorites"
|
| "favorites";
|
||||||
| "about";
|
|
||||||
|
|
||||||
function navIsActive(
|
function navIsActive(
|
||||||
pathname: string,
|
pathname: string,
|
||||||
@@ -47,8 +46,6 @@ function navIsActive(
|
|||||||
return (
|
return (
|
||||||
pathname === "/favorites" || (pathname === "/" && hash === "#favorites")
|
pathname === "/favorites" || (pathname === "/" && hash === "#favorites")
|
||||||
);
|
);
|
||||||
case "about":
|
|
||||||
return pathname === "/about";
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -477,13 +474,6 @@ export function PublicLayout() {
|
|||||||
>
|
>
|
||||||
{t("favorites")}
|
{t("favorites")}
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
|
||||||
to="/about"
|
|
||||||
className={navClassName(na("about"))}
|
|
||||||
aria-current={na("about") ? "page" : undefined}
|
|
||||||
>
|
|
||||||
{t("footerAbout")}
|
|
||||||
</Link>
|
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div className="flex min-w-0 flex-1 items-center justify-end gap-2 min-[1200px]:flex-none">
|
<div className="flex min-w-0 flex-1 items-center justify-end gap-2 min-[1200px]:flex-none">
|
||||||
@@ -593,14 +583,6 @@ export function PublicLayout() {
|
|||||||
>
|
>
|
||||||
{t("favorites")}
|
{t("favorites")}
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
|
||||||
to="/about"
|
|
||||||
className={navClassName(na("about"))}
|
|
||||||
aria-current={na("about") ? "page" : undefined}
|
|
||||||
onClick={() => setOpen(false)}
|
|
||||||
>
|
|
||||||
{t("footerAbout")}
|
|
||||||
</Link>
|
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
</header>
|
</header>
|
||||||
@@ -637,19 +619,6 @@ export function PublicLayout() {
|
|||||||
</AnimatePresence>
|
</AnimatePresence>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer className="mt-auto bg-transparent md:border-t md:border-ark-line md:bg-ark-nav/90">
|
|
||||||
<div className="mx-auto flex h-[52px] max-w-[358px] items-center justify-center px-4 py-4 text-[13px] leading-5 md:h-auto md:max-w-[1280px] md:justify-start md:px-9 md:py-6 md:text-sm xl:px-0">
|
|
||||||
<Link
|
|
||||||
to="/about"
|
|
||||||
className={`rounded-sm outline-none hover:text-ark-gold2 focus-visible:ring-2 focus-visible:ring-ark-gold/80 focus-visible:ring-offset-2 focus-visible:ring-offset-ark-bg ${
|
|
||||||
na("about") ? "text-ark-gold" : "text-[#A8A9AE]"
|
|
||||||
}`}
|
|
||||||
>
|
|
||||||
{t("footerAbout")}
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<nav className="sticky inset-x-0 bottom-0 z-40 bg-[#0C0D0F]/90 backdrop-blur md:hidden">
|
<nav className="sticky inset-x-0 bottom-0 z-40 bg-[#0C0D0F]/90 backdrop-blur md:hidden">
|
||||||
<div className="grid h-[78px] grid-cols-4 gap-3 px-5 py-4 text-center text-[11px] leading-[17.6px]">
|
<div className="grid h-[78px] grid-cols-4 gap-3 px-5 py-4 text-center text-[11px] leading-[17.6px]">
|
||||||
<BottomNavIcon
|
<BottomNavIcon
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
import { useI18n } from "../../i18n";
|
|
||||||
import { Reveal } from "../../motion";
|
|
||||||
|
|
||||||
export function AboutPage() {
|
|
||||||
const { t } = useI18n();
|
|
||||||
return (
|
|
||||||
<div className="mx-auto max-w-2xl space-y-6">
|
|
||||||
<Reveal>
|
|
||||||
<h1 className="text-2xl font-bold">{t("aboutTitle")}</h1>
|
|
||||||
</Reveal>
|
|
||||||
<Reveal delay={0.08}>
|
|
||||||
<p className="text-neutral-300 leading-relaxed whitespace-pre-line">
|
|
||||||
{t("aboutIntro")}
|
|
||||||
</p>
|
|
||||||
</Reveal>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user