feat: 北极新一中文个人站 — MiSans 分片字体 + 全站内容国内化
- 字体: cn-font-split 分片 MiSans(4字重×~88片, unicode-range 按需加载) 接入 --font-sans/--font-mono/--font-mono-2 栈尾; 修复 next/font 与 Tailwind @theme 变量重名导致的死规则(--font-geist-mono/--font-departure-mono) - 内容: 品牌名/首屏/关于/导航/页脚/滚动段/文章页 UI/解锁屏全部中文化; 元数据 title 北极新一©2026, lang=zh-CN; 日期中文格式 - 彩蛋: 品牌标签 TikTok→小红书(保留 char-code 混淆与口令机制), /2026 文案改为个人创作手记语境 - 页脚: 邮箱 + 抖音/微信/小红书; 有链接项点击新开主页, 全部支持悬停 二维码卡片(正方形白衬+object-contain 防变形); 无链接项(微信)点击弹 二维码浮层 - 移除原作者手写签名动画(AboutMedia) - 构建: cn-font-split devDependency + onlyBuiltDependencies 允许列表
This commit is contained in:
@@ -1,22 +1,20 @@
|
||||
"use client";
|
||||
|
||||
import { useCallback, useState } from "react";
|
||||
import ScrambleReveal from "@/components/dom/ScrambleReveal";
|
||||
|
||||
/**
|
||||
* #contact footer — 1:1 port of the original footer (chunk 2689132c4e070b68.js
|
||||
* module 28192):
|
||||
* #contact footer — ported from the original footer (chunk
|
||||
* 2689132c4e070b68.js module 28192),内容已中文化并替换为北极新一的联系方式:
|
||||
*
|
||||
* - `<footer id="contact">` fills the last viewport (h-dvh / lg:h-screen)
|
||||
* and carries `data-section="footer"` — SmoothScroller's sP f2 factor and
|
||||
* PostFX's bright-source gating both read this attribute.
|
||||
* - Headline: three 12-col grid rows at 6svw, "Let's / Create / Something /
|
||||
* Extraordinary"; "Create" and "Extraordinary" use reverse reveal (chars
|
||||
* run last→first).
|
||||
* - Bottom bar: mailto + Twitter/X / Figma / GitHub links with the dotted
|
||||
* hover border.
|
||||
*
|
||||
* NOTE: contact email is chenchun@virtheart.com (user-provided); social
|
||||
* URLs are still placeholders.
|
||||
* - Headline: 「让我们 / 创造 / 一些不凡的 / 数字作品」,
|
||||
* "创造" 与 "数字作品" 行用 reverse reveal(字符从末位向前)。
|
||||
* - Bottom bar: mailto + 抖音 / 微信 / 小红书:
|
||||
* - 抖音、小红书:点击新窗口打开主页链接;悬停显示二维码卡片。
|
||||
* - 微信:无链接,点击弹出二维码浮层(移动端无 hover 也能查看)。
|
||||
*/
|
||||
|
||||
const CONTACT_EMAIL = "chenchun@virtheart.com";
|
||||
@@ -24,13 +22,72 @@ const CONTACT_EMAIL = "chenchun@virtheart.com";
|
||||
const dottedLink =
|
||||
"block before:absolute relative before:inset-0 p-2 lg:hover:before:border-l1 before:border-2 before:border-transparent active:before:border-l1 before:border-dotted uppercase before:content-[''] before:transition-colors before:duration-200 cursor-pointer pointer-events-auto before:pointer-events-none";
|
||||
|
||||
const SOCIALS = [
|
||||
{ href: "#", label: "Twitter/X" },
|
||||
{ href: "#", label: "Figma" },
|
||||
{ href: "#", label: "GitHub" },
|
||||
type Social = {
|
||||
key: string;
|
||||
label: string;
|
||||
qr: string;
|
||||
href?: string;
|
||||
/** 无链接的条目(微信):点击弹出二维码浮层。 */
|
||||
qrOnly?: boolean;
|
||||
hint: string;
|
||||
};
|
||||
|
||||
const SOCIALS: Social[] = [
|
||||
{
|
||||
key: "douyin",
|
||||
label: "抖音",
|
||||
qr: "/img/douyin.png",
|
||||
href: "https://www.douyin.com/user/MS4wLjABAAAArYzCh3gIgSsDfQcN84MsMLoHFznc4wmNWJ5NsQR7T5naf21t-sCGc_tQdd4MV0zr",
|
||||
hint: "扫码或点击打开抖音主页",
|
||||
},
|
||||
{
|
||||
key: "wechat",
|
||||
label: "微信",
|
||||
qr: "/img/wechat.png",
|
||||
qrOnly: true,
|
||||
hint: "扫码添加微信",
|
||||
},
|
||||
{
|
||||
key: "xiaohongshu",
|
||||
label: "小红书",
|
||||
qr: "/img/xiaohongshu.jpg",
|
||||
href: "https://www.xiaohongshu.com/user/profile/6656326f0000000003033107",
|
||||
hint: "扫码或点击打开小红书主页",
|
||||
},
|
||||
];
|
||||
|
||||
function QrPreview({ social }: { social: Social }) {
|
||||
return (
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="bottom-full right-0 z-20 absolute mb-3 hidden flex-col items-center gap-2 lg:group-hover:flex"
|
||||
>
|
||||
<span className="flex w-44 flex-col items-center gap-2 bg-be p-3 shadow-[0_8px_32px_rgba(0,0,0,0.18)]">
|
||||
{/* 严格正方形的白色内衬 + object-contain:无论源图留白如何,
|
||||
二维码始终 1:1 完整显示,白底保证可扫。 */}
|
||||
<span className="block aspect-square w-full bg-white p-1.5">
|
||||
{/* eslint-disable-next-line @next/next/no-img-element -- 静态二维码 */}
|
||||
<img
|
||||
src={social.qr}
|
||||
alt=""
|
||||
width={152}
|
||||
height={152}
|
||||
className="block h-full w-full object-contain select-none"
|
||||
draggable={false}
|
||||
/>
|
||||
</span>
|
||||
<span className="text-xs normal-case text-l2 whitespace-nowrap">
|
||||
{social.hint}
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
export default function FooterSection() {
|
||||
const [activeQr, setActiveQr] = useState<Social | null>(null);
|
||||
const closeQr = useCallback(() => setActiveQr(null), []);
|
||||
|
||||
return (
|
||||
<footer
|
||||
id="contact"
|
||||
@@ -38,17 +95,17 @@ export default function FooterSection() {
|
||||
className="z-10 relative flex flex-col justify-center p-6 lg:p-16 w-full h-dvh lg:h-screen pointer-events-none"
|
||||
>
|
||||
<div
|
||||
className="gap-2 grid grid-cols-12 font-bold text-[7.2svw] lg:text-[6svw] 2xl:text-[5svw] xl:text-[5.6svw] uppercase leading-none"
|
||||
className="gap-2 grid grid-cols-12 font-bold text-[7.2svw] lg:text-[6svw] 2xl:text-[5svw] xl:text-[5.6svw] leading-none"
|
||||
style={{ fontVariationSettings: '"wdth" 120' }}
|
||||
>
|
||||
<ScrambleReveal
|
||||
text="Let's"
|
||||
text="让我们"
|
||||
className="col-span-6 md:col-span-5 xl:col-span-4 md:col-start-2 xl:col-start-3 text-left pointer-events-auto"
|
||||
startDelayMs={300}
|
||||
scrambleColors={false}
|
||||
/>
|
||||
<ScrambleReveal
|
||||
text="Create"
|
||||
text="创造"
|
||||
className="col-span-6 md:col-span-5 xl:col-span-4 text-right pointer-events-auto"
|
||||
startDelayMs={300}
|
||||
reverse
|
||||
@@ -56,22 +113,22 @@ export default function FooterSection() {
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="gap-2 grid grid-cols-12 font-bold text-[7.2svw] lg:text-[6svw] 2xl:text-[5svw] xl:text-[5.6svw] uppercase leading-none"
|
||||
className="gap-2 grid grid-cols-12 font-bold text-[7.2svw] lg:text-[6svw] 2xl:text-[5svw] xl:text-[5.6svw] leading-none"
|
||||
style={{ fontVariationSettings: '"wdth" 120' }}
|
||||
>
|
||||
<ScrambleReveal
|
||||
text="Something"
|
||||
text="一些不凡的"
|
||||
className="col-span-12 md:col-start-2 xl:col-start-3 text-left pointer-events-auto"
|
||||
startDelayMs={300}
|
||||
scrambleColors={false}
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="gap-2 grid grid-cols-12 font-bold text-[7.2svw] lg:text-[6svw] 2xl:text-[5svw] xl:text-[5.6svw] uppercase leading-none"
|
||||
className="gap-2 grid grid-cols-12 font-bold text-[7.2svw] lg:text-[6svw] 2xl:text-[5svw] xl:text-[5.6svw] leading-none"
|
||||
style={{ fontVariationSettings: '"wdth" 120' }}
|
||||
>
|
||||
<ScrambleReveal
|
||||
text="Extraordinary"
|
||||
text="数字作品"
|
||||
className="col-span-12 md:col-end-12 xl:col-end-11 text-right pointer-events-auto"
|
||||
startDelayMs={300}
|
||||
reverse
|
||||
@@ -88,24 +145,74 @@ export default function FooterSection() {
|
||||
/>
|
||||
</a>
|
||||
<div className="flex flex-row items-center gap-2 lg:gap-4">
|
||||
{/* TODO: replace with the real VIRTHEART social URLs. */}{SOCIALS.map(({ href, label }) => (
|
||||
<a
|
||||
key={label}
|
||||
className={dottedLink}
|
||||
href={href}
|
||||
target={href.startsWith("http") ? "_blank" : undefined}
|
||||
rel={href.startsWith("http") ? "noopener noreferrer" : undefined}
|
||||
>
|
||||
<ScrambleReveal
|
||||
text={label}
|
||||
startDelayMs={300}
|
||||
scrambleColors={false}
|
||||
/>
|
||||
</a>
|
||||
))}
|
||||
{SOCIALS.map((social) => {
|
||||
const inner = (
|
||||
<>
|
||||
<ScrambleReveal
|
||||
text={social.label}
|
||||
startDelayMs={300}
|
||||
scrambleColors={false}
|
||||
/>
|
||||
<QrPreview social={social} />
|
||||
</>
|
||||
);
|
||||
const groupCls = `${dottedLink} group relative`;
|
||||
if (social.href) {
|
||||
return (
|
||||
<a
|
||||
key={social.key}
|
||||
className={groupCls}
|
||||
href={social.href}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
aria-label={`${social.label}主页(新窗口打开)`}
|
||||
>
|
||||
{inner}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<button
|
||||
key={social.key}
|
||||
type="button"
|
||||
className={`${groupCls} text-left`}
|
||||
aria-label="微信 — 点击显示二维码"
|
||||
onClick={() => setActiveQr(social)}
|
||||
>
|
||||
{inner}
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 二维码浮层(微信等无链接条目;移动端无 hover 的兜底) */}
|
||||
{activeQr && (
|
||||
<div
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-label={`${activeQr.label}二维码`}
|
||||
className="inset-0 z-50 fixed flex justify-center items-center bg-b1/80 p-6 pointer-events-auto"
|
||||
onClick={closeQr}
|
||||
>
|
||||
<div className="flex flex-col items-center gap-4 bg-be p-8">
|
||||
<span className="block aspect-square w-64 bg-white p-2 sm:w-80">
|
||||
{/* eslint-disable-next-line @next/next/no-img-element -- 静态二维码 */}
|
||||
<img
|
||||
src={activeQr.qr}
|
||||
alt={`${activeQr.label}二维码`}
|
||||
width={288}
|
||||
height={288}
|
||||
className="block h-full w-full object-contain select-none"
|
||||
draggable={false}
|
||||
/>
|
||||
</span>
|
||||
<span className="text-sm text-l2">{activeQr.hint}</span>
|
||||
<span className="font-mono-2 text-xs text-l3">点击任意处关闭</span>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user