balibabu commited on
Commit
3fa1285
·
1 Parent(s): bc6fc1a

feat: Add Datasets component to home page #3221 (#3508)

Browse files

### What problem does this PR solve?

feat: Add Datasets component to home page #3221
### Type of change


- [x] New Feature (non-breaking change which adds functionality)

web/package-lock.json CHANGED
@@ -19,6 +19,7 @@
19
  "@radix-ui/react-dropdown-menu": "^2.1.2",
20
  "@radix-ui/react-icons": "^1.3.1",
21
  "@radix-ui/react-label": "^2.1.0",
 
22
  "@radix-ui/react-popover": "^1.1.2",
23
  "@radix-ui/react-select": "^2.1.2",
24
  "@radix-ui/react-separator": "^1.1.0",
@@ -4421,6 +4422,41 @@
4421
  }
4422
  }
4423
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4424
  "node_modules/@radix-ui/react-popover": {
4425
  "version": "1.1.2",
4426
  "resolved": "https://registry.npmmirror.com/@radix-ui/react-popover/-/react-popover-1.1.2.tgz",
 
19
  "@radix-ui/react-dropdown-menu": "^2.1.2",
20
  "@radix-ui/react-icons": "^1.3.1",
21
  "@radix-ui/react-label": "^2.1.0",
22
+ "@radix-ui/react-navigation-menu": "^1.2.1",
23
  "@radix-ui/react-popover": "^1.1.2",
24
  "@radix-ui/react-select": "^2.1.2",
25
  "@radix-ui/react-separator": "^1.1.0",
 
4422
  }
4423
  }
4424
  },
