Spaces:
Paused
Paused
Download components/FeatureJourneyMap.tsx from samirhosninet/HubAPI: direct link, hf CLI and curl.
- Browser
- Download file 7.37 kB
-
https://huggingface.co/spaces/samirhosninet/HubAPI/resolve/main/components/FeatureJourneyMap.tsx
- Command line
-
hf download hf://spaces/samirhosninet/HubAPI/components/FeatureJourneyMap.tsx
-
curl -L -o FeatureJourneyMap.tsx https://huggingface.co/spaces/samirhosninet/HubAPI/resolve/main/components/FeatureJourneyMap.tsx
7.37 kB
| "use client"; | |
| import { motion } from "framer-motion"; | |
| import { Layers, KeyRound, Route, BarChart3 } from "lucide-react"; | |
| import { cn } from "@/lib/utils"; | |
| import { useLanguage } from "@/components/LanguageContext"; | |
| interface JourneyNode { | |
| title: string; | |
| titleEn: string; | |
| icon: React.ComponentType<{ className?: string; style?: React.CSSProperties }>; | |
| desc: string; | |
| accentColor: string; | |
| glowClass: string; | |
| } | |
| export function FeatureJourneyMap() { | |
| const { t } = useLanguage(); | |
| const nodes: JourneyNode[] = [ | |
| { | |
| title: t("journeyNode1Title"), | |
| titleEn: t("journeyNode1TitleEn"), | |
| icon: Layers, | |
| desc: t("journeyNode1Desc"), | |
| accentColor: "var(--brand-gold)", | |
| glowClass: | |
| "shadow-[var(--brand-gold)]/10 border-[var(--brand-gold)]/20 hover:border-[var(--brand-gold)]/50", | |
| }, | |
| { | |
| title: t("journeyNode2Title"), | |
| titleEn: t("journeyNode2TitleEn"), | |
| icon: KeyRound, | |
| desc: t("journeyNode2Desc"), | |
| accentColor: "var(--brand-rose)", | |
| glowClass: | |
| "shadow-[var(--brand-rose)]/10 border-[var(--brand-rose)]/20 hover:border-[var(--brand-rose)]/50", | |
| }, | |
| { | |
| title: t("journeyNode3Title"), | |
| titleEn: t("journeyNode3TitleEn"), | |
| icon: Route, | |
| desc: t("journeyNode3Desc"), | |
| accentColor: "var(--brand-purple)", | |
| glowClass: | |
| "shadow-[var(--brand-purple)]/10 border-[var(--brand-purple)]/20 hover:border-[var(--brand-purple)]/50", | |
| }, | |
| { | |
| title: t("journeyNode4Title"), | |
| titleEn: t("journeyNode4TitleEn"), | |
| icon: BarChart3, | |
| desc: t("journeyNode4Desc"), | |
| accentColor: "var(--brand-gold)", | |
| glowClass: | |
| "shadow-[var(--brand-gold)]/10 border-[var(--brand-gold)]/20 hover:border-[var(--brand-gold)]/50", | |
| }, | |
| ]; | |
| return ( | |
| <section className="relative w-full max-w-7xl mx-auto py-32 px-4 overflow-hidden"> | |
| <div className="text-center space-y-5 mb-20 z-10 relative max-w-3xl mx-auto"> | |
| <div className="inline-flex items-center gap-2 rounded-full border border-primary/20 bg-primary/5 px-4 py-1.5 text-xs md:text-sm font-medium text-primary backdrop-blur-md shadow-lg font-mono tracking-widest uppercase"> | |
| <span className="w-1.5 h-1.5 rounded-full bg-primary animate-pulse shadow-[0_0_8px_var(--primary-glow)]" /> | |
| {t("journeyBadge")} | |
| </div> | |
| <h2 className="text-4xl font-extrabold tracking-tight sm:text-6xl text-foreground leading-tight"> | |
| {t("journeyTitleLine1")} | |
| <br className="hidden md:inline" /> | |
| <span className="bg-clip-text text-transparent bg-gradient-to-r from-[var(--brand-gold)] via-[var(--brand-rose)] to-[var(--brand-purple)]"> | |
| {" "} | |
| {t("journeyTitleLine2")} | |
| </span> | |
| </h2> | |
| <div className="space-y-3 text-sm md:text-base text-muted-foreground leading-relaxed font-mono text-start max-w-2xl mx-auto"> | |
| <p>{t("journeyIntro1")}</p> | |
| <p>{t("journeyIntro2")}</p> | |
| <p>{t("journeyIntro3")}</p> | |
| <p className="text-foreground/90 font-semibold pt-1">{t("journeyPunchline")}</p> | |
| </div> | |
| </div> | |
| <div className="relative w-full max-w-5xl mx-auto"> | |
| <div className="absolute left-[24px] md:left-1/2 top-0 bottom-0 w-[2px] -translate-x-1/2 bg-gradient-to-b from-[var(--brand-gold)] via-[var(--brand-rose)] to-[var(--brand-purple)] opacity-35 dark:opacity-20" /> | |
| <div className="space-y-20 relative"> | |
| {nodes.map((node, index) => { | |
| const IconComponent = node.icon; | |
| const isEven = index % 2 === 0; | |
| const nodeNum = String(index + 1).padStart(2, "0"); | |
| return ( | |
| <div | |
| key={node.titleEn} | |
| className={cn( | |
| "flex flex-col md:flex-row items-start w-full relative", | |
| isEven ? "md:flex-row-reverse" : "" | |
| )} | |
| > | |
| <div className="absolute left-[24px] md:left-1/2 top-4 md:top-8 -translate-x-1/2 z-20 flex h-12 w-12 items-center justify-center rounded-full border border-border bg-card shadow-xl transition-[border-color,box-shadow,transform] duration-500 hover:scale-110"> | |
| <div | |
| className="absolute inset-0 rounded-full opacity-0 hover:opacity-100 transition-opacity duration-300 blur-[6px]" | |
| style={{ backgroundColor: node.accentColor }} | |
| /> | |
| <IconComponent | |
| className="h-5 w-5 relative z-10" | |
| style={{ color: node.accentColor }} | |
| /> | |
| </div> | |
| <div className="w-full md:w-[calc(50%-40px)] pl-16 md:pl-0 md:px-0"> | |
| <motion.div | |
| initial={{ opacity: 0, x: isEven ? -40 : 40, y: 30 }} | |
| whileInView={{ opacity: 1, x: 0, y: 0 }} | |
| viewport={{ once: true, margin: "-100px" }} | |
| transition={{ duration: 0.6, ease: "easeOut", delay: index * 0.1 }} | |
| className={cn( | |
| "group relative rounded-xl premium-glass-card p-6 md:p-8 transition-[border-color,box-shadow,transform] duration-500 hover:-translate-y-1 shadow-2xl corner-bracket", | |
| node.glowClass | |
| )} | |
| > | |
| <div className="corner-bracket-inner" /> | |
| <div className="absolute inset-0 bg-gradient-to-br from-foreground/[0.015] to-transparent pointer-events-none rounded-xl" /> | |
| <div className="flex justify-between items-start mb-6"> | |
| <div className="text-3xl md:text-4xl font-bebas font-extrabold tracking-wider leading-none bg-clip-text text-transparent bg-gradient-to-r from-[var(--brand-gold)] via-[var(--brand-rose)] to-[var(--brand-purple)]"> | |
| {nodeNum} | |
| </div> | |
| <span className="text-[10px] font-mono text-primary/60 group-hover:text-primary transition-colors duration-300 uppercase tracking-widest"> | |
| {"// "} | |
| {node.titleEn} | |
| </span> | |
| </div> | |
| <h3 className="text-xl md:text-2xl font-bold tracking-tight text-foreground group-hover:text-primary transition-colors duration-300 mb-4"> | |
| {node.title} | |
| </h3> | |
| <p className="text-sm md:text-base text-muted-foreground leading-relaxed text-start border-s-2 border-primary/30 ps-3 font-sans font-medium"> | |
| {node.desc} | |
| </p> | |
| </motion.div> | |
| </div> | |
| </div> | |
| ); | |
| })} | |
| </div> | |
| </div> | |
| <motion.div | |
| initial={{ opacity: 0, y: 20 }} | |
| whileInView={{ opacity: 1, y: 0 }} | |
| viewport={{ once: true, margin: "-80px" }} | |
| transition={{ duration: 0.5 }} | |
| className="mt-24 max-w-2xl mx-auto text-center px-4" | |
| > | |
| <p className="text-xs font-mono font-bold uppercase tracking-widest text-primary mb-3"> | |
| {t("journeyInvestorTitle")} | |
| </p> | |
| <p className="text-sm text-muted-foreground leading-relaxed font-mono"> | |
| {t("journeyInvestorDesc")} | |
| </p> | |
| </motion.div> | |
| </section> | |
| ); | |
| } | |