All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 27s
Build & Deploy / 🚀 Deploy (push) Successful in 34s
Build & Deploy / 🧪 QA (push) Successful in 1m46s
Build & Deploy / 🏗️ Build (push) Successful in 3m38s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 1m19s
Build & Deploy / 🔔 Notify (push) Successful in 5s
114 lines
6.4 KiB
TypeScript
114 lines
6.4 KiB
TypeScript
'use client';
|
|
|
|
import * as React from 'react';
|
|
import { m } from 'framer-motion';
|
|
import Image from 'next/image';
|
|
import { useTranslations } from 'next-intl';
|
|
|
|
export interface TeamMember {
|
|
id: string;
|
|
name: string;
|
|
position: string;
|
|
email?: string | null;
|
|
phone?: string | null;
|
|
image?: {
|
|
url: string;
|
|
alt?: string;
|
|
} | string | null;
|
|
branch?: string;
|
|
}
|
|
|
|
interface TeamGridProps {
|
|
members: TeamMember[];
|
|
}
|
|
|
|
export function TeamGrid({ members }: TeamGridProps) {
|
|
const t = useTranslations('TeamGrid');
|
|
|
|
if (!members || members.length === 0) return null;
|
|
|
|
return (
|
|
<section className="py-16 md:py-24 lg:py-32 bg-white relative overflow-hidden">
|
|
<div className="container relative z-10">
|
|
<div className="mb-12">
|
|
<h2 className="text-primary font-bold tracking-wider uppercase text-sm mb-3">{t('badge')}</h2>
|
|
<h3 className="font-heading text-3xl md:text-4xl font-extrabold text-neutral-dark mb-4">{t('title')}</h3>
|
|
<p className="text-text-secondary max-w-2xl text-lg">
|
|
{t('subtitle')}
|
|
</p>
|
|
</div>
|
|
|
|
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 xl:gap-10">
|
|
{members.map((member, i) => (
|
|
<m.div
|
|
key={member.id}
|
|
initial={{ opacity: 0, y: 20 }}
|
|
whileInView={{ opacity: 1, y: 0 }}
|
|
viewport={{ once: true, margin: "-50px" }}
|
|
transition={{ delay: i * 0.1, duration: 1.0, ease: [0.16, 1, 0.3, 1] }}
|
|
className="group flex flex-col bg-white rounded-[2rem] border border-neutral-100 shadow-[0_8px_30px_rgb(0,0,0,0.04)] hover:shadow-[0_20px_40px_rgba(238,114,3,0.1)] transition-all duration-500 hover:-translate-y-2 overflow-hidden"
|
|
>
|
|
{/* Card Banner */}
|
|
<div className="h-32 bg-neutral-50 relative border-b border-neutral-100 overflow-hidden">
|
|
<div className="absolute inset-0 bg-gradient-to-br from-neutral-100 to-neutral-200/50" />
|
|
<div className="absolute inset-0 opacity-[0.03] pointer-events-none" style={{ backgroundImage: "url('data:image/svg+xml,%3Csvg width=\\'20\\' height=\\'20\\' viewBox=\\'0 0 20 20\\' xmlns=\\'http://www.w3.org/2000/svg\\'%3E%3Crect width=\\'1\\' height=\\'1\\' fill=\\'%23000000\\'/%3E%3C/svg%3E')" }} />
|
|
</div>
|
|
|
|
<div className="px-8 pb-8 relative flex-grow flex flex-col">
|
|
{/* Overlapping Profile Picture */}
|
|
<div className="w-24 h-24 rounded-2xl overflow-hidden border-4 border-white shadow-xl bg-white relative -mt-12 mb-6 group-hover:-translate-y-2 transition-transform duration-500">
|
|
{member.image && (typeof member.image === 'string' ? member.image : member.image.url) ? (
|
|
<Image
|
|
src={typeof member.image === 'string' ? member.image : member.image.url}
|
|
alt={member.name}
|
|
fill
|
|
sizes="96px"
|
|
className="object-cover"
|
|
/>
|
|
) : (
|
|
<div className="absolute inset-0 flex items-center justify-center text-neutral-300 bg-neutral-50">
|
|
<svg className="w-10 h-10" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>
|
|
</div>
|
|
)}
|
|
</div>
|
|
|
|
{/* Details */}
|
|
<h4 className="font-heading font-extrabold text-2xl text-neutral-dark mb-1 group-hover:text-primary transition-colors duration-300 leading-tight">{member.name}</h4>
|
|
<p className="text-primary font-bold text-xs uppercase tracking-widest mb-6">{member.position}</p>
|
|
|
|
{member.branch && (
|
|
<div className="mb-6">
|
|
<span className="inline-block px-3 py-1 bg-neutral-100 text-neutral-600 rounded-md text-xs uppercase tracking-widest font-semibold border border-neutral-200/60">
|
|
{member.branch === 'e-tib' ? t('branchETIB') : member.branch === 'ing' ? t('branchIng') : member.branch === 'bohrtechnik' ? t('branchBohr') : member.branch}
|
|
</span>
|
|
</div>
|
|
)}
|
|
|
|
{/* Contacts (Sticky at bottom) */}
|
|
<div className="mt-auto pt-6 border-t border-neutral-100 flex flex-col gap-4">
|
|
{member.email && (
|
|
<a href={`mailto:${member.email}`} className="group/link flex items-center gap-4 text-text-secondary hover:text-primary transition-colors font-medium">
|
|
<div className="w-10 h-10 rounded-xl bg-neutral-50 flex items-center justify-center text-neutral-400 group-hover/link:bg-primary/10 group-hover/link:text-primary transition-colors border border-neutral-100">
|
|
<svg className="w-4 h-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg>
|
|
</div>
|
|
<span className="truncate">{member.email}</span>
|
|
</a>
|
|
)}
|
|
{member.phone && (
|
|
<a href={`tel:${member.phone}`} className="group/link flex items-center gap-4 text-text-secondary hover:text-primary transition-colors font-medium">
|
|
<div className="w-10 h-10 rounded-xl bg-neutral-50 flex items-center justify-center text-neutral-400 group-hover/link:bg-primary/10 group-hover/link:text-primary transition-colors border border-neutral-100">
|
|
<svg className="w-4 h-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>
|
|
</div>
|
|
<span>{member.phone}</span>
|
|
</a>
|
|
)}
|
|
</div>
|
|
</div>
|
|
</m.div>
|
|
))}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
);
|
|
}
|