4425
+ "node_modules/@radix-ui/react-navigation-menu": {
4426
+ "version": "1.2.1",
4427
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-navigation-menu/-/react-navigation-menu-1.2.1.tgz",
4428
+ "integrity": "sha512-egDo0yJD2IK8L17gC82vptkvW1jLeni1VuqCyzY727dSJdk5cDjINomouLoNk8RVF7g2aNIfENKWL4UzeU9c8Q==",
4429
+ "dependencies": {
4430
+ "@radix-ui/primitive": "1.1.0",
4431
+ "@radix-ui/react-collection": "1.1.0",
4432
+ "@radix-ui/react-compose-refs": "1.1.0",
4433
+ "@radix-ui/react-context": "1.1.1",
4434
+ "@radix-ui/react-direction": "1.1.0",
4435
+ "@radix-ui/react-dismissable-layer": "1.1.1",
4436
+ "@radix-ui/react-id": "1.1.0",
4437
+ "@radix-ui/react-presence": "1.1.1",
4438
+ "@radix-ui/react-primitive": "2.0.0",
4439
+ "@radix-ui/react-use-callback-ref": "1.1.0",
4440
+ "@radix-ui/react-use-controllable-state": "1.1.0",
4441
+ "@radix-ui/react-use-layout-effect": "1.1.0",
4442
+ "@radix-ui/react-use-previous": "1.1.0",
4443
+ "@radix-ui/react-visually-hidden": "1.1.0"
4444
+ },
4445
+ "peerDependencies": {
4446
+ "@types/react": "*",
4447
+ "@types/react-dom": "*",
4448
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
4449
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
4450
+ },
4451
+ "peerDependenciesMeta": {
4452
+ "@types/react": {
4453
+ "optional": true
4454
+ },
4455
+ "@types/react-dom": {
4456
+ "optional": true
4457
+ }
4458
+ }
4459
+ },
4460
  "node_modules/@radix-ui/react-popover": {
4461
  "version": "1.1.2",
4462
  "resolved": "https://registry.npmmirror.com/@radix-ui/react-popover/-/react-popover-1.1.2.tgz",
web/package.json CHANGED
@@ -30,6 +30,7 @@
30
  "@radix-ui/react-dropdown-menu": "^2.1.2",
31
  "@radix-ui/react-icons": "^1.3.1",
32
  "@radix-ui/react-label": "^2.1.0",
 
33
  "@radix-ui/react-popover": "^1.1.2",
34
  "@radix-ui/react-select": "^2.1.2",
35
  "@radix-ui/react-separator": "^1.1.0",
 
30
  "@radix-ui/react-dropdown-menu": "^2.1.2",
31
  "@radix-ui/react-icons": "^1.3.1",
32
  "@radix-ui/react-label": "^2.1.0",
33
+ "@radix-ui/react-navigation-menu": "^1.2.1",
34
  "@radix-ui/react-popover": "^1.1.2",
35
  "@radix-ui/react-select": "^2.1.2",
36
  "@radix-ui/react-separator": "^1.1.0",
web/src/components/ui/navigation-menu.tsx ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
2
+ import { cva } from 'class-variance-authority';
3
+ import { ChevronDown } from 'lucide-react';
4
+ import * as React from 'react';
5
+
6
+ import { cn } from '@/lib/utils';
7
+
8
+ const NavigationMenuViewport = React.forwardRef<
9
+ React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,
10
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>
11
+ >(({ className, ...props }, ref) => (
12
+ <div className={cn('absolute left-0 top-full flex justify-center')}>
13
+ <NavigationMenuPrimitive.Viewport
14
+ className={cn(
15
+ 'origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]',
16
+ className,
17
+ )}
18
+ ref={ref}
19
+ {...props}
20
+ />
21
+ </div>
22
+ ));
23
+ NavigationMenuViewport.displayName =
24
+ NavigationMenuPrimitive.Viewport.displayName;
25
+
26
+ const NavigationMenu = React.forwardRef<
27
+ React.ElementRef<typeof NavigationMenuPrimitive.Root>,
28
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>
29
+ >(({ className, children, ...props }, ref) => (
30
+ <NavigationMenuPrimitive.Root
31
+ ref={ref}
32
+ className={cn(
33
+ 'relative z-10 flex max-w-max flex-1 items-center justify-center',
34
+ className,
35
+ )}
36
+ {...props}
37
+ >
38
+ {children}
39
+ <NavigationMenuViewport />
40
+ </NavigationMenuPrimitive.Root>
41
+ ));
42
+ NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
43
+
44
+ const NavigationMenuList = React.forwardRef<
45
+ React.ElementRef<typeof NavigationMenuPrimitive.List>,
46
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>
47
+ >(({ className, ...props }, ref) => (
48
+ <NavigationMenuPrimitive.List
49
+ ref={ref}
50
+ className={cn(
51
+ 'group flex flex-1 list-none items-center justify-center space-x-1',
52
+ className,
53
+ )}
54
+ {...props}
55
+ />
56
+ ));
57
+ NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
58
+
59
+ const NavigationMenuItem = NavigationMenuPrimitive.Item;
60
+
61
+ const navigationMenuTriggerStyle = cva(
62
+ 'group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50',
63
+ );
64
+
65
+ const NavigationMenuTrigger = React.forwardRef<
66
+ React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,
67
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>
68
+ >(({ className, children, ...props }, ref) => (
69
+ <NavigationMenuPrimitive.Trigger
70
+ ref={ref}
71
+ className={cn(navigationMenuTriggerStyle(), 'group', className)}
72
+ {...props}
73
+ >
74
+ {children}{' '}
75
+ <ChevronDown
76
+ className="relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180"
77
+ aria-hidden="true"
78
+ />
79
+ </NavigationMenuPrimitive.Trigger>
80
+ ));
81
+ NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
82
+
83
+ const NavigationMenuContent = React.forwardRef<
84
+ React.ElementRef<typeof NavigationMenuPrimitive.Content>,
85
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>
86
+ >(({ className, ...props }, ref) => (
87
+ <NavigationMenuPrimitive.Content
88
+ ref={ref}
89
+ className={cn(
90
+ 'left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ',
91
+ className,
92
+ )}
93
+ {...props}
94
+ />
95
+ ));
96
+ NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
97
+
98
+ const NavigationMenuLink = NavigationMenuPrimitive.Link;
99
+
100
+ const NavigationMenuIndicator = React.forwardRef<
101
+ React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,
102
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>
103
+ >(({ className, ...props }, ref) => (
104
+ <NavigationMenuPrimitive.Indicator
105
+ ref={ref}
106
+ className={cn(
107
+ 'top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in',
108
+ className,
109
+ )}
110
+ {...props}
111
+ >
112
+ <div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" />
113
+ </NavigationMenuPrimitive.Indicator>
114
+ ));
115
+ NavigationMenuIndicator.displayName =
116
+ NavigationMenuPrimitive.Indicator.displayName;
117
+
118
+ export {
119
+ NavigationMenu,
120
+ NavigationMenuContent,
121
+ NavigationMenuIndicator,
122
+ NavigationMenuItem,
123
+ NavigationMenuLink,
124
+ NavigationMenuList,
125
+ NavigationMenuTrigger,
126
+ NavigationMenuViewport,
127
+ navigationMenuTriggerStyle,
128
+ };
web/src/pages/home/applications.tsx ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Button } from '@/components/ui/button';
2
+ import { Card, CardContent } from '@/components/ui/card';
3
+ import { ChevronRight, Cpu, MessageSquare, Search } from 'lucide-react';
4
+
5
+ const applications = [
6
+ {
7
+ id: 1,
8
+ title: 'Jarvis chatbot',
9
+ type: 'Chat app',
10
+ date: '11/24/2024',
11
+ icon: <MessageSquare className="h-6 w-6" />,
12
+ },
13
+ {
14
+ id: 2,
15
+ title: 'Search app 01',
16
+ type: 'Search app',
17
+ date: '11/24/2024',
18
+ icon: <Search className="h-6 w-6" />,
19
+ },
20
+ {
21
+ id: 3,
22
+ title: 'Chatbot 01',
23
+ type: 'Chat app',
24
+ date: '11/24/2024',
25
+ icon: <MessageSquare className="h-6 w-6" />,
26
+ },
27
+ {
28
+ id: 4,
29
+ title: 'Workflow 01',
30
+ type: 'Agent',
31
+ date: '11/24/2024',
32
+ icon: <Cpu className="h-6 w-6" />,
33
+ },
34
+ ];
35
+
36
+ export function Applications() {
37
+ return (
38
+ <section className="mt-12">
39
+ <div className="flex justify-between items-center mb-6">
40
+ <h2 className="text-2xl font-bold">Applications</h2>
41
+ <div className="flex bg-colors-background-inverse-standard rounded-lg p-1">
42
+ <Button variant="default" size="sm">
43
+ All
44
+ </Button>
45
+ <Button variant="ghost" size="sm">
46
+ Chat
47
+ </Button>
48
+ <Button variant="ghost" size="sm">
49
+ Search
50
+ </Button>
51
+ <Button variant="ghost" size="sm">
52
+ Agents
53
+ </Button>
54
+ </div>
55
+ </div>
56
+ <div className="grid grid-cols-4 gap-6">
57
+ {[...Array(12)].map((_, i) => {
58
+ const app = applications[i % 4];
59
+ return (
60
+ <Card key={i} className="bg-colors-background-inverse-weak">
61
+ <CardContent className="p-4 flex items-center gap-6">
62
+ <div className="w-[70px] h-[70px] rounded-xl flex items-center justify-center bg-gradient-to-br from-[#45A7FA] via-[#AE63E3] to-[#4433FF]">
63
+ {app.icon}
64
+ </div>
65
+ <div className="flex-1">
66
+ <h3 className="text-lg font-semibold">{app.title}</h3>
67
+ <p className="text-sm opacity-80">{app.type}</p>
68
+ <p className="text-sm opacity-80">{app.date}</p>
69
+ </div>
70
+ <Button variant="secondary" size="icon">
71
+ <ChevronRight className="h-6 w-6" />
72
+ </Button>
73
+ </CardContent>
74
+ </Card>
75
+ );
76
+ })}
77
+ </div>
78
+ </section>
79
+ );
80
+ }
web/src/pages/home/banner.tsx CHANGED
@@ -1,5 +1,5 @@
1
  import { Card, CardContent } from '@/components/ui/card';
