diff --git a/messages/en.json b/messages/en.json index 14bd72d..17e7921 100644 --- a/messages/en.json +++ b/messages/en.json @@ -6,6 +6,8 @@ "contact": "Contact" }, "Hero": { + "greeting": "Hi, I'm", + "name": "Yolando.", "badge": "Available for opportunities", "titlePart1": "Building", "titleHighlight": "Secure, Scalable", diff --git a/messages/id.json b/messages/id.json index 6c86653..6123e5e 100644 --- a/messages/id.json +++ b/messages/id.json @@ -6,6 +6,8 @@ "contact": "Kontak" }, "Hero": { + "greeting": "Hai, saya", + "name": "Yolando.", "badge": "Tersedia untuk peluang baru", "titlePart1": "Membangun Sistem", "titleHighlight": "Aman & Skalabel", diff --git a/src/features/hero/hero-section.tsx b/src/features/hero/hero-section.tsx index a93a4cc..ba493cd 100644 --- a/src/features/hero/hero-section.tsx +++ b/src/features/hero/hero-section.tsx @@ -1,106 +1,190 @@ "use client"; -import { motion } from "framer-motion"; -import { ArrowDown, FileText, Send } from "lucide-react"; +import { useState } from "react"; +import { motion, PanInfo } from "framer-motion"; +import { ArrowDown, FileText, Send, Hand } from "lucide-react"; import { useTranslations } from "next-intl"; +const PROFILE_IMAGES = [ + "https://images.unsplash.com/photo-1556157382-97eda2d62296?w=600&auto=format&fit=crop&q=80", + "https://images.unsplash.com/photo-1573496359142-b8d87734a5a2?w=600&auto=format&fit=crop&q=80", + "https://images.unsplash.com/photo-1605379399642-870262d3d051?w=600&auto=format&fit=crop&q=80", +]; + export function HeroSection() { const t = useTranslations("Hero"); + const [cards, setCards] = useState(PROFILE_IMAGES); + + const handleDragEnd = (event: any, info: PanInfo) => { + // If the card is dragged beyond a certain threshold on X-axis (left or right) + if (Math.abs(info.offset.x) > 100) { + setCards((prevCards) => { + const newCards = [...prevCards]; + const topCard = newCards.shift(); + if (topCard) newCards.push(topCard); + return newCards; + }); + } + }; return (
+ {/* Decorative Blur Backgrounds */}
-
+
-
- - - - - - - {t("badge")} - - - - - {t("titlePart1")}{" "} - {t("titleHighlight")} -
- {t("titlePart2")} -
- - - {t("yearsExp")}{" "} - {t("subtitle")} - - - - - - {t("ctaContact")} - - - - {t("ctaProjects")} - - - - - {["Java", "Spring Boot", "Kafka", "PostgreSQL", "Docker", "Kubernetes"].map((tech) => ( - +
+ + {/* LEFT: Text Content */} +
+ - {tech} - - ))} - + + + + + + {t("badge")} + + + + + + {t("greeting")}{" "} + {t("name")} + + {t("titlePart1")}{" "} + {t("titleHighlight")} +
+ {t("titlePart2")} +
+ + + + {t("yearsExp")} + {" "} + {t("subtitle")} + + + + + + {t("ctaContact")} + + + + {t("ctaProjects")} + + +
+ + {/* RIGHT: Swipeable Card Deck */} + +
+ {cards.map((imgUrl, index) => { + const isTop = index === 0; + + return ( + + Yolando Showcase + + {/* Instructional Overlay only on top card */} + {isTop && ( +
+ + Swipe + +
+ )} +
+ ); + })} +
+
+ +
- + {t("scroll")}