Skip to content

Commit 25aa2d8

Browse files
feat: 官网双产品设计 - FluxMQ 与 FCP 并列展示与文档入口
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent b98e442 commit 25aa2d8

6 files changed

Lines changed: 269 additions & 27 deletions

File tree

src/components/DocumentationPortal.tsx

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const DocumentationPortal: React.FC = () => {
8888
<section id="documentation" className="py-20 bg-gradient-to-b from-background to-secondary/20">
8989
<div className="container mx-auto px-6">
9090
{/* Header */}
91-
<div className="text-center mb-16">
91+
<div className="text-center mb-12">
9292
<h2 className="text-4xl font-bold mb-6 text-gradient">
9393
{t('docs.portal.title')}
9494
</h2>
@@ -97,6 +97,56 @@ const DocumentationPortal: React.FC = () => {
9797
</p>
9898
</div>
9999

100+
{/* By product: FluxMQ + FCP */}
101+
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 max-w-4xl mx-auto mb-16">
102+
<Card
103+
className="group hover:shadow-card transition-all duration-300 border-border/50 hover:border-primary/50 cursor-pointer overflow-hidden"
104+
onClick={() => window.open('https://doc.fluxmq.com', '_blank')}
105+
>
106+
<CardHeader className="pb-4">
107+
<div className="p-3 bg-gradient-to-br from-cyan-500/20 to-blue-500/20 rounded-xl w-fit mb-3">
108+
<BookOpen className="h-8 w-8 text-primary" />
109+
</div>
110+
<CardTitle className="text-2xl group-hover:text-primary transition-colors">
111+
{t('docs.portal.fluxmqDoc')}
112+
</CardTitle>
113+
<p className="text-muted-foreground leading-relaxed">
114+
{t('docs.portal.fluxmqDocDesc')}
115+
</p>
116+
</CardHeader>
117+
<CardContent className="pt-0">
118+
<Button variant="hero" className="w-full justify-between group/btn">
119+
<span>{t('docs.portal.viewDocs')}</span>
120+
<ExternalLink className="h-4 w-4" />
121+
</Button>
122+
</CardContent>
123+
</Card>
124+
<Card
125+
className="group hover:shadow-card transition-all duration-300 border-border/50 hover:border-primary/50 cursor-pointer overflow-hidden"
126+
onClick={() => window.open('https://fcp.doc.fluxmq.com', '_blank')}
127+
>
128+
<CardHeader className="pb-4">
129+
<div className="p-3 bg-gradient-to-br from-violet-500/20 to-purple-500/20 rounded-xl w-fit mb-3">
130+
<Settings className="h-8 w-8 text-primary" />
131+
</div>
132+
<CardTitle className="text-2xl group-hover:text-primary transition-colors">
133+
{t('docs.portal.fcpDoc')}
134+
</CardTitle>
135+
<p className="text-muted-foreground leading-relaxed">
136+
{t('docs.portal.fcpDocDesc')}
137+
</p>
138+
</CardHeader>
139+
<CardContent className="pt-0">
140+
<Button variant="outline" className="w-full justify-between group/btn border-primary/50">
141+
<span>{t('docs.portal.viewDocs')}</span>
142+
<ExternalLink className="h-4 w-4" />
143+
</Button>
144+
</CardContent>
145+
</Card>
146+
</div>
147+
148+
{/* FluxMQ quick links */}
149+
<p className="text-center text-sm text-muted-foreground mb-6">{t('docs.portal.quickAccess.title')}</p>
100150
{/* Documentation Grid */}
101151
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-12">
102152
{docSections.map((section) => (
@@ -150,7 +200,15 @@ const DocumentationPortal: React.FC = () => {
150200
className="flex items-center space-x-2"
151201
>
152202
<BookOpen className="h-4 w-4" />
153-
<span>{t('docs.portal.quickAccess.completeDocs')}</span>
203+
<span>{t('docs.portal.quickAccess.fluxmqDocs')}</span>
204+
</Button>
205+
<Button
206+
variant="outline"
207+
onClick={() => window.open('https://fcp.doc.fluxmq.com', '_blank')}
208+
className="flex items-center space-x-2"
209+
>
210+
<Settings className="h-4 w-4" />
211+
<span>{t('docs.portal.quickAccess.fcpDocs')}</span>
154212
</Button>
155213
<Button
156214
variant="outline"

src/components/Footer.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ const Footer = () => {
3131
{ name: t('footer.links.roadmap'), href: "#roadmap" }
3232
],
3333
[t('footer.developers')]: [
34-
{ name: t('footer.links.documentation'), href: "https://doc.fluxmq.com", external: true },
34+
{ name: t('footer.links.fluxmqDocs'), href: "https://doc.fluxmq.com", external: true },
35+
{ name: t('footer.links.fcpDocs'), href: "https://fcp.doc.fluxmq.com", external: true },
3536
{ name: t('footer.links.apiReference'), href: "https://doc.fluxmq.com/api", external: true },
36-
{ name: t('footer.links.examples'), href: "https://doc.fluxmq.com/function", external: true },
37-
{ name: t('footer.links.sdks'), href: "https://doc.fluxmq.com/install", external: true }
37+
{ name: t('footer.links.examples'), href: "https://doc.fluxmq.com/function", external: true }
3838
],
3939
[t('footer.resources')]: [
4040
{ name: t('footer.links.blog'), href: "#blog" },
@@ -59,7 +59,7 @@ const Footer = () => {
5959
<div className="lg:col-span-2">
6060
<div className="flex items-center space-x-2 mb-6">
6161
<FluxMQLogo size={24} variant={isDark ? 'dark' : 'light'} />
62-
<span className="text-2xl font-bold text-gradient">FluxMQ</span>
62+
<span className="text-2xl font-bold text-gradient">{t('nav.brand')}</span>
6363
</div>
6464
<p className="text-muted-foreground mb-6 leading-relaxed">
6565
{t('footer.description')}

src/components/Header.tsx

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,16 @@ const Header = () => {
6464
<div className="container mx-auto px-6 py-4">
6565
<nav className="flex items-center justify-between">
6666
{/* Logo */}
67-
<div className="flex items-center space-x-3">
67+
<a href="/" className="flex items-center space-x-3">
6868
<FluxMQLogo size={24} variant={isDark ? 'dark' : 'light'} />
69-
<span className="text-2xl font-bold text-gradient">FluxMQ</span>
70-
</div>
69+
<span className="text-2xl font-bold text-gradient">{t('nav.brand')}</span>
70+
</a>
7171

7272
{/* Desktop Navigation */}
7373
<div className="hidden md:flex items-center space-x-8">
74+
<a href="#products" className="text-muted-foreground hover:text-primary transition-colors whitespace-nowrap min-w-[80px] text-center">
75+
{t('nav.products')}
76+
</a>
7477
<a href="#features" className="text-muted-foreground hover:text-primary transition-colors whitespace-nowrap min-w-[80px] text-center">
7578
{t('nav.features')}
7679
</a>
@@ -80,9 +83,22 @@ const Header = () => {
8083
<a href="#quickstart" className="text-muted-foreground hover:text-primary transition-colors whitespace-nowrap min-w-[100px] text-center">
8184
{t('nav.quickstart')}
8285
</a>
83-
<a href="https://doc.fluxmq.com" target="_blank" rel="noopener noreferrer" className="text-muted-foreground hover:text-primary transition-colors whitespace-nowrap min-w-[100px] text-center">
84-
{t('nav.documentation')}
85-
</a>
86+
<DropdownMenu>
87+
<DropdownMenuTrigger asChild>
88+
<Button variant="ghost" className="text-muted-foreground hover:text-primary min-w-[100px]">
89+
{t('nav.documentation')}
90+
<ChevronDown className="ml-1 h-3 w-3" />
91+
</Button>
92+
</DropdownMenuTrigger>
93+
<DropdownMenuContent className="bg-card border-border/50 shadow-card">
94+
<DropdownMenuItem onClick={() => window.open('https://doc.fluxmq.com', '_blank')} className="cursor-pointer">
95+
{t('nav.docFluxMQ')}
96+
</DropdownMenuItem>
97+
<DropdownMenuItem onClick={() => window.open('https://fcp.doc.fluxmq.com', '_blank')} className="cursor-pointer">
98+
{t('nav.docFCP')}
99+
</DropdownMenuItem>
100+
</DropdownMenuContent>
101+
</DropdownMenu>
86102
</div>
87103

88104
{/* CTA Buttons & Language Selector */}
@@ -136,6 +152,9 @@ const Header = () => {
136152
<Card className="md:hidden mt-4 bg-card/95 backdrop-blur-sm border-border/50">
137153
<CardContent className="p-4">
138154
<div className="flex flex-col space-y-4">
155+
<a href="#products" className="text-muted-foreground hover:text-primary transition-colors py-2 whitespace-nowrap">
156+
{t('nav.products')}
157+
</a>
139158
<a href="#features" className="text-muted-foreground hover:text-primary transition-colors py-2 whitespace-nowrap">
140159
{t('nav.features')}
141160
</a>
@@ -145,8 +164,12 @@ const Header = () => {
145164
<a href="#quickstart" className="text-muted-foreground hover:text-primary transition-colors py-2 whitespace-nowrap">
146165
{t('nav.quickstart')}
147166
</a>
148-
<a href="https://doc.fluxmq.com" target="_blank" rel="noopener noreferrer" className="text-muted-foreground hover:text-primary transition-colors py-2 whitespace-nowrap">
149-
{t('nav.documentation')}
167+
<span className="text-muted-foreground py-2 whitespace-nowrap font-medium">{t('nav.documentation')}</span>
168+
<a href="https://doc.fluxmq.com" target="_blank" rel="noopener noreferrer" className="text-muted-foreground hover:text-primary transition-colors py-2 pl-4 whitespace-nowrap">
169+
{t('nav.docFluxMQ')}
170+
</a>
171+
<a href="https://fcp.doc.fluxmq.com" target="_blank" rel="noopener noreferrer" className="text-muted-foreground hover:text-primary transition-colors py-2 pl-4 whitespace-nowrap">
172+
{t('nav.docFCP')}
150173
</a>
151174

152175
{/* Mobile Language Selector */}

src/components/ProductShowcase.tsx

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
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

Comments
 (0)