整体UI调整

This commit is contained in:
谢宇宁
2026-10-26 19:51:59 +07:00
parent c8895f407c
commit eeb9986923
112 changed files with 1507 additions and 4255 deletions
+15 -38
View File
@@ -5,10 +5,9 @@ import { DownloadTrigger } from "@/components/download/download-trigger";
import { MobileFooter } from "@/components/layout/site-footer";
import { SeoBreadcrumb } from "@/components/seo/seo-breadcrumb";
import type { AppTranslationInfo, ConfigInfo } from "@/lib/api/types";
import { OFFICIAL_TG_URL, SITE_NAME, SITE_URL } from "@/lib/seo/metadata";
import { NavEmailCard } from "./nav-email-card";
const FALLBACK_LINE = "https://d81ub37cgqxo3.cloudfront.net";
import { NavTgCard } from "./nav-tg-card";
const guides = [
{ title: "使用方式", text: "优先使用线路一入口访问,如遇异常可切换线路2~3继续访问浏览。" },
@@ -42,41 +41,19 @@ function hrefOf(value?: string | null) {
return `https://${text}`;
}
function buildLines(config?: ConfigInfo | null) {
const site = config?.dhSiteName?.trim() || "海角社区";
const candidates = [
{ title: `${site} 精选全站导航中心-线路一`, url: config?.dhNewUrlAddr1 },
{ title: `${site} 精选全站导航中心-线路二`, url: config?.dhNewUrlAddr2 },
{ title: `${site} 精选全站导航中心-线路三`, url: config?.dhNewUrlAddr3 },
{ title: "永久域名(VPN访问)", url: config?.foreverUrlAddr },
]
.map((line) => ({ title: line.title, url: line.url?.trim() || "" }))
.filter((line) => line.url);
if (candidates.length) return candidates;
/** 线路固定本站域名,不取接口 dhNewUrlAddr* / foreverUrlAddr */
function buildLines() {
return [
{ title: "海角社区 精选全站导航中心-线路一", url: FALLBACK_LINE },
{ title: "海角社区 精选全站导航中心-线路二", url: FALLBACK_LINE },
{ title: "海角社区 精选全站导航中心-线路三", url: FALLBACK_LINE },
{ title: "永久域名(VPN访问)", url: FALLBACK_LINE },
{ title: `${SITE_NAME} 精选全站导航中心-线路一`, url: SITE_URL },
{ title: `${SITE_NAME} 精选全站导航中心-线路二`, url: SITE_URL },
{ title: `${SITE_NAME} 精选全站导航中心-线路三`, url: SITE_URL },
{ title: "永久域名(VPN访问)", url: SITE_URL },
];
}
function buildShortcuts(config?: ConfigInfo | null): Shortcut[] {
return [
{
label: "官方推特",
icon: "/images/nav_x.svg",
href: hrefOf(config?.twitterAddr) || "https://x.com/qimengshorts",
external: true,
},
{
label: "官方TG群",
icon: "/images/nav_tg.svg",
href: hrefOf(config?.tgGroup || config?.telegramAdd || config?.telegram) || "https://t.me/qimengshorts",
external: true,
},
{ label: "官方TG", icon: "/images/nav_tg.svg", href: OFFICIAL_TG_URL, external: true },
config?.appAddr?.trim()
? { label: "APP", icon: "/logo2.png", href: hrefOf(config.appAddr), external: true }
: { label: "APP", icon: "/logo2.png" },
@@ -85,7 +62,7 @@ function buildShortcuts(config?: ConfigInfo | null): Shortcut[] {
}
function AppBrand({ siteName }: { siteName?: string | null }) {
const name = siteName?.trim() || "海角社区";
const name = siteName?.trim() || "黄果黑料";
return (
<div className="flex items-center gap-3">
<img src="/logo2.png" alt="" className="size-10 rounded-[7px]" />
@@ -163,10 +140,10 @@ export function NavPage({
config?: ConfigInfo | null;
bottonTranslations?: AppTranslationInfo | null;
}) {
const lines = buildLines(config);
const lines = buildLines();
const shortcuts = buildShortcuts(config);
const siteName = config?.dhSiteName;
const webAddr = config?.webAddr?.trim() || config?.foreverUrlAddr?.trim() || "https://haijiaosq.net";
const siteName = SITE_NAME;
const webAddr = SITE_URL;
return (
<main data-component="nav-page" className="relative flex min-h-screen flex-1 flex-col overflow-hidden bg-black/70 text-white lg:bg-black/90">
@@ -247,11 +224,11 @@ export function NavPage({
alt=""
className="pointer-events-none absolute -top-[47px] -right-6 z-10 size-[107px] lg:right-3"
/>
<NavEmailCard gmailAddr={config?.gmailAddr} />
<NavTgCard />
<footer className="hidden flex-col items-center gap-6 py-6 text-center text-sm leading-5 font-medium lg:flex">
<AppBrand siteName={siteName} />
<p className="text-[#DCDCDC]">
2026 {siteName?.trim() || "海角社区"}精选全站导航中心 {webAddr} Inc. All Rights Reserved
2026 {siteName}精选全站导航中心 {webAddr} Inc. All Rights Reserved
</p>
<p className="text-[#F12B9E]">本站只为海外华人提供服务 非法律允许地区以及18岁以下用户禁止访问!</p>
</footer>