bededec29c
服务页(/services): - lg+ 双栏:左列服务菜单(NO.01-07,点击选中)、右列表单 (sticky 跟随);移动端保持上下堆叠 滑块验证码 v2(防机械脚本): - 答案坐标不再下发:缺口位置由服务端烘进 PNG(lib/captchaImage 自绘点阵底图 + 拼块裁片,lib/pngEncoder 纯 TS PNG 编码器, node:zlib 零依赖),脚本必须做图像识别才能定位 - 行为轨迹校验:拖动采样提交服务端,样本数 ≥6、总时长 ≥1.2s、 单调时间戳、峰值速度 > 平均×1.8(匀速直线 = 拒)、末点 ≈ 答案 - 位置容差 ±10px;失败 5 次作废;挑战 10 分钟过期 - IP 指纹(哈希)限流:challenge 15/10min、verify 30/10min、 咨询提交 3/小时;蜜罐字段(website)命中静默丢弃 端到端:无轨迹/匀速直线/超短时长均拒;真人节奏通过;重放拦截; 蜜罐丢弃;第 14 次刷 challenge 起 429;SMTP 真发正常。
90 lines
3.1 KiB
TypeScript
90 lines
3.1 KiB
TypeScript
import SmoothScroller from "@/components/dom/SmoothScroller";
|
||
import Header from "@/components/dom/Header";
|
||
import BackgroundGrid from "@/components/dom/BackgroundGrid";
|
||
import CustomScrollbar from "@/components/dom/CustomScrollbar";
|
||
import { HeroScene } from "@/components/canvas/HeroScene";
|
||
import { PasscodeAccessProvider } from "@/components/dom/PasscodeAccess";
|
||
import { FullscreenTransitionProvider } from "@/lib/routeTransition";
|
||
import RouteTransitionOverlay from "@/components/dom/RouteTransitionOverlay";
|
||
import { getPasscodeAccessServer } from "@/lib/passcodeServer";
|
||
import { getSiteConfig } from "@/lib/siteConfig";
|
||
import { SITE_URL } from "@/lib/siteUrl";
|
||
import type { Metadata } from "next";
|
||
|
||
/**
|
||
* (site) 布局 — 公开站点的完整壳层:WebGL 画布、网格、平滑滚动、
|
||
* Header、路由过渡。/virtheart 后台不套用此壳层(纯净布局)。
|
||
* 站点文案从 site_config 读出后以 props 下发(Header 品牌/版权、
|
||
* 自我介绍槽位等),后台改完即时生效。
|
||
*/
|
||
export async function generateMetadata(): Promise<Metadata> {
|
||
const config = getSiteConfig();
|
||
const title = config.site_title;
|
||
const description = config.site_description;
|
||
return {
|
||
metadataBase: new URL(SITE_URL),
|
||
title: {
|
||
default: title,
|
||
template: `%s · ${config.brand_name || "北极新一"}`,
|
||
},
|
||
description,
|
||
keywords: config.seo_keywords
|
||
? config.seo_keywords.split(/[,,]/).map((k) => k.trim()).filter(Boolean)
|
||
: undefined,
|
||
verification: config.search_verification
|
||
? { other: { "baidu-site-verification": config.search_verification } }
|
||
: undefined,
|
||
alternates: { canonical: "/" },
|
||
icons: {
|
||
icon: [
|
||
{ url: "/icon.png", sizes: "192x192", type: "image/png" },
|
||
{ url: "/favicon.ico", sizes: "any" },
|
||
],
|
||
apple: "/apple-icon.png",
|
||
},
|
||
openGraph: {
|
||
type: "website",
|
||
siteName: config.brand_name || "北极新一",
|
||
title,
|
||
description,
|
||
url: SITE_URL,
|
||
locale: "zh_CN",
|
||
images: [{ url: "/og.png", width: 1200, height: 630, alt: title }],
|
||
},
|
||
twitter: {
|
||
card: "summary_large_image",
|
||
title,
|
||
description,
|
||
images: ["/og.png"],
|
||
},
|
||
};
|
||
}
|
||
|
||
export default async function SiteLayout({
|
||
children,
|
||
}: Readonly<{
|
||
children: React.ReactNode;
|
||
}>) {
|
||
const [initialAccess, config] = await Promise.all([
|
||
getPasscodeAccessServer(),
|
||
Promise.resolve(getSiteConfig()),
|
||
]);
|
||
return (
|
||
<PasscodeAccessProvider initialAccess={initialAccess}>
|
||
<FullscreenTransitionProvider>
|
||
{/* Original stacking (1:1): the WebGL canvas host is a plain `fixed`
|
||
z-auto element first in the body; the grid overlay (z-20) comes
|
||
AFTER it in DOM order so it paints above the canvas, exactly like
|
||
the original's main > canvas + z-20 grid sibling. */}
|
||
<HeroScene />
|
||
<BackgroundGrid />
|
||
<SmoothScroller />
|
||
<Header brandName={config.brand_name} copyrightName={config.copyright_name} />
|
||
{children}
|
||
<CustomScrollbar />
|
||
<RouteTransitionOverlay />
|
||
</FullscreenTransitionProvider>
|
||
</PasscodeAccessProvider>
|
||
);
|
||
}
|