|
| 1 | +'use client'; |
| 2 | +import React from 'react'; |
| 3 | + |
| 4 | +export default function CardHover() { |
| 5 | + |
| 6 | + type UserDataType = { |
| 7 | + name: string; |
| 8 | + role: string; |
| 9 | + company: string; |
| 10 | + image?: string; |
| 11 | + description: string; |
| 12 | + skills: string[]; |
| 13 | + portfilioLink?: string; |
| 14 | + } |
| 15 | + |
| 16 | + const userData: UserDataType[] = [ |
| 17 | + { |
| 18 | + name: "Md Numan Ahmed", |
| 19 | + role: "SDE-III", |
| 20 | + company: "Struct-UI", |
| 21 | + image: "https://numan-dev.web.app/images/my-pic.png", |
| 22 | + description: "Hi, I'm Numan. I've been working as a Software Engineer (Full Stack) for over 5 years. In this time, I've helped build and scale applications for different kinds of projects, from startups to growing businesses. While many know me as a “Full Stack” engineer, I like to see myself as a passionate problem solver — always eager to learn, share knowledge, and push boundaries to create meaningful digital experiences.", |
| 23 | + skills: ["Next.js", "React", "Angular", "Node.js"], |
| 24 | + portfilioLink: "https://numan-dev.web.app", |
| 25 | + }, |
| 26 | + { |
| 27 | + name: "Yogesh Mishra", |
| 28 | + role: "SDE-II", |
| 29 | + company: "Struct-UI", |
| 30 | + image: "", |
| 31 | + description: "I am Yogesh Mishra, a software engineer with over 3 years of experience in building scalable web applications. I have a strong foundation in React, Node.js, and Next.js, and I am passionate about learning new technologies and staying up-to-date with industry trends. Yogesh is a team player with a strong work ethic and is always eager to help others. He is currently working as a Software Engineer at Struct-UI and is responsible for developing and maintaining the company's web applications.", |
| 32 | + skills: ["React", "Node.js", "Next.js", "TypeScript"], |
| 33 | + portfilioLink: "https://linktr.ee/yogi.js", |
| 34 | + } |
| 35 | + ] |
| 36 | + |
| 37 | + const getInitials = (fullName: string) => { |
| 38 | + if (!fullName) return "N A"; |
| 39 | + const nameParts = fullName.trim().split(/\s+/); |
| 40 | + const firstName = nameParts[0]?.[0] || ""; |
| 41 | + const lastName = nameParts[nameParts.length - 1]?.[0] || ""; |
| 42 | + return (`${firstName} ${lastName}`).toUpperCase(); |
| 43 | + } |
| 44 | + |
| 45 | + return ( |
| 46 | + <> |
| 47 | + <div className="flex items-center justify-around flex-wrap"> |
| 48 | + |
| 49 | + {userData.map((user, index) => ( |
| 50 | + <div key={index} className="group relative w-80 transform overflow-hidden rounded-md bg-white p-6 text-gray-800 shadow-lg ring-1 ring-gray-100 transition-transform duration-500 hover:-translate-y-2 hover:scale-105 focus:ring-4 focus:ring-indigo-300 focus:outline-none dark:bg-gray-800 dark:text-gray-100 dark:shadow-2xl dark:ring-gray-700 dark:focus:ring-indigo-600" aria-label="Cool hover effect card"> |
| 51 | + <span className="pointer-events-none absolute -top-10 -left-8 h-40 w-40 transform rounded-full bg-gradient-to-tr from-indigo-300 via-pink-300 to-rose-300 opacity-30 blur-3xl transition-all duration-500 group-hover:scale-110 group-hover:opacity-60 dark:opacity-20"></span> |
| 52 | + <span className="pointer-events-none absolute -right-10 -bottom-10 h-48 w-48 transform rounded-full bg-gradient-to-bl from-emerald-200 via-cyan-200 to-indigo-200 opacity-25 blur-3xl transition-all duration-700 group-hover:scale-105 group-hover:opacity-50 dark:opacity-10"></span> |
| 53 | + |
| 54 | + <div className="glass-blur pointer-events-none absolute inset-x-0 top-0 h-14 bg-white/30 mix-blend-overlay dark:bg-gray-900/30"></div> |
| 55 | + |
| 56 | + <div className="relative z-10 flex flex-col gap-4"> |
| 57 | + <div className="flex items-center justify-between"> |
| 58 | + <div className="flex items-center gap-3"> |
| 59 | + <div className="h-12 w-12 overflow-hidden rounded-full bg-gradient-to-br from-blue-400 to-cyan-400 flex items-center justify-center"> |
| 60 | + {user.image ? ( |
| 61 | + <img src={user.image} alt={user.name} /> |
| 62 | + ) : ( |
| 63 | + <span className="text-white font-bold">{getInitials(user.name)}</span> |
| 64 | + )} |
| 65 | + </div> |
| 66 | + <div> |
| 67 | + <h3 className="text-lg leading-tight font-semibold">{user.name}</h3> |
| 68 | + <p className="text-sm text-gray-500 dark:text-gray-300/70"> |
| 69 | + {user.role} at <span className="font-semibold">{user.company}</span> |
| 70 | + </p> |
| 71 | + </div> |
| 72 | + </div> |
| 73 | + </div> |
| 74 | + |
| 75 | + <div className="max-h-[14rem] overflow-hidden text-ellipsis"> |
| 76 | + <p className="text-sm text-gray-600 dark:text-gray-300/80 line-clamp-5"> |
| 77 | + {user.description} |
| 78 | + </p> |
| 79 | + </div> |
| 80 | + |
| 81 | + <div className="flex flex-wrap gap-2"> |
| 82 | + {user.skills.map((skill, index) => ( |
| 83 | + <span key={index} className="cursor-pointer rounded-md bg-gray-100 px-2 py-1 text-xs text-gray-700 dark:bg-gray-700/40 dark:text-gray-200">{skill}</span> |
| 84 | + ))} |
| 85 | + </div> |
| 86 | + |
| 87 | + <div className="pt-2 w-full"> |
| 88 | + <a href={user.portfilioLink ? user.portfilioLink : "#"} target="_blank" className="w-full py-1.5 px-4 bg-gradient-to-r from-cyan-500 to-blue-600 text-white font-medium rounded-md transition-all duration-300 hover:from-cyan-600 hover:to-blue-700 hover:shadow-lg transform hover:-translate-y-0.5 focus:outline-none focus:ring-2 focus:ring-cyan-400 focus:ring-opacity-50 dark:from-cyan-600 dark:to-blue-700 dark:hover:from-cyan-700 dark:hover:to-blue-800 flex items-center justify-center"> |
| 89 | + <div className="flex items-center justify-between w-full"> |
| 90 | + <span>View Portfolio</span> |
| 91 | + <svg className="h-4 w-4 " xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5" aria-hidden="true"> |
| 92 | + <path stroke-linecap="round" stroke-linejoin="round" d="M17 8l4 4m0 0l-4 4m4-4H3" /> |
| 93 | + </svg> |
| 94 | + </div> |
| 95 | + </a> |
| 96 | + </div> |
| 97 | + </div> |
| 98 | + </div> |
| 99 | + ))} |
| 100 | + |
| 101 | + </div> |
| 102 | + </> |
| 103 | + ); |
| 104 | +} |
0 commit comments