Skip to content

Commit

Permalink
Added gradient border and some temp images
Browse files Browse the repository at this point in the history
  • Loading branch information
winzamark123 committed Nov 19, 2024
1 parent 568f304 commit 90f772b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions app/(pages)/(about-us)/_components/Recap/RecapCarousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@ import {
CarouselNext,
CarouselPrevious,
} from '@/components/ui/carousel';
import Image from 'next/image';
import CarouselIMG1 from '@/public/aboutUs/Recap/carousel1.png';
import CarouselIMG2 from '@/public/aboutUs/Recap/carousel2.png';
import CarouselIMG3 from '@/public/aboutUs/Recap/carousel3.png';

export function RecapCarousel() {
const [api, setApi] = React.useState<any>();
const [current, setCurrent] = React.useState(0);

const images = [CarouselIMG1, CarouselIMG2, CarouselIMG3];

React.useEffect(() => {
if (!api) return;

Expand All @@ -26,15 +32,20 @@ export function RecapCarousel() {
<div className="flex flex-col items-center gap-2 w-full max-w-xs">
<Carousel setApi={setApi} className="w-full">
<CarouselContent>
{Array.from({ length: 5 }).map((_, index) => (
{images.map((img, index) => (
<CarouselItem key={index}>
<div className="p-1">
<Card>
<CardContent className="flex aspect-square items-center justify-center p-6">
<span className="text-4xl font-semibold">{index + 1}</span>
<Card className="rounded-3xl overflow-hidden border-2 border-transparent bg-gradient-to-br from-blue-200 to-green-200 p-[1px]">
<div className="bg-white rounded-3xl h-full w-full overflow-hidden">
<CardContent className="relative flex aspect-square items-center justify-center">
<Image
src={img}
alt={`Carousel image ${index + 1}`}
className="object-cover w-full h-full"
fill
/>
</CardContent>
</Card>
</div>
</div>
</Card>
</CarouselItem>
))}
</CarouselContent>
Expand All @@ -44,7 +55,7 @@ export function RecapCarousel() {

{/* Indicators */}
<div className="flex gap-2 mt-2">
{Array.from({ length: 5 }).map((_, index) => (
{images.map((_, index) => (
<button
key={index}
className={`w-2 h-2 rounded-full transition-all ${
Expand Down
Binary file added public/aboutUs/Recap/carousel1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/aboutUs/Recap/carousel2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/aboutUs/Recap/carousel3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 90f772b

Please sign in to comment.