From c409893fd4d7add6a095e3095021083729d95b75 Mon Sep 17 00:00:00 2001 From: "Eng. Elias" Date: Fri, 1 Mar 2024 12:51:44 +0400 Subject: [PATCH] CrewAI Visualizer Hero Page --- package-lock.json | 46 ++++-- package.json | 1 + src/app/page.tsx | 8 +- src/components/side_nav.tsx | 2 +- src/components/ui/hero.tsx | 288 ++++++++++++++++++++++++++++++++++++ 5 files changed, 328 insertions(+), 17 deletions(-) create mode 100644 src/components/ui/hero.tsx diff --git a/package-lock.json b/package-lock.json index bd9b5b9..e9896a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@as-integrations/next": "^3.0.0", "@material-tailwind/react": "^2.1.9", "@prisma/client": "^5.9.1", + "framer-motion": "^11.0.8", "graphql": "^16.8.1", "next": "14.1.0", "node-calls-python": "^1.8.2", @@ -1261,6 +1262,26 @@ "node": ">=0.10.0" } }, + "node_modules/@material-tailwind/react/node_modules/framer-motion": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-6.5.1.tgz", + "integrity": "sha512-o1BGqqposwi7cgDrtg0dNONhkmPsUFDaLcKXigzuTFC5x58mE8iyTazxSudFzmT6MEyJKfjjU8ItoMe3W+3fiw==", + "dependencies": { + "@motionone/dom": "10.12.0", + "framesync": "6.0.1", + "hey-listen": "^1.0.8", + "popmotion": "11.0.3", + "style-value-types": "5.0.0", + "tslib": "^2.1.0" + }, + "optionalDependencies": { + "@emotion/is-prop-valid": "^0.8.2" + }, + "peerDependencies": { + "react": ">=16.8 || ^17.0.0 || ^18.0.0", + "react-dom": ">=16.8 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/@motionone/animation": { "version": "10.17.0", "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.17.0.tgz", @@ -3886,23 +3907,26 @@ } }, "node_modules/framer-motion": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-6.5.1.tgz", - "integrity": "sha512-o1BGqqposwi7cgDrtg0dNONhkmPsUFDaLcKXigzuTFC5x58mE8iyTazxSudFzmT6MEyJKfjjU8ItoMe3W+3fiw==", + "version": "11.0.8", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-11.0.8.tgz", + "integrity": "sha512-1KSGNuqe1qZkS/SWQlDnqK2VCVzRVEoval379j0FiUBJAZoqgwyvqFkfvJbgW2IPFo4wX16K+M0k5jO23lCIjA==", "dependencies": { - "@motionone/dom": "10.12.0", - "framesync": "6.0.1", - "hey-listen": "^1.0.8", - "popmotion": "11.0.3", - "style-value-types": "5.0.0", - "tslib": "^2.1.0" + "tslib": "^2.4.0" }, "optionalDependencies": { "@emotion/is-prop-valid": "^0.8.2" }, "peerDependencies": { - "react": ">=16.8 || ^17.0.0 || ^18.0.0", - "react-dom": ">=16.8 || ^17.0.0 || ^18.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } } }, "node_modules/framesync": { diff --git a/package.json b/package.json index da74cdd..596c593 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "@as-integrations/next": "^3.0.0", "@material-tailwind/react": "^2.1.9", "@prisma/client": "^5.9.1", + "framer-motion": "^11.0.8", "graphql": "^16.8.1", "next": "14.1.0", "node-calls-python": "^1.8.2", diff --git a/src/app/page.tsx b/src/app/page.tsx index 4793eb2..f4d6032 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,7 +1,5 @@ +import { HeroSection } from "@/components/ui/hero"; + export default function Home() { - return ( -
-

Welcome to CrewAI Visualizer

-
- ); + return ; } diff --git a/src/components/side_nav.tsx b/src/components/side_nav.tsx index 2bb65ae..feac95c 100644 --- a/src/components/side_nav.tsx +++ b/src/components/side_nav.tsx @@ -46,7 +46,7 @@ const SideNav = () => { isAgentsActive ? "font-bold" : "" }`} > - Agents + Crew diff --git a/src/components/ui/hero.tsx b/src/components/ui/hero.tsx new file mode 100644 index 0000000..b625e92 --- /dev/null +++ b/src/components/ui/hero.tsx @@ -0,0 +1,288 @@ +"use client"; + +import React from "react"; +import { motion } from "framer-motion"; +import Link from "next/link"; + +const grad1 = { + initial: { + x1: "0%", + x2: "0%", + y1: "80%", + y2: "100%", + }, + animate: { + x1: ["0%", "0%", "200%"], + x2: ["0%", "0%", "180%"], + y1: ["80%", "0%", "0%"], + y2: ["100%", "20%", "20%"], + }, +}; + +const grad2 = { + initial: { + x1: "0%", + x2: "0%", + y1: "80%", + y2: "100%", + }, + animate: { + x1: ["20%", "100%", "100%"], + x2: ["0%", "90%", "90%"], + y1: ["80%", "80%", "-20%"], + y2: ["100%", "100%", "0%"], + }, +}; +const grad3 = { + initial: { + x1: "0%", + x2: "0%", + y1: "80%", + y2: "100%", + }, + animate: { + x1: ["20%", "100%", "100%"], + x2: ["0%", "90%", "90%"], + y1: ["80%", "80%", "-20%"], + y2: ["100%", "100%", "0%"], + }, +}; +const grad4 = { + initial: { + x1: "40%", + x2: "50%", + y1: "160%", + y2: "180%", + }, + animate: { + x1: "0%", + x2: "10%", + y1: "-40%", + y2: "-20%", + }, +}; +const grad5 = { + initial: { + x1: "-40%", + x2: "-10%", + y1: "0%", + y2: "20%", + }, + animate: { + x1: ["40%", "0%", "0%"], + x2: ["10%", "0%", "0%"], + y1: ["0%", "0%", "180%"], + y2: ["20%", "20%", "200%"], + }, +}; +export const HeroSection = () => { + return ( +
+ + + + +
+ + CrewAI Visualizer + + + Build your Crew and do your Missions efficiantly + +
+ + {/* Core SVGs component */} +
+ +
+
+ ); +}; + +export const SVGs = () => { + return ( + + + + + + + + {/* Gradient Beams */} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +}; +const GradientColors = () => { + return ( + <> + + + + + + ); +};