Spaces:
Paused
Paused
Download components/TrustSection.tsx from samirhosninet/HubAPI: direct link, hf CLI and curl.
- Browser
- Download file 8.69 kB
-
https://huggingface.co/spaces/samirhosninet/HubAPI/resolve/main/components/TrustSection.tsx
- Command line
-
hf download hf://spaces/samirhosninet/HubAPI/components/TrustSection.tsx
-
curl -L -o TrustSection.tsx https://huggingface.co/spaces/samirhosninet/HubAPI/resolve/main/components/TrustSection.tsx
8.69 kB
| "use client"; | |
| import { motion } from "framer-motion"; | |
| import { useLanguage } from "@/components/LanguageContext"; | |
| import { | |
| KeyRound, | |
| Wallet, | |
| Layers, | |
| Gauge, | |
| Ban, | |
| Database, | |
| Award, | |
| Fingerprint, | |
| Plug, | |
| Route, | |
| BarChart3, | |
| ShieldCheck, | |
| type LucideIcon, | |
| } from "lucide-react"; | |
| type SecurityCard = { | |
| num: string; | |
| titleKey: | |
| | "securityCard1Title" | |
| | "securityCard2Title" | |
| | "securityCard3Title" | |
| | "securityCard4Title" | |
| | "securityCard5Title" | |
| | "securityCard6Title" | |
| | "securityCard7Title" | |
| | "securityCard8Title"; | |
| descKey: | |
| | "securityCard1Desc" | |
| | "securityCard2Desc" | |
| | "securityCard3Desc" | |
| | "securityCard4Desc" | |
| | "securityCard5Desc" | |
| | "securityCard6Desc" | |
| | "securityCard7Desc" | |
| | "securityCard8Desc"; | |
| icon: LucideIcon; | |
| }; | |
| const SECURITY_CARDS: SecurityCard[] = [ | |
| { num: "01", titleKey: "securityCard1Title", descKey: "securityCard1Desc", icon: KeyRound }, | |
| { num: "02", titleKey: "securityCard2Title", descKey: "securityCard2Desc", icon: Wallet }, | |
| { num: "03", titleKey: "securityCard3Title", descKey: "securityCard3Desc", icon: Layers }, | |
| { num: "04", titleKey: "securityCard4Title", descKey: "securityCard4Desc", icon: Gauge }, | |
| { num: "05", titleKey: "securityCard5Title", descKey: "securityCard5Desc", icon: Ban }, | |
| { num: "06", titleKey: "securityCard6Title", descKey: "securityCard6Desc", icon: Database }, | |
| { num: "07", titleKey: "securityCard7Title", descKey: "securityCard7Desc", icon: Fingerprint }, | |
| { num: "08", titleKey: "securityCard8Title", descKey: "securityCard8Desc", icon: Award }, | |
| ]; | |
| type BuildCard = { | |
| num: string; | |
| titleKey: | |
| | "buildCard1Title" | |
| | "buildCard2Title" | |
| | "buildCard3Title" | |
| | "buildCard4Title" | |
| | "buildCard5Title" | |
| | "buildCard6Title"; | |
| descKey: | |
| | "buildCard1Desc" | |
| | "buildCard2Desc" | |
| | "buildCard3Desc" | |
| | "buildCard4Desc" | |
| | "buildCard5Desc" | |
| | "buildCard6Desc"; | |
| icon: LucideIcon; | |
| }; | |
| const BUILD_CARDS: BuildCard[] = [ | |
| { num: "01", titleKey: "buildCard1Title", descKey: "buildCard1Desc", icon: Plug }, | |
| { num: "02", titleKey: "buildCard2Title", descKey: "buildCard2Desc", icon: Layers }, | |
| { num: "03", titleKey: "buildCard3Title", descKey: "buildCard3Desc", icon: KeyRound }, | |
| { num: "04", titleKey: "buildCard4Title", descKey: "buildCard4Desc", icon: BarChart3 }, | |
| { num: "05", titleKey: "buildCard5Title", descKey: "buildCard5Desc", icon: Route }, | |
| { num: "06", titleKey: "buildCard6Title", descKey: "buildCard6Desc", icon: ShieldCheck }, | |
| ]; | |
| export function TrustSection() { | |
| const { t } = useLanguage(); | |
| const containerVariants = { | |
| hidden: {}, | |
| visible: { | |
| transition: { | |
| staggerChildren: 0.1, | |
| }, | |
| }, | |
| }; | |
| const itemVariants = { | |
| hidden: { opacity: 0, y: 20 }, | |
| visible: { | |
| opacity: 1, | |
| y: 0, | |
| transition: { duration: 0.5, ease: "easeOut" as const }, | |
| }, | |
| }; | |
| return ( | |
| <div className="w-full relative z-10 py-20 border-t border-border space-y-28 max-w-5xl mx-auto px-4 md:px-6"> | |
| {/* Background ambient lighting */} | |
| <div className="absolute top-1/3 right-1/4 w-96 h-96 bg-primary/5 rounded-full blur-[120px] pointer-events-none" /> | |
| <div className="absolute bottom-1/3 left-1/4 w-96 h-96 bg-indigo-500/5 rounded-full blur-[120px] pointer-events-none" /> | |
| {/* Security Section */} | |
| <section id="security" className="space-y-14 max-w-6xl mx-auto w-full"> | |
| <div className="text-center space-y-5"> | |
| <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("securityBadge")} | |
| </div> | |
| <h2 className="text-4xl font-extrabold tracking-tight sm:text-5xl text-foreground leading-tight"> | |
| {t("securityTitle")} | |
| </h2> | |
| <div className="space-y-3 text-sm md:text-base text-muted-foreground font-mono leading-relaxed max-w-2xl mx-auto"> | |
| <p>{t("securitySubtitle")}</p> | |
| <p className="text-foreground/90 font-semibold">{t("securityPunchline")}</p> | |
| <p>{t("securityDesc")}</p> | |
| </div> | |
| </div> | |
| <motion.div | |
| variants={containerVariants} | |
| initial="hidden" | |
| whileInView="visible" | |
| viewport={{ once: true, margin: "-100px" }} | |
| className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-1.5" | |
| > | |
| {SECURITY_CARDS.map((card) => { | |
| const Icon = card.icon; | |
| return ( | |
| <motion.article | |
| key={card.num} | |
| variants={itemVariants} | |
| className="group relative p-5 md:p-6 premium-glass-card clip-cyber-card corner-bracket h-full transition-colors duration-300" | |
| > | |
| <div className="corner-bracket-inner" aria-hidden="true" /> | |
| <div className="relative z-10 space-y-3"> | |
| <div className="flex items-center justify-between gap-3"> | |
| <span className="font-mono text-[10px] text-primary/60 uppercase tracking-widest"> | |
| {card.num} / | |
| </span> | |
| <Icon | |
| className="h-5 w-5 text-primary/70 group-hover:text-primary transition-colors shrink-0" | |
| aria-hidden="true" | |
| /> | |
| </div> | |
| <h3 className="font-mono font-bold text-sm uppercase tracking-tight text-foreground group-hover:text-primary transition-colors"> | |
| {t(card.titleKey)} | |
| </h3> | |
| <p className="text-sm text-muted-foreground font-mono leading-relaxed"> | |
| {t(card.descKey)} | |
| </p> | |
| </div> | |
| </motion.article> | |
| ); | |
| })} | |
| </motion.div> | |
| </section> | |
| {/* Build Principles Section */} | |
| <section id="build-principles" className="space-y-14 max-w-6xl mx-auto w-full"> | |
| <div className="text-center space-y-5"> | |
| <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("buildBadge")} | |
| </div> | |
| <h2 className="text-4xl font-extrabold tracking-tight sm:text-5xl text-foreground leading-tight"> | |
| {t("buildTitle")} | |
| </h2> | |
| <p className="text-sm md:text-base text-muted-foreground font-mono leading-relaxed max-w-2xl mx-auto"> | |
| {t("buildDesc")} | |
| </p> | |
| </div> | |
| <motion.div | |
| variants={containerVariants} | |
| initial="hidden" | |
| whileInView="visible" | |
| viewport={{ once: true, margin: "-100px" }} | |
| className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-1.5" | |
| > | |
| {BUILD_CARDS.map((card) => { | |
| const Icon = card.icon; | |
| return ( | |
| <motion.article | |
| key={card.num} | |
| variants={itemVariants} | |
| className="group relative p-5 md:p-6 premium-glass-card clip-cyber-card corner-bracket h-full transition-colors duration-300" | |
| > | |
| <div className="corner-bracket-inner" aria-hidden="true" /> | |
| <div className="relative z-10 space-y-3"> | |
| <div className="flex items-center justify-between gap-3"> | |
| <span className="font-mono text-[10px] text-primary/60 uppercase tracking-widest"> | |
| {card.num} / | |
| </span> | |
| <Icon | |
| className="h-5 w-5 text-primary/70 group-hover:text-primary transition-colors shrink-0" | |
| aria-hidden="true" | |
| /> | |
| </div> | |
| <h3 className="font-mono font-bold text-sm uppercase tracking-tight text-foreground group-hover:text-primary transition-colors"> | |
| {t(card.titleKey)} | |
| </h3> | |
| <p className="text-sm text-muted-foreground font-mono leading-relaxed"> | |
| {t(card.descKey)} | |
| </p> | |
| </div> | |
| </motion.article> | |
| ); | |
| })} | |
| </motion.div> | |
| </section> | |
| </div> | |
| ); | |
| } | |