|
| 1 | +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; |
| 2 | +import { Button } from "@/components/ui/button"; |
| 3 | +import { ArrowRight, MessageSquare, Cloud } from "lucide-react"; |
| 4 | +import { useTranslation } from "react-i18next"; |
| 5 | +import FluxMQLogo from "./FluxMQLogo"; |
| 6 | + |
| 7 | +const ProductShowcase = () => { |
| 8 | + const { t } = useTranslation(); |
| 9 | + |
| 10 | + const products = [ |
| 11 | + { |
| 12 | + id: "fluxmq", |
| 13 | + icon: MessageSquare, |
| 14 | + logo: true, |
| 15 | + titleKey: "products.fluxmq.title", |
| 16 | + descKey: "products.fluxmq.desc", |
| 17 | + featuresKey: "products.fluxmq.features", |
| 18 | + link: "https://doc.fluxmq.com", |
| 19 | + linkTextKey: "products.fluxmq.linkText", |
| 20 | + ctaKey: "products.fluxmq.cta", |
| 21 | + gradient: "bg-gradient-primary", |
| 22 | + }, |
| 23 | + { |
| 24 | + id: "fcp", |
| 25 | + icon: Cloud, |
| 26 | + logo: false, |
| 27 | + titleKey: "products.fcp.title", |
| 28 | + descKey: "products.fcp.desc", |
| 29 | + featuresKey: "products.fcp.features", |
| 30 | + link: "https://fcp.doc.fluxmq.com", |
| 31 | + linkTextKey: "products.fcp.linkText", |
| 32 | + ctaKey: "products.fcp.cta", |
| 33 | + gradient: "bg-gradient-secondary", |
| 34 | + }, |
| 35 | + ]; |
| 36 | + |
| 37 | + return ( |
| 38 | + <section id="products" className="py-24 bg-muted/30"> |
| 39 | + <div className="container mx-auto px-6"> |
| 40 | + <div className="text-center mb-16"> |
| 41 | + <h2 className="text-4xl md:text-5xl font-bold mb-6"> |
| 42 | + {t("products.title")} |
| 43 | + <span className="text-gradient block">{t("products.titleHighlight")}</span> |
| 44 | + </h2> |
| 45 | + <p className="text-xl text-muted-foreground max-w-3xl mx-auto"> |
| 46 | + {t("products.subtitle")} |
| 47 | + </p> |
| 48 | + </div> |
| 49 | + |
| 50 | + <div className="grid grid-cols-1 lg:grid-cols-2 gap-8 max-w-5xl mx-auto"> |
| 51 | + {products.map((product) => ( |
| 52 | + <Card |
| 53 | + key={product.id} |
| 54 | + className="bg-gradient-card border-border/50 hover:shadow-card transition-all duration-300 group overflow-hidden" |
| 55 | + > |
| 56 | + <CardHeader className="pb-2"> |
| 57 | + <div className="flex items-center gap-3 mb-2"> |
| 58 | + {product.logo ? ( |
| 59 | + <FluxMQLogo size={32} variant="light" className="flex-shrink-0" /> |
| 60 | + ) : ( |
| 61 | + <div |
| 62 | + className={`${product.gradient} p-3 rounded-xl shadow-glow group-hover:animate-glow`} |
| 63 | + > |
| 64 | + <product.icon className="h-7 w-7 text-primary-foreground" /> |
| 65 | + </div> |
| 66 | + )} |
| 67 | + <CardTitle className="text-2xl group-hover:text-gradient transition-all duration-300"> |
| 68 | + {t(product.titleKey)} |
| 69 | + </CardTitle> |
| 70 | + </div> |
| 71 | + <CardDescription className="text-base mt-2"> |
| 72 | + {t(product.descKey)} |
| 73 | + </CardDescription> |
| 74 | + </CardHeader> |
| 75 | + <CardContent className="space-y-4"> |
| 76 | + <ul className="space-y-2 text-sm text-muted-foreground"> |
| 77 | + {(t(product.featuresKey, { returnObjects: true }) as string[]).map( |
| 78 | + (item, idx) => ( |
| 79 | + <li key={idx} className="flex items-center gap-2"> |
| 80 | + <span className="text-primary">•</span> |
| 81 | + {item} |
| 82 | + </li> |
| 83 | + ) |
| 84 | + )} |
| 85 | + </ul> |
| 86 | + <Button |
| 87 | + variant="hero" |
| 88 | + className="w-full sm:w-auto group/btn" |
| 89 | + onClick={() => window.open(product.link, "_blank")} |
| 90 | + > |
| 91 | + {t(product.ctaKey)} |
| 92 | + <ArrowRight className="ml-2 h-4 w-4 group-hover/btn:translate-x-1 transition-transform" /> |
| 93 | + </Button> |
| 94 | + </CardContent> |
| 95 | + </Card> |
| 96 | + ))} |
| 97 | + </div> |
| 98 | + </div> |
| 99 | + </section> |
| 100 | + ); |
| 101 | +}; |
| 102 | + |
| 103 | +export default ProductShowcase; |
0 commit comments