diff --git a/components/home.tsx b/components/home.tsx index 713b596..e41372f 100644 --- a/components/home.tsx +++ b/components/home.tsx @@ -8,6 +8,7 @@ declare global { import { Button } from "@/components/ui/button"; import { Card } from "@/components/ui/card"; +import { Carousel } from "@/components/ui/carousel"; import { Downloads } from "@/lib/types"; import { DeviceDetails } from "@/lib/ua"; import { @@ -21,6 +22,9 @@ import { CheckCircle2, Sprout, Play, + Rocket, + Shield, + Globe, } from "lucide-react"; import Image from "next/image"; import Link from "next/link"; @@ -243,78 +247,143 @@ export default function Component({ {/* Feature Cards */}
-
- } - title="Zero Setup" - description="GitHub native integration" - gradient="from-[#ff6bfd] to-indigo-500" - details={[ - { - icon: , - text: "One-Click Setup", - }, - { - icon: , - text: "10-second task creation", - }, - { - icon: ( - - ), - text: "Parallel Execution", - }, - ]} - /> - } - title="Iterate on PR" - description="Automated PR workflow" - gradient="from-indigo-400 to-cyan-400" - details={[ - { - icon: , - text: "Smart PR suggestions", - }, - { - icon: , - text: "Automatic code reviews", - }, - { - icon: ( - - ), - text: "Continuous improvements", - }, - ]} - /> - } - title="Parallel Execution" - description="Run agents in parallel" - gradient="from-cyan-400 to-[#ff6bfd]" - details={[ - { - icon: , - text: "AGENTS AGENTS AGENTS", - }, - { - icon: , - text: "Efficient task distribution", - }, - { - icon: ( - - ), - text: "Real-time progress tracking", - }, - ]} - /> -
-
+

+ Our Features +

+ + {[ + } + title="Zero Setup" + description="GitHub native integration" + gradient="from-[#ff6bfd] to-indigo-500" + details={[ + { + icon: , + text: "One-Click Setup", + }, + { + icon: , + text: "10-second task creation", + }, + { + icon: , + text: "Parallel Execution", + }, + ]} + />, + } + title="Iterate on PR" + description="Automated PR workflow" + gradient="from-indigo-400 to-cyan-400" + details={[ + { + icon: , + text: "Smart PR suggestions", + }, + { + icon: , + text: "Automatic code reviews", + }, + { + icon: , + text: "Continuous improvements", + }, + ]} + />, + } + title="Parallel Execution" + description="Run agents in parallel" + gradient="from-cyan-400 to-[#ff6bfd]" + details={[ + { + icon: , + text: "AGENTS AGENTS AGENTS", + }, + { + icon: , + text: "Efficient task distribution", + }, + { + icon: , + text: "Real-time progress tracking", + }, + ]} + />, + } + title="Accelerated Development" + description="Boost your productivity" + gradient="from-green-400 to-blue-500" + details={[ + { + icon: , + text: "Automated code generation", + }, + { + icon: , + text: "Intelligent refactoring", + }, + { + icon: , + text: "Optimized workflows", + }, + ]} + />, + } + title="Enhanced Security" + description="Protect your codebase" + gradient="from-red-400 to-yellow-400" + details={[ + { + icon: , + text: "Vulnerability scanning", + }, + { + icon: , + text: "Security best practices", + }, + { + icon: , + text: "Compliance monitoring", + }, + ]} + />, + } + title="Global Collaboration" + description="Work together seamlessly" + gradient="from-purple-400 to-pink-400" + details={[ + { + icon: , + text: "Real-time collaboration", + }, + { + icon: , + text: "Cross-team integration", + }, + { + icon: , + text: "Unified workflow", + }, + ]} + />, + ]} + +
); -} +} \ No newline at end of file diff --git a/components/ui/carousel.tsx b/components/ui/carousel.tsx new file mode 100644 index 0000000..bb2c886 --- /dev/null +++ b/components/ui/carousel.tsx @@ -0,0 +1,163 @@ +"use client"; + +import React, { useState, useEffect } from "react"; +import { motion, AnimatePresence } from "framer-motion"; +import { ChevronLeft, ChevronRight } from "lucide-react"; +import { cn } from "@/lib/utils"; + +interface CarouselProps { + children: React.ReactNode[]; + autoPlay?: boolean; + interval?: number; + showArrows?: boolean; + showDots?: boolean; + className?: string; + cardsToShow?: number; +} + +export function Carousel({ + children, + autoPlay = true, + interval = 5000, + showArrows = true, + showDots = true, + className, + cardsToShow = 3, +}: CarouselProps) { + const [currentIndex, setCurrentIndex] = useState(0); + const [isPaused, setIsPaused] = useState(false); + const [visibleCardCount, setVisibleCardCount] = useState(cardsToShow); + + // Update visible card count based on screen size + useEffect(() => { + const handleResize = () => { + if (typeof window !== 'undefined') { + if (window.innerWidth < 640) { + setVisibleCardCount(1); + } else if (window.innerWidth < 768) { + setVisibleCardCount(2); + } else { + setVisibleCardCount(cardsToShow); + } + } + }; + + // Set initial value + handleResize(); + + // Add event listener + window.addEventListener('resize', handleResize); + + // Cleanup + return () => window.removeEventListener('resize', handleResize); + }, [cardsToShow]); + + // Calculate the total number of "pages" based on the number of cards to show + const totalPages = Math.ceil(children.length / visibleCardCount); + + const handleNext = () => { + setCurrentIndex((prevIndex) => { + const nextIndex = prevIndex + visibleCardCount; + return nextIndex >= children.length ? 0 : nextIndex; + }); + }; + + const handlePrev = () => { + setCurrentIndex((prevIndex) => { + const nextIndex = prevIndex - visibleCardCount; + return nextIndex < 0 ? Math.max(0, children.length - visibleCardCount) : nextIndex; + }); + }; + + const handleDotClick = (pageIndex: number) => { + setCurrentIndex(pageIndex * visibleCardCount); + }; + + useEffect(() => { + if (autoPlay && !isPaused) { + const timer = setTimeout(() => { + handleNext(); + }, interval); + + return () => clearTimeout(timer); + } + }, [currentIndex, autoPlay, interval, isPaused]); + + // Get the current visible cards + const visibleCards = () => { + const cards = []; + for (let i = 0; i < visibleCardCount; i++) { + const index = currentIndex + i; + if (index < children.length) { + cards.push(children[index]); + } + } + return cards; + }; + + return ( +
setIsPaused(true)} + onMouseLeave={() => setIsPaused(false)} + > +
+ + + {visibleCards().map((card, index) => ( +
+ {card} +
+ ))} +
+
+
+ + {showArrows && ( + <> + + + + )} + + {showDots && totalPages > 1 && ( +
+ {Array.from({ length: totalPages }).map((_, index) => { + const pageStartIndex = index * visibleCardCount; + return ( +
+ )} +
+ ); +} \ No newline at end of file