@@ -0,0 +1,267 @@
|
||||
import Link from "next/link";
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
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 { NavEmailCard } from "./nav-email-card";
|
||||
|
||||
const FALLBACK_LINE = "https://d81ub37cgqxo3.cloudfront.net";
|
||||
|
||||
const guides = [
|
||||
{ title: "使用方式", text: "优先使用线路一入口访问,如遇异常可切换线路2~3继续访问浏览。" },
|
||||
{ title: "为什么收藏本页", text: "最新地址会持续同步到本页,建议提前保存,避免入口变更后无法及时找回。" },
|
||||
];
|
||||
|
||||
const faqs = [
|
||||
{ title: "最新地址打不开怎么办?", text: "可刷新页面,或切换备用线路依次尝试访问。" },
|
||||
{ title: "为什么有多个访问地址?", text: "多个地址用于提升访问稳定性,方便异常时切换。" },
|
||||
{ title: "为什么有多个入口?", text: "均为站内分类内容入口,方便快速查找浏览" },
|
||||
{ title: "如何投稿或反馈问题?", text: "可通过页面底部联系方式提交投稿、合作或反馈。" },
|
||||
];
|
||||
|
||||
const notes = [
|
||||
"本页仅提供最新地址导航、地址找回与分类入口汇总。",
|
||||
"页面内各线路入口请以实际可访问情况为准。",
|
||||
"线路4为永久域名入口,需在特定网络环境下访问。",
|
||||
"页面展示的官方联系方式可用于投稿、合作咨询与问题反馈;用户也可加入官方交流群,查看最新内容、获取内容更新,并参与互动交流。",
|
||||
"如遇失效入口、页面异常或更新问题,请及时联系处理。",
|
||||
];
|
||||
|
||||
type Shortcut = { label: string; icon: string; href?: string; external?: boolean };
|
||||
|
||||
const panelClass =
|
||||
"flex flex-col gap-2 rounded-2xl bg-white/5 px-6 py-3 outline outline-1 -outline-offset-1 outline-white/5";
|
||||
|
||||
function hrefOf(value?: string | null) {
|
||||
const text = value?.trim();
|
||||
if (!text) return undefined;
|
||||
if (/^https?:\/\//i.test(text) || text.startsWith("mailto:")) return text;
|
||||
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;
|
||||
|
||||
return [
|
||||
{ title: "海角社区 精选全站导航中心-线路一", url: FALLBACK_LINE },
|
||||
{ title: "海角社区 精选全站导航中心-线路二", url: FALLBACK_LINE },
|
||||
{ title: "海角社区 精选全站导航中心-线路三", url: FALLBACK_LINE },
|
||||
{ title: "永久域名(VPN访问)", url: FALLBACK_LINE },
|
||||
];
|
||||
}
|
||||
|
||||
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,
|
||||
},
|
||||
config?.appAddr?.trim()
|
||||
? { label: "APP", icon: "/logo2.png", href: hrefOf(config.appAddr), external: true }
|
||||
: { label: "APP", icon: "/logo2.png" },
|
||||
{ label: "福利应用", icon: "/images/nav_flyy.svg", href: "/welfare" },
|
||||
];
|
||||
}
|
||||
|
||||
function AppBrand({ siteName }: { siteName?: string | null }) {
|
||||
const name = siteName?.trim() || "海角社区";
|
||||
return (
|
||||
<div className="flex items-center gap-3">
|
||||
<img src="/logo2.png" alt="" className="size-10 rounded-[7px]" />
|
||||
<div className="flex flex-col">
|
||||
<p className="text-base leading-[22px] font-semibold text-white">
|
||||
{name}
|
||||
<span className="ml-0.5 text-[#F12B9E]">APP</span>
|
||||
</p>
|
||||
<p className="text-xs leading-[18px] text-[#DCDCDC] lg:text-white/80">全网最全成人视频平台</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function SectionTitle({ children }: { children: ReactNode }) {
|
||||
return <h2 className="text-center text-lg leading-6 font-semibold text-white">{children}</h2>;
|
||||
}
|
||||
|
||||
function InfoPanel({ title, text, tone }: { title: string; text: string; tone: string }) {
|
||||
return (
|
||||
<div className={panelClass}>
|
||||
<h3 className="text-base leading-[22px] font-medium text-white">{title}</h3>
|
||||
<p className={`text-xs leading-[18px] font-medium ${tone}`}>{text}</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function ShortcutLink({ item }: { item: Shortcut }) {
|
||||
const className = "group flex flex-1 flex-col items-center gap-3";
|
||||
const content = (
|
||||
<>
|
||||
{item.href && item.icon !== "/logo2.png" ? (
|
||||
<span className="flex size-11 items-center justify-center rounded-full bg-white shadow-[0_0_12px_rgba(0,0,0,0.05)] transition-transform group-hover:scale-105">
|
||||
<span
|
||||
className="size-[22px] bg-[#525252] [mask-position:center] [mask-repeat:no-repeat] [mask-size:contain]"
|
||||
style={{ maskImage: `url(${item.icon})` }}
|
||||
/>
|
||||
</span>
|
||||
) : (
|
||||
<img
|
||||
src={item.icon}
|
||||
alt=""
|
||||
className="size-11 rounded-full bg-white object-cover transition-transform group-hover:scale-105"
|
||||
/>
|
||||
)}
|
||||
<span className="text-sm leading-5 text-white">{item.label}</span>
|
||||
</>
|
||||
);
|
||||
|
||||
if (!item.href) {
|
||||
return (
|
||||
<DownloadTrigger className={className} ariaLabel={item.label}>
|
||||
{content}
|
||||
</DownloadTrigger>
|
||||
);
|
||||
}
|
||||
if (item.external) {
|
||||
return (
|
||||
<a href={item.href} target="_blank" rel="noopener noreferrer" className={className}>
|
||||
{content}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<Link href={item.href} className={className}>
|
||||
{content}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
|
||||
export function NavPage({
|
||||
config,
|
||||
bottonTranslations,
|
||||
}: {
|
||||
config?: ConfigInfo | null;
|
||||
bottonTranslations?: AppTranslationInfo | null;
|
||||
}) {
|
||||
const lines = buildLines(config);
|
||||
const shortcuts = buildShortcuts(config);
|
||||
const siteName = config?.dhSiteName;
|
||||
const webAddr = config?.webAddr?.trim() || config?.foreverUrlAddr?.trim() || "https://haijiaosq.net";
|
||||
|
||||
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">
|
||||
<SeoBreadcrumb items={[{ name: "首页", href: "/" }, { name: "导航" }]} />
|
||||
<div aria-hidden="true" className="pointer-events-none absolute inset-0 overflow-hidden">
|
||||
<div className="absolute top-0 left-[180px] size-[130px] rounded-full bg-[#FFA24B]/80 blur-[100px] lg:hidden" />
|
||||
<div className="absolute top-0 left-0 h-[93px] w-[104px] rounded-full bg-[rgba(0,208,255,0.6)] blur-[100px] lg:hidden" />
|
||||
<div className="absolute -top-[50px] -left-[300px] hidden h-[630px] w-[706px] rounded-full bg-[#F92882]/60 blur-[200px] lg:block" />
|
||||
<div className="absolute -top-[320px] -right-[270px] hidden h-[630px] w-[706px] rounded-full bg-[#C0FF52]/40 blur-[200px] lg:block" />
|
||||
<div className="absolute top-[-200px] left-[30%] hidden h-[640px] w-[640px] rounded-full bg-[rgba(255,0,164,0.3)] blur-[200px] lg:block" />
|
||||
<div className="absolute top-[1500px] -right-[400px] hidden h-[590px] w-[700px] rounded-full bg-[#A057FF]/50 blur-[200px] lg:block" />
|
||||
</div>
|
||||
|
||||
<div className="relative mx-auto flex w-[calc(100%-48px)] max-w-[1700px] flex-col gap-8 pt-11 lg:w-[calc(100%-64px)] lg:pt-10">
|
||||
<header className="flex flex-col gap-6">
|
||||
<p className="flex items-center gap-2 text-xs leading-[18px] font-medium text-[#F12B9E]">
|
||||
<span className="size-1.5 rounded-full bg-[#F12B9E]" />
|
||||
HOT ENTERTAINMENT PORTAL
|
||||
</p>
|
||||
<h1>
|
||||
<AppBrand siteName={siteName} />
|
||||
</h1>
|
||||
<p className="text-sm leading-5 font-medium text-white">
|
||||
{config?.dhDescription?.trim() ||
|
||||
"现有线路1-4访问入口,高清线路及永久链接收藏,建议先查看线路器说明后进入对应入口,线路4用于长期收藏与链接拓展,访问前请开启VPN."}
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<nav aria-label="访问线路" className="flex flex-col gap-4">
|
||||
{lines.map((line) => (
|
||||
<a
|
||||
key={`${line.title}-${line.url}`}
|
||||
href={hrefOf(line.url)}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="flex flex-col items-center gap-2 rounded-xl p-3 text-center font-medium outline outline-1 -outline-offset-1 outline-[#F12B9E] transition-colors hover:bg-[#F12B9E]/20 lg:bg-[#F12B9E]/10"
|
||||
>
|
||||
<span className="text-sm leading-5 text-white">{line.title}</span>
|
||||
<span className="text-xs leading-[18px] break-all text-[#F12B9E] lg:text-sm lg:leading-5">{line.url}</span>
|
||||
</a>
|
||||
))}
|
||||
</nav>
|
||||
|
||||
<section className="flex flex-col gap-6">
|
||||
<SectionTitle>使用说明/防失联说明</SectionTitle>
|
||||
<div className="flex flex-col gap-8">
|
||||
<div className="grid gap-4 lg:grid-cols-2">
|
||||
{guides.map((item) => (
|
||||
<InfoPanel key={item.title} {...item} tone="text-[#989898] lg:text-[#BDBDBD]" />
|
||||
))}
|
||||
</div>
|
||||
<div className="flex items-center justify-between">
|
||||
{shortcuts.map((item) => (
|
||||
<ShortcutLink key={item.label} item={item} />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="flex flex-col gap-6">
|
||||
<SectionTitle>常见问题FAQ</SectionTitle>
|
||||
<div className="grid gap-4 lg:grid-cols-2">
|
||||
{faqs.map((item) => (
|
||||
<InfoPanel key={item.title} {...item} tone="text-[#989898]" />
|
||||
))}
|
||||
</div>
|
||||
<p className="text-sm leading-5 font-medium text-white">
|
||||
{notes.map((note, index) => (
|
||||
<span key={note}>
|
||||
{index > 0 ? <br /> : null}
|
||||
{note}
|
||||
</span>
|
||||
))}
|
||||
</p>
|
||||
<div className="relative flex flex-col gap-4 lg:gap-0">
|
||||
<img
|
||||
src="/images/way_home_xin.png"
|
||||
alt=""
|
||||
className="pointer-events-none absolute -top-[47px] -right-6 z-10 size-[107px] lg:right-3"
|
||||
/>
|
||||
<NavEmailCard gmailAddr={config?.gmailAddr} />
|
||||
<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
|
||||
</p>
|
||||
<p className="text-[#F12B9E]">本站只为海外华人提供服务 非法律允许地区以及18岁以下用户禁止访问!</p>
|
||||
</footer>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div className="relative mt-4 lg:hidden">
|
||||
<MobileFooter bottonTranslations={bottonTranslations} config={config} />
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user