Add hero name fill animation
SVG text background of "Jonathan" in outline that slowly fills in on page load. Uses CSS fill-opacity animation (0 → 1 over 2s, 0.3s delay) so the stroke appears immediately and the fill bleeds in gradually. Light mode: zinc-200/300. Dark mode: zinc-800. Both stay recessive so the effect is atmospheric, not distracting. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+22
-1
@@ -2,7 +2,28 @@ import Link from 'next/link'
|
||||
|
||||
export default function Hero() {
|
||||
return (
|
||||
<section className="mx-auto flex min-h-[72vh] max-w-5xl flex-col items-center justify-center px-6 py-32 text-center">
|
||||
<section className="relative overflow-hidden mx-auto flex min-h-[72vh] max-w-5xl flex-col items-center justify-center px-6 py-32 text-center">
|
||||
|
||||
{/* Background name — outline fills in on load */}
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
className="pointer-events-none absolute inset-0 h-full w-full"
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
>
|
||||
<text
|
||||
x="50%"
|
||||
y="55%"
|
||||
textAnchor="middle"
|
||||
dominantBaseline="middle"
|
||||
fontFamily="var(--font-geist-sans), sans-serif"
|
||||
fontSize="22vw"
|
||||
fontWeight="700"
|
||||
strokeWidth="1"
|
||||
className="name-outline-fill"
|
||||
>
|
||||
Jonathan
|
||||
</text>
|
||||
</svg>
|
||||
|
||||
{/* Eyebrow label */}
|
||||
<div className="mb-10 flex items-center gap-4">
|
||||
|
||||
Reference in New Issue
Block a user