docs: add inline comments across components and hooks
This commit is contained in:
1 parent
e2c020a641
commit
f7770bb8af
9 files changed
+22
-9
No files matched your search
@@ -8,6 +8,7 @@ import bannerImg from "@/assets/banner.png";
|
||||
|
||||
const FULL_TEXT = "Xiaozhou's Website";
|
||||
|
||||
// Full-screen hero banner with parallax background, typewriter title, and nav cards
|
||||
export default function Banner() {
|
||||
const text = useTypewriter(FULL_TEXT, 100);
|
||||
const parallaxRef = useParallax(0.25);
|
||||
@@ -21,11 +22,13 @@ export default function Banner() {
|
||||
backgroundSize: "cover",
|
||||
}}
|
||||
>
|
||||
{/* Dark overlay for text readability */}
|
||||
<div className="absolute inset-0 bg-black/45 pointer-events-none" />
|
||||
|
||||
<Header />
|
||||
|
||||
<main className="relative z-10 flex-1 flex flex-col items-center justify-center px-4 -translate-y-4">
|
||||
{/* Animated typewriter heading */}
|
||||
<h1 className="text-5xl md:text-7xl lg:text-8xl font-extrabold tracking-tighter text-transparent bg-clip-text bg-linear-to-r from-emerald-50 via-white to-emerald-50 drop-shadow-[0_0_15px_rgba(52,211,153,0.4)]">
|
||||
{text}
|
||||
<span className="animate-pulse text-emerald-400 ml-0.5">|</span>
|
||||
@@ -35,8 +38,10 @@ export default function Banner() {
|
||||
{"< / Code. Deploy. Repeat. >"}
|
||||
</p>
|
||||
|
||||
{/* Decorative divider */}
|
||||
<div className="w-12 h-0.5 bg-emerald-500 mt-5 shadow-[0_0_8px_#10b981]" />
|
||||
|
||||
{/* Navigation card grid */}
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-5 gap-6 mt-14 w-full max-w-6xl px-4">
|
||||
{NAV_ITEMS.map((item) => (
|
||||
<NavCard key={item.name} item={item} />
|
||||
|
||||
@@ -4,6 +4,7 @@ interface NavCardProps {
|
||||
item: NavItem;
|
||||
}
|
||||
|
||||
// A clickable navigation card with icon, title, and description
|
||||
export default function NavCard({ item }: NavCardProps) {
|
||||
const { name, desc, path, Icon, color, borderHover } = item;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { ChevronDown } from "lucide-react";
|
||||
|
||||
// Bottom section with scroll indicator and tech stack credit
|
||||
export default function Footer() {
|
||||
return (
|
||||
<footer className="relative z-10 w-full pb-6 flex flex-col items-center justify-center gap-4 bg-linear-to-t from-black/40 to-transparent">
|
||||
|
||||
Reference in new issue
Block a user