Skip to content

Commit 0559cb4

Browse files
committed
feat(site): demo video section and doc portal link
- Add #demos section with embedded WebM from doc.fluxmq.com/video/*. - Nav + i18n (en/zh); documentation portal card for 演示视频. - Constants FLUXMQ_DOC_ORIGIN / FLUXMQ_DOC_DEMOS_URL. Made-with: Cursor
1 parent 0fecd39 commit 0559cb4

8 files changed

Lines changed: 3752 additions & 1177 deletions

File tree

package-lock.json

Lines changed: 3614 additions & 1176 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/DemoVideos.tsx

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
2+
import { Button } from "@/components/ui/button";
3+
import { ExternalLink, Play } from "lucide-react";
4+
import { useTranslation } from "react-i18next";
5+
import { FLUXMQ_DEMO_VIDEOS } from "@/lib/demoVideos";
6+
import { FLUXMQ_DOC_DEMOS_URL } from "@/lib/constants";
7+
8+
const DemoVideos = () => {
9+
const { t } = useTranslation();
10+
11+
return (
12+
<section id="demos" className="py-24 bg-background">
13+
<div className="container mx-auto px-6">
14+
<div className="text-center mb-14">
15+
<div className="inline-flex items-center gap-2 rounded-full border border-border/60 bg-muted/40 px-4 py-1.5 text-sm text-muted-foreground mb-4">
16+
<Play className="h-4 w-4 text-primary" />
17+
<span>{t("demos.badge")}</span>
18+
</div>
19+
<h2 className="text-4xl md:text-5xl font-bold mb-4">
20+
{t("demos.title")}
21+
<span className="text-gradient block">{t("demos.titleHighlight")}</span>
22+
</h2>
23+
<p className="text-xl text-muted-foreground max-w-3xl mx-auto mb-8">
24+
{t("demos.subtitle")}
25+
</p>
26+
<Button variant="outline" size="lg" asChild>
27+
<a href={FLUXMQ_DOC_DEMOS_URL} target="_blank" rel="noopener noreferrer">
28+
<ExternalLink className="mr-2 h-4 w-4" />
29+
{t("demos.viewDocs")}
30+
</a>
31+
</Button>
32+
</div>
33+
34+
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8 max-w-6xl mx-auto">
35+
{FLUXMQ_DEMO_VIDEOS.map((item) => (
36+
<Card
37+
key={item.id}
38+
className="bg-gradient-card border-border/50 overflow-hidden shadow-card hover:shadow-lg transition-shadow"
39+
>
40+
<CardHeader className="pb-2">
41+
<CardTitle className="text-lg">{t(item.titleKey)}</CardTitle>
42+
<CardDescription>{t("demos.videoHint")}</CardDescription>
43+
</CardHeader>
44+
<CardContent className="pt-0">
45+
<div className="rounded-lg overflow-hidden border border-border/50 bg-black/5 aspect-video">
46+
<video
47+
className="w-full h-full object-contain bg-black"
48+
controls
49+
preload="metadata"
50+
playsInline
51+
>
52+
<source src={item.src} type="video/webm" />
53+
</video>
54+
</div>
55+
</CardContent>
56+
</Card>
57+
))}
58+
</div>
59+
</div>
60+
</section>
61+
);
62+
};
63+
64+
export default DemoVideos;

src/components/DocumentationPortal.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
BarChart3
1818
} from 'lucide-react';
1919
import { useTranslation } from 'react-i18next';
20-
import { FLUXMQ_DOC_INSTALL_CATEGORY_URL } from '@/lib/constants';
20+
import { FLUXMQ_DOC_INSTALL_CATEGORY_URL, FLUXMQ_DOC_DEMOS_URL } from '@/lib/constants';
2121

2222
interface DocSection {
2323
id: string;
@@ -43,6 +43,15 @@ const DocumentationPortal: React.FC = () => {
4343
external: true,
4444
badge: t('docs.badges.essential')
4545
},
46+
{
47+
id: 'demo-videos',
48+
title: t('docs.portal.demos.title'),
49+
description: t('docs.portal.demos.desc'),
50+
icon: <TestTube className="h-5 w-5" />,
51+
href: FLUXMQ_DOC_DEMOS_URL,
52+
external: true,
53+
badge: t('docs.badges.basic')
54+
},
4655
{
4756
id: 'configuration',
4857
title: t('docs.portal.configuration.title'),

src/components/Header.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ const Header = () => {
7474
<a href="#products" className="text-muted-foreground hover:text-primary transition-colors whitespace-nowrap min-w-[80px] text-center">
7575
{t('nav.products')}
7676
</a>
77+
<a href="#demos" className="text-muted-foreground hover:text-primary transition-colors whitespace-nowrap min-w-[80px] text-center">
78+
{t('nav.demos')}
79+
</a>
7780
<a href="#features" className="text-muted-foreground hover:text-primary transition-colors whitespace-nowrap min-w-[80px] text-center">
7881
{t('nav.features')}
7982
</a>
@@ -155,6 +158,9 @@ const Header = () => {
155158
<a href="#products" className="text-muted-foreground hover:text-primary transition-colors py-2 whitespace-nowrap">
156159
{t('nav.products')}
157160
</a>
161+
<a href="#demos" className="text-muted-foreground hover:text-primary transition-colors py-2 whitespace-nowrap">
162+
{t('nav.demos')}
163+
</a>
158164
<a href="#features" className="text-muted-foreground hover:text-primary transition-colors py-2 whitespace-nowrap">
159165
{t('nav.features')}
160166
</a>

src/lib/constants.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@
44
*/
55
export const FLUXMQ_DOC_INSTALL_CATEGORY_URL =
66
"https://doc.fluxmq.com/category/%E5%AE%89%E8%A3%85%E9%83%A8%E7%BD%B2";
7+
8+
/** 文档站根 URL(演示视频、静态资源等) */
9+
export const FLUXMQ_DOC_ORIGIN = "https://doc.fluxmq.com";
10+
11+
/** 文档站《演示视频》页面(与 fluxmq-doc product/demos 对应) */
12+
export const FLUXMQ_DOC_DEMOS_URL = `${FLUXMQ_DOC_ORIGIN}/product/demos`;

src/lib/demoVideos.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { FLUXMQ_DOC_ORIGIN } from "@/lib/constants";
2+
3+
export type DemoVideoItem = {
4+
id: string;
5+
titleKey: string;
6+
src: string;
7+
};
8+
9+
/** 与 fluxmq-doc static/video 及《演示视频》文档一致 */
10+
export const FLUXMQ_DEMO_VIDEOS: DemoVideoItem[] = [
11+
{
12+
id: "overview",
13+
titleKey: "demos.items.overview",
14+
src: `${FLUXMQ_DOC_ORIGIN}/video/overview.webm`,
15+
},
16+
{
17+
id: "rule-engine-datasource",
18+
titleKey: "demos.items.datasource",
19+
src: `${FLUXMQ_DOC_ORIGIN}/video/rule-engine-datasource.webm`,
20+
},
21+
{
22+
id: "instruct",
23+
titleKey: "demos.items.instruct",
24+
src: `${FLUXMQ_DOC_ORIGIN}/video/instruct.webm`,
25+
},
26+
];

src/lib/i18n.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const resources = {
1818
"nav.about": "About",
1919
"nav.github": "GitHub",
2020
"nav.getStarted": "Contact Us",
21+
"nav.demos": "Demos",
2122

2223
// Hero Section
2324
"hero.badge": "FluxMQ · FCP",
@@ -170,6 +171,8 @@ const resources = {
170171
"docs.portal.fcpDocDesc": "Control plane: license, applications, proxy, monitoring",
171172
"docs.portal.gettingStarted.title": "Quick Start",
172173
"docs.portal.gettingStarted.desc": "Installation deployment and basic configuration guide",
174+
"docs.portal.demos.title": "Demo videos",
175+
"docs.portal.demos.desc": "Console walkthroughs (WebM) aligned with the documentation site",
173176
"docs.portal.configuration.title": "Configuration Guide",
174177
"docs.portal.configuration.desc": "Detailed configuration parameter description",
175178
"docs.portal.features.title": "Features",
@@ -188,6 +191,15 @@ const resources = {
188191
"docs.portal.quickAccess.faq": "FAQ",
189192
"docs.portal.quickAccess.github": "GitHub",
190193
"docs.portal.viewDocs": "View Documentation",
194+
"demos.badge": "Console walkthroughs",
195+
"demos.title": "See FluxMQ",
196+
"demos.titleHighlight": "in action",
197+
"demos.subtitle": "Short WebM clips recorded from the public demo: dashboard, rule engine data sources, and command consumption.",
198+
"demos.viewDocs": "Open demo videos page in docs",
199+
"demos.videoHint": "WebM · demo.fluxmq.com",
200+
"demos.items.overview": "Console overview",
201+
"demos.items.datasource": "Rule engine · Data sources",
202+
"demos.items.instruct": "Command consumption",
191203
"docs.structure.introduction.title": "Introduction",
192204
"docs.structure.introduction.overview": "Product Overview",
193205
"docs.structure.introduction.features": "Key Features",
@@ -535,6 +547,7 @@ const resources = {
535547
"nav.about": "关于我们",
536548
"nav.github": "GitHub",
537549
"nav.getStarted": "联系我们",
550+
"nav.demos": "演示视频",
538551

539552
// Hero Section
540553
"hero.badge": "FluxMQ · FCP",
@@ -687,6 +700,8 @@ const resources = {
687700
"docs.portal.fcpDocDesc": "控制平面:License、应用、代理、监控",
688701
"docs.portal.gettingStarted.title": "快速开始",
689702
"docs.portal.gettingStarted.desc": "安装部署和基础配置指南",
703+
"docs.portal.demos.title": "演示视频",
704+
"docs.portal.demos.desc": "控制台短视频(WebM),与文档站《演示视频》同步",
690705
"docs.portal.configuration.title": "配置指南",
691706
"docs.portal.configuration.desc": "详细的配置参数说明",
692707
"docs.portal.features.title": "功能特性",
@@ -705,6 +720,15 @@ const resources = {
705720
"docs.portal.quickAccess.faq": "常见问题",
706721
"docs.portal.quickAccess.github": "GitHub",
707722
"docs.portal.viewDocs": "查看文档",
723+
"demos.badge": "控制台演示",
724+
"demos.title": "观看",
725+
"demos.titleHighlight": "FluxMQ 实操演示",
726+
"demos.subtitle": "基于公开演示环境录制的 WebM 短视频:总览、规则引擎数据源、指令消费。",
727+
"demos.viewDocs": "在文档站打开演示视频页",
728+
"demos.videoHint": "WebM · demo.fluxmq.com",
729+
"demos.items.overview": "控制台总览",
730+
"demos.items.datasource": "规则引擎 · 数据源",
731+
"demos.items.instruct": "指令消费",
708732
"docs.structure.introduction.title": "产品介绍",
709733
"docs.structure.introduction.overview": "产品概述",
710734
"docs.structure.introduction.features": "核心特性",

src/pages/Index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import PerformanceComparison from "@/components/PerformanceComparison";
88
import QuickStart from "@/components/QuickStart";
99
import Pricing from "@/components/Pricing";
1010
import DocumentationPortal from "@/components/DocumentationPortal";
11+
import DemoVideos from "@/components/DemoVideos";
1112
import GetStarted from "@/components/GetStarted";
1213
import Footer from "@/components/Footer";
1314

@@ -24,6 +25,7 @@ const Index = () => {
2425
<QuickStart />
2526
<Pricing />
2627
<DocumentationPortal />
28+
<DemoVideos />
2729
<GetStarted />
2830
<Footer />
2931
</div>

0 commit comments

Comments
 (0)