2
- import { ArrowRight } from 'lucide-react';
3
 
4
  function BannerCard() {
5
  return (
@@ -17,34 +17,22 @@ function BannerCard() {
17
  );
18
  }
19
 
20
- function MyCard() {
21
- return (
22
- <div className="w-[265px] h-[87px] pl-[17px] pr-[13px] py-[15px] bg-[#b8b5cb]/20 rounded-xl border border-[#e6e3f6]/10 backdrop-blur-md justify-between items-end inline-flex">
23
- <div className="grow shrink basis-0 flex-col justify-start items-start gap-[9px] inline-flex">
24
- <div className="px-1 py-0.5 bg-[#644bf7] rounded justify-center items-center gap-2 inline-flex">
25
- <div className="text-white text-xs font-medium font-['IBM Plex Mono'] leading-none">
26
- System
27
- </div>
28
- </div>
29
- <div className="self-stretch text-white text-lg font-normal font-['Inter'] leading-7">
30
- Setting up your LLM
31
- </div>
32
- </div>
33
- <div className="w-6 h-6 relative" />
34
- </div>
35
- );
36
- }
37
-
38
  export function Banner() {
39
  return (
40
- <section className="bg-[url('@/assets/banner.png')] bg-cover h-28 rounded-2xl mx-14 my-8 flex gap-8 justify-between">
41
  <div className="h-full text-3xl font-bold items-center inline-flex ml-6">
42
  Welcome to RAGFlow
43
  </div>
44
- <div className="flex justify-between items-center gap-10 mr-5">
 
45
  <BannerCard></BannerCard>
46
  <BannerCard></BannerCard>
47
- <MyCard></MyCard>
 
 
 
 
 
48
  </div>
49
  </section>
50
  );
 
1
  import { Card, CardContent } from '@/components/ui/card';
2
+ import { ArrowRight, X } from 'lucide-react';
3
 
4
  function BannerCard() {
5
  return (
 
17
  );
18
  }
19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  export function Banner() {
21
  return (
22
+ <section className="bg-[url('@/assets/banner.png')] bg-cover h-28 rounded-2xl my-8 flex gap-8 justify-between">
23
  <div className="h-full text-3xl font-bold items-center inline-flex ml-6">
24
  Welcome to RAGFlow
25
  </div>
26
+ <div className="flex justify-between items-center gap-4 mr-5">
27
+ <BannerCard></BannerCard>
28
  <BannerCard></BannerCard>
29
  <BannerCard></BannerCard>
30
+ <button
31
+ type="button"
32
+ className="relative p-1 hover:bg-white/10 rounded-full transition-colors"
33
+ >
34
+ <X className="w-6 h-6 text-white" />
35
+ </button>
36
  </div>
37
  </section>
38
  );
web/src/pages/home/card.tsx DELETED
@@ -1,39 +0,0 @@
1
- import { Button } from '@/components/ui/button';
2
- import {
3
- Card,
4
- CardContent,
5
- CardDescription,
6
- CardFooter,
7
- CardHeader,
8
- CardTitle,
9
- } from '@/components/ui/card';
10
- import { Input } from '@/components/ui/input';
11
- import { Label } from '@/components/ui/label';
12
-
13
- export function CardWithForm() {
14
- return (
15
- <Card className="w-[350px]">
16
- <CardHeader>
17
- <CardTitle>Create project</CardTitle>
18
- <CardDescription>Deploy your new project in one-click.</CardDescription>
19
- </CardHeader>
20
- <CardContent>
21
- <form>
22
- <div className="grid w-full items-center gap-4">
23
- <div className="flex flex-col space-y-1.5">
24
- <Label htmlFor="name">Name</Label>
25
- <Input id="name" placeholder="Name of your project" />
26
- </div>
27
- <div className="flex flex-col space-y-1.5">
28
- <Label htmlFor="framework">Framework</Label>
29
- </div>
30
- </div>
31
- </form>
32
- </CardContent>
33
- <CardFooter className="flex justify-between">
34
- <Button variant="outline">Cancel</Button>
35
- <Button>Deploy</Button>
36
- </CardFooter>
37
- </Card>
38
- );
39
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
web/src/pages/home/datasets.tsx ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Button } from '@/components/ui/button';
2
+ import { Card, CardContent } from '@/components/ui/card';
3
+ import { ChevronRight, MoreHorizontal } from 'lucide-react';
4
+
5
+ const datasets = [
6
+ {
7
+ id: 1,
8
+ title: 'Legal knowledge base',
9
+ files: '1,242 files',
10
+ size: '152 MB',
11
+ created: '12.02.2024',
12
+ image: '/image-3.png',
13
+ },
14
+ {
15
+ id: 2,
16
+ title: 'HR knowledge base',
17
+ files: '1,242 files',
18
+ size: '152 MB',
19
+ created: '12.02.2024',
20
+ image: '/image.png',
21
+ },
22
+ {
23
+ id: 3,
24
+ title: 'IT knowledge base',
25
+ files: '1,242 files',
26
+ size: '152 MB',
27
+ created: '12.02.2024',
28
+ image: '/rectangle-86.png',
29
+ },
30
+ {
31
+ id: 4,
32
+ title: 'Legal knowledge base',
33
+ files: '1,242 files',
34
+ size: '152 MB',
35
+ created: '12.02.2024',
36
+ image: '/image-2.png',
37
+ },
38
+ ];
39
+
40
+ export function Datasets() {
41
+ return (
42
+ <section>
43
+ <h2 className="text-2xl font-bold mb-6">Datasets</h2>
44
+ <div className="flex gap-6">
45
+ {datasets.map((dataset) => (
46
+ <Card
47
+ key={dataset.id}
48
+ className="bg-colors-background-inverse-weak flex-1"
49
+ >
50
+ <CardContent className="p-4">
51
+ <div className="flex justify-between mb-4">
52
+ <div
53
+ className="w-[70px] h-[70px] rounded-xl bg-cover"
54
+ style={{ backgroundImage: `url(${dataset.image})` }}
55
+ />
56
+ <Button variant="ghost" size="icon">
57
+ <MoreHorizontal className="h-6 w-6" />
58
+ </Button>
59
+ </div>
60
+ <div className="flex justify-between items-end">
61
+ <div>
62
+ <h3 className="text-lg font-semibold mb-2">
63
+ {dataset.title}
64
+ </h3>
65
+ <p className="text-sm opacity-80">
66
+ {dataset.files} | {dataset.size}
67
+ </p>
68
+ <p className="text-sm opacity-80">
69
+ Created {dataset.created}
70
+ </p>
71
+ </div>
72
+ <Button variant="secondary" size="icon">
73
+ <ChevronRight className="h-6 w-6" />
74
+ </Button>
75
+ </div>
76
+ </CardContent>
77
+ </Card>
78
+ ))}
79
+ <Button className="bg-[#9276ff] h-auto" variant={'secondary'}>
80
+ See all
81
+ </Button>
82
+ </div>
83
+ </section>
84
+ );
85
+ }
web/src/pages/home/header.tsx CHANGED
@@ -64,7 +64,7 @@ export function HomeHeader() {
64
  }, [navigate]);
65
 
66
  return (
67
- <section className="px-[60px] py-[12px] flex justify-between items-center">
68
  <div className="flex items-center gap-4">
69
  <img
70
  src={'/logo.svg'}
 
64
  }, [navigate]);
65
 
66
  return (
67
+ <section className="py-[12px] flex justify-between items-center">
68
  <div className="flex items-center gap-4">
69
  <img
70
  src={'/logo.svg'}
web/src/pages/home/index.tsx CHANGED
@@ -1,14 +1,16 @@
 
1
  import { Banner } from './banner';
 
2
  import { HomeHeader } from './header';
3
- import NextBanner from './next-banner';
4
 
5
  const Home = () => {
6
  return (
7
- <div>
8
  <HomeHeader></HomeHeader>
9
  <section>
10
  <Banner></Banner>
11
- <NextBanner></NextBanner>
 
12
  </section>
13
  </div>
14
  );
 
1
+ import { Applications } from './applications';
2
  import { Banner } from './banner';
3
+ import { Datasets } from './datasets';
4
  import { HomeHeader } from './header';
 
5
 
6
  const Home = () => {
7
  return (
8
+ <div className="text-white mx-8">
9
  <HomeHeader></HomeHeader>
10
  <section>
11
  <Banner></Banner>
12
+ <Datasets></Datasets>
13
+ <Applications></Applications>
14
  </section>
15
  </div>
16
  );
web/src/pages/home/next-banner.tsx DELETED
@@ -1,64 +0,0 @@
1
- import { Badge } from '@/components/ui/badge';
2
- import { Card, CardContent } from '@/components/ui/card';
3
- import { ArrowRight, X } from 'lucide-react';
4
-
5
- const guideCards = [
6
- {
7
- badge: 'System',
8
- title: 'Setting up your LLM',
9
- },
10
- {
11
- badge: 'Chat app',
12
- title: 'Configuration guides',
13
- },
14
- {
15
- badge: 'Search app',
16
- title: 'Prompt setting guides',
17
- },
18
- ];
19
-
20
- export default function WelcomeGuide(): JSX.Element {
21
- return (
22
- <div className="flex w-full max-w-[1800px] items-center gap-4 px-[60px] py-6 relative bg-[#223d8e0d] rounded-3xl overflow-hidden">
23
- <div
24
- className="absolute inset-0 bg-gradient-to-r from-pink-300 via-purple-400 to-blue-500 opacity-75"
25
- style={{
26
- backgroundSize: 'cover',
27
- backgroundPosition: 'center',
28
- }}
29
- />
30
-
31
- <h1 className="relative flex-1 text-4xl font-bold text-white">
32
- Welcome to RAGFlow
33
- </h1>
34
-
35
- <div className="inline-flex items-center gap-[22px] relative">
36
- {guideCards.map((card, index) => (
37
- <Card
38
- key={index}
39
- className="w-[265px] backdrop-blur-md border-colors-outline-neutral-standard"
40
- >
41
- <CardContent className="flex items-end justify-between p-[15px]">
42
- <div className="flex flex-col items-start gap-[9px] flex-1">
43
- <Badge
44
- variant="secondary"
45
- className="bg-colors-background-core-weak text-colors-text-neutral-strong"
46
- >
47
- {card.badge}
48
- </Badge>
49
- <p className="text-lg text-colors-text-neutral-strong">
50
- {card.title}
51
- </p>
52
- </div>
53
- <ArrowRight className="w-6 h-6" />
54
- </CardContent>
55
- </Card>
56
- ))}
57
- </div>
58
-
59
- <button className="relative p-1 hover:bg-white/10 rounded-full transition-colors">
60
- <X className="w-6 h-6 text-white" />
61
- </button>
62
- </div>
63
- );
64
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
web/tailwind.config.js CHANGED
@@ -69,6 +69,75 @@ module.exports = {
69
  DEFAULT: 'var(--background-core-weak)',
70
  foreground: 'var(--background-core-weak-foreground)',
71
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  },
73
  borderRadius: {
74
  lg: `var(--radius)`,
 
69
  DEFAULT: 'var(--background-core-weak)',
70
  foreground: 'var(--background-core-weak-foreground)',
71
  },
72
+
73
+ 'color-background-brand-default': {
74
+ DEFAULT: 'var(--color-background-brand-default)',
75
+ foreground: 'var(--background-inverse-standard-foreground)',
76
+ },
77
+ 'color-background-positive-default': {
78
+ DEFAULT: 'var(--color-background-positive-default)',
79
+ foreground: 'var(--background-inverse-standard-foreground)',
80
+ },
81
+ 'colors-background-core-standard': {
82
+ DEFAULT: 'var(--colors-background-core-standard)',
83
+ foreground: 'var(--background-inverse-standard-foreground)',
84
+ },
85
+ 'colors-background-core-strong': {
86
+ DEFAULT: 'var(--colors-background-core-strong)',
87
+ foreground: 'var(--background-inverse-standard-foreground)',
88
+ },
89
+ 'colors-background-core-weak': {
90
+ DEFAULT: 'var(--colors-background-core-weak)',
91
+ foreground: 'var(--background-inverse-standard-foreground)',
92
+ },
93
+ 'colors-background-functional-solid-danger': {
94
+ DEFAULT: 'var(--colors-background-functional-solid-danger)',
95
+ foreground: 'var(--background-inverse-standard-foreground)',
96
+ },
97
+ 'colors-background-functional-solid-notice': {
98
+ DEFAULT: 'var(--colors-background-functional-solid-notice)',
99
+ foreground: 'var(--background-inverse-standard-foreground)',
100
+ },
101
+ 'colors-background-functional-solid-positive': {
102
+ DEFAULT: 'var(--colors-background-functional-solid-positive)',
103
+ foreground: 'var(--background-inverse-standard-foreground)',
104
+ },
105
+ 'colors-background-functional-transparent-danger': {
106
+ DEFAULT: 'var(--colors-background-functional-transparent-danger)',
107
+ foreground: 'var(--background-inverse-standard-foreground)',
108
+ },
109
+ 'colors-background-functional-transparent-notice': {
110
+ DEFAULT: 'var(--colors-background-functional-transparent-notice)',
111
+ foreground: 'var(--background-inverse-standard-foreground)',
112
+ },
113
+ 'colors-background-functional-transparent-positive': {
114
+ DEFAULT: 'var(--colors-background-functional-transparent-positive)',
115
+ foreground: 'var(--background-inverse-standard-foreground)',
116
+ },
117
+ 'colors-background-inverse-standard': {
118
+ DEFAULT: 'var(--colors-background-inverse-standard)',
119
+ foreground: 'var(--background-inverse-standard-foreground)',
120
+ },
121
+ 'colors-background-inverse-strong': {
122
+ DEFAULT: 'var(--colors-background-inverse-strong)',
123
+ foreground: 'var(--background-inverse-standard-foreground)',
124
+ },
125
+ 'colors-background-inverse-weak': {
126
+ DEFAULT: 'var(--colors-background-inverse-weak)',
127
+ foreground: 'var(--background-inverse-standard-foreground)',
128
+ },
129
+ 'colors-background-neutral-standard': {
130
+ DEFAULT: 'var(--colors-background-neutral-standard)',
131
+ foreground: 'var(--background-inverse-standard-foreground)',
132
+ },
133
+ 'colors-background-neutral-strong': {
134
+ DEFAULT: 'var(--colors-background-neutral-strong)',
135
+ foreground: 'var(--background-inverse-standard-foreground)',
136
+ },
137
+ 'colors-background-neutral-weak': {
138
+ DEFAULT: 'var(--colors-background-neutral-weak)',
139
+ foreground: 'var(--background-inverse-standard-foreground)',
140
+ },
141
  },
142
  borderRadius: {
143
  lg: `var(--radius)`,
web/tailwind.css CHANGED
@@ -87,6 +87,27 @@
87
 
88
  --background-core-weak: rgb(101, 75, 248);
89
  --background-core-weak-foreground: rgba(255, 255, 255, 1);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  }
91
  }
92
 
 
87
 
88
  --background-core-weak: rgb(101, 75, 248);
89
  --background-core-weak-foreground: rgba(255, 255, 255, 1);
90
+
91
+ --colors-background-core-standard: rgba(137, 126, 255, 1);
92
+ --colors-background-core-strong: rgba(152, 147, 255, 1);
93
+ --colors-background-core-weak: rgba(101, 75, 248, 1);
94
+ --colors-background-functional-solid-danger: rgba(255, 57, 92, 1);
95
+ --colors-background-functional-solid-notice: rgba(255, 208, 94, 1);
96
+ --colors-background-functional-solid-positive: rgba(74, 225, 145, 1);
97
+ --colors-background-functional-transparent-danger: rgba(234, 50, 83, 0.2);
98
+ --colors-background-functional-transparent-notice: rgba(248, 208, 111, 0.5);
99
+ --colors-background-functional-transparent-positive: rgba(
100
+ 65,
101
+ 203,
102
+ 130,
103
+ 0.5
104
+ );
105
+ --colors-background-inverse-standard: rgba(230, 227, 246, 0.15);
106
+ --colors-background-inverse-strong: rgba(255, 255, 255, 0.15);
107
+ --colors-background-inverse-weak: rgba(184, 181, 203, 0.15);
108
+ --colors-background-neutral-standard: rgba(11, 10, 18, 1);
109
+ --colors-background-neutral-strong: rgba(29, 26, 44, 1);
110
+ --colors-background-neutral-weak: rgba(17, 16, 23, 1);
111
  }
112
  }
113