Spaces:
Sleeping
Sleeping
File size: 4,285 Bytes
64c5e26 |
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 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
import { buttonVariants } from "@/components/ui/button";
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@/components/ui/card";
import { Facebook, Instagram, Linkedin } from "lucide-react";
interface TeamProps {
imageUrl: string;
name: string;
position: string;
socialNetworks: SociaNetworkslProps[];
}
interface SociaNetworkslProps {
name: string;
url: string;
}
const teamList: TeamProps[] = [
{
imageUrl: "https://i.pravatar.cc/150?img=35",
name: "Emma Smith",
position: "Product Manager",
socialNetworks: [
{ name: "Linkedin", url: "http://linkedin.com" },
{
name: "Facebook",
url: "https://www.facebook.com/",
},
{
name: "Instagram",
url: "https://www.instagram.com/",
},
],
},
{
imageUrl: "https://i.pravatar.cc/150?img=60",
name: "John Doe",
position: "Tech Lead",
socialNetworks: [
{ name: "Linkedin", url: "http://linkedin.com" },
{
name: "Facebook",
url: "https://www.facebook.com/",
},
{
name: "Instagram",
url: "https://www.instagram.com/",
},
],
},
{
imageUrl: "https://i.pravatar.cc/150?img=36",
name: "Ashley Ross",
position: "Frontend Developer",
socialNetworks: [
{ name: "Linkedin", url: "http://linkedin.com" },
{
name: "Instagram",
url: "https://www.instagram.com/",
},
],
},
{
imageUrl: "https://i.pravatar.cc/150?img=17",
name: "Bruce Rogers",
position: "Backend Developer",
socialNetworks: [
{ name: "Linkedin", url: "http://linkedin.com" },
{
name: "Facebook",
url: "https://www.facebook.com/",
},
],
},
];
export const Team = () => {
const socialIcon = (iconName: string) => {
switch (iconName) {
case "Linkedin":
return <Linkedin size="20" />;
case "Facebook":
return <Facebook size="20" />;
case "Instagram":
return <Instagram size="20" />;
}
};
return (
<section
id="team"
className="container py-24 sm:py-32"
>
<h2 className="text-3xl md:text-4xl font-bold">
<span className="bg-gradient-to-b from-primary/60 to-primary text-transparent bg-clip-text">
Our Dedicated{" "}
</span>
Crew
</h2>
<p className="mt-4 mb-10 text-xl text-muted-foreground">
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Veritatis
dolor pariatur sit!
</p>
<div className="grid md:grid-cols-2 lg:grid-cols-4 gap-8 gap-y-10">
{teamList.map(
({ imageUrl, name, position, socialNetworks }: TeamProps) => (
<Card
key={name}
className="bg-muted/50 relative mt-8 flex flex-col justify-center items-center"
>
<CardHeader className="mt-8 flex justify-center items-center pb-2">
<img
src={imageUrl}
alt={`${name} ${position}`}
className="absolute -top-12 rounded-full w-24 h-24 aspect-square object-cover"
/>
<CardTitle className="text-center">{name}</CardTitle>
<CardDescription className="text-primary">
{position}
</CardDescription>
</CardHeader>
<CardContent className="text-center pb-2">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
</CardContent>
<CardFooter>
{socialNetworks.map(({ name, url }: SociaNetworkslProps) => (
<div key={name}>
<a
href={url}
target="_blank"
className={buttonVariants({
variant: "ghost",
size: "sm",
})}
>
<span className="sr-only">{name} icon</span>
{socialIcon(name)}
</a>
</div>
))}
</CardFooter>
</Card>
)
)}
</div>
</section>
);
};
|