feat: 添加 FooterSection 组件,更新页面结构以包含联系信息;优化 ScrambleReveal 组件以支持反向字符揭示
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
"use client";
|
||||
|
||||
import ScrambleReveal from "@/components/dom/ScrambleReveal";
|
||||
|
||||
/**
|
||||
* #contact footer — 1:1 port of the original footer (chunk 2689132c4e070b68.js
|
||||
* module 28192):
|
||||
*
|
||||
* - `<footer id="contact">` fills the last viewport (h-dvh / lg:h-screen),
|
||||
* z-10 (below the fixed canvas at z-30, above the grid) 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 targets are placeholders — swap in VIRTHEART's real email
|
||||
* and social URLs.
|
||||
*/
|
||||
|
||||
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" },
|
||||
];
|
||||
|
||||
export default function FooterSection() {
|
||||
return (
|
||||
<footer
|
||||
id="contact"
|
||||
data-section="footer"
|
||||
className="z-30 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"
|
||||
style={{ fontVariationSettings: '"wdth" 120' }}
|
||||
>
|
||||
<ScrambleReveal
|
||||
text="Let's"
|
||||
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"
|
||||
className="col-span-6 md:col-span-5 xl:col-span-4 text-right pointer-events-auto"
|
||||
startDelayMs={300}
|
||||
reverse
|
||||
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"
|
||||
style={{ fontVariationSettings: '"wdth" 120' }}
|
||||
>
|
||||
<ScrambleReveal
|
||||
text="Something"
|
||||
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"
|
||||
style={{ fontVariationSettings: '"wdth" 120' }}
|
||||
>
|
||||
<ScrambleReveal
|
||||
text="Extraordinary"
|
||||
className="col-span-12 md:col-end-12 xl:col-end-11 text-right pointer-events-auto"
|
||||
startDelayMs={300}
|
||||
reverse
|
||||
scrambleColors={false}
|
||||
/>
|
||||
</div>
|
||||
<div className="absolute inset-0 flex flex-col justify-end px-4 lg:px-14 py-18 lg:py-24 font-mono-2 text-sm lg:text-base">
|
||||
<div className="flex lg:flex-row flex-col justify-between w-full">
|
||||
{/* TODO: replace with the real VIRTHEART contact address. */}
|
||||
<a className={dottedLink} href="mailto:hello@virtheart.com">
|
||||
<ScrambleReveal
|
||||
text="hello@virtheart.com"
|
||||
startDelayMs={300}
|
||||
scrambleColors={false}
|
||||
/>
|
||||
</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>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user