-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClients.tsx
84 lines (75 loc) · 3.75 KB
/
Clients.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
"use client";
import { useEffect, useRef } from "react";
import Image from "next/image";
import gsap from "gsap";
import { ScrollTrigger } from "gsap/ScrollTrigger";
import { testimonials } from "@/data";
import HeaderText from "@/components/ui/HeaderText";
gsap.registerPlugin(ScrollTrigger);
const Clients = () => {
const clientsRef = useRef(null);
useEffect(() => {
const ctx = gsap.context(() => {
gsap.from(".testimonial-card", {
y: 60,
opacity: 0,
duration: 0.8,
stagger: 0.2,
ease: "power4.out",
scrollTrigger: {
trigger: clientsRef.current,
start: "top center+=100",
},
});
}, clientsRef);
return () => ctx.revert();
}, []);
return (
<section ref={clientsRef} className="py-20 transparent" id="testimonials">
<div className="max-w-7xl mx-auto px-4">
<HeaderText title="What Our" highlight="Clients Say" className="mb-16" />
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
{testimonials.map((testimonial, index) => (
<div
key={index}
className="testimonial-card bg-[rgba(17,24,39,1)] p-6 rounded-lg shadow-lg hover:shadow-xl transition-shadow duration-300 text-white"
>
<div className="flex items-center mb-6">
<div className="relative w-16 h-16 rounded-full overflow-hidden">
<Image
src={testimonial.image}
alt={testimonial.name}
fill
className="object-cover"
/>
</div>
<div className="ml-4">
<h3 className="font-semibold text-lg text-white">{testimonial.name}</h3>
<p className="text-gray-400 text-sm">{testimonial.role}</p>
<p className="text-yellow-500 text-xs mt-1">{testimonial.company}</p>
</div>
</div>
<blockquote className="relative">
<svg
className="absolute top-0 left-0 transform -translate-x-6 -translate-y-8 h-16 w-16 text-gray-100 opacity-10"
width="16"
height="16"
viewBox="0 0 16 16"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
>
<path d="M7.39762 10.3C7.39762 11.0733 7.14888 11.7 6.6514 12.18C6.15392 12.6333 5.52552 12.86 4.76621 12.86C3.84979 12.86 3.09047 12.5533 2.48825 11.94C1.91222 11.3266 1.62421 10.4467 1.62421 9.29999C1.62421 8.07332 1.96459 6.87332 2.64535 5.69999C3.35231 4.49999 4.33418 3.55332 5.59098 2.85999L6.4943 4.25999C5.81354 4.73999 5.26369 5.27332 4.84476 5.85999C4.45201 6.44666 4.19017 7.12666 4.05926 7.89999C4.29491 7.79332 4.56983 7.73999 4.88403 7.73999C5.61716 7.73999 6.21938 7.97999 6.69067 8.45999C7.16197 8.93999 7.39762 9.55333 7.39762 10.3ZM14.6242 10.3C14.6242 11.0733 14.3755 11.7 13.878 12.18C13.3805 12.6333 12.7521 12.86 11.9928 12.86C11.0764 12.86 10.3171 12.5533 9.71484 11.94C9.13881 11.3266 8.85079 10.4467 8.85079 9.29999C8.85079 8.07332 9.19117 6.87332 9.87194 5.69999C10.5789 4.49999 11.5608 3.55332 12.8176 2.85999L13.7209 4.25999C13.0401 4.73999 12.4903 5.27332 12.0713 5.85999C11.6786 6.44666 11.4168 7.12666 11.2858 7.89999C11.5215 7.79332 11.7964 7.73999 12.1106 7.73999C12.8437 7.73999 13.446 7.97999 13.9173 8.45999C14.3886 8.93999 14.6242 9.55333 14.6242 10.3Z" />
</svg>
<p className="relative z-10 text-gray-300">
{testimonial.quote}
</p>
</blockquote>
</div>
))}
</div>
</div>
</section>
);
};
export default Clients;