|
| 1 | +--- |
| 2 | +import { teamsTexts } from '../i18n/teams' |
| 3 | +
|
| 4 | +interface Props { |
| 5 | + lang: string |
| 6 | +} |
| 7 | +
|
| 8 | +const { lang } = Astro.props |
| 9 | +const t = teamsTexts[(lang || 'es') as keyof typeof teamsTexts] |
| 10 | +
|
| 11 | +const teams = ( |
| 12 | + Object.values(import.meta.glob('../data/teams/*.md', { eager: true })) as { |
| 13 | + frontmatter: { name: string; description: string; contact: string } |
| 14 | + }[] |
| 15 | +).sort((a, b) => a.frontmatter.name.localeCompare(b.frontmatter.name)) |
| 16 | +--- |
| 17 | + |
| 18 | +<div class="teams-container pb-20"> |
| 19 | + <section class="mb-12" aria-labelledby="teams-heading"> |
| 20 | + <h1 id="teams-heading" class="text-4xl md:text-6xl font-black text-white mb-6 uppercase tracking-tighter"> |
| 21 | + {t.hero} |
| 22 | + </h1> |
| 23 | + </section> |
| 24 | + |
| 25 | + <section aria-labelledby="teams-list-heading"> |
| 26 | + <ul role="list" class="grid md:grid-cols-2 gap-8 list-none m-0 p-0"> |
| 27 | + { |
| 28 | + teams.map(({ frontmatter: team }) => ( |
| 29 | + <li class="bg-pycon-black/40 p-8 rounded-2xl border border-white/5 hover:border-pycon-orange/50 transition-all motion-safe:hover:-translate-y-2"> |
| 30 | + <h2 class="text-xl font-bold text-pycon-orange mb-3">{team.name}</h2> |
| 31 | + <p class="text-pycon-gray-25 text-sm leading-relaxed mb-6">{team.description}</p> |
| 32 | + <a |
| 33 | + href={`mailto:${team.contact}`} |
| 34 | + aria-label={`${t.contact} ${team.name}: ${team.contact}`} |
| 35 | + class="inline-flex items-center gap-2 text-sm text-pycon-yellow hover:text-white transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-pycon-yellow rounded" |
| 36 | + > |
| 37 | + <svg |
| 38 | + class="w-4 h-4 shrink-0" |
| 39 | + fill="none" |
| 40 | + stroke="currentColor" |
| 41 | + viewBox="0 0 24 24" |
| 42 | + aria-hidden="true" |
| 43 | + > |
| 44 | + <path |
| 45 | + stroke-linecap="round" |
| 46 | + stroke-linejoin="round" |
| 47 | + stroke-width="2" |
| 48 | + d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" |
| 49 | + /> |
| 50 | + </svg> |
| 51 | + <span aria-hidden="true"> |
| 52 | + {t.contact}: {team.contact} |
| 53 | + </span> |
| 54 | + </a> |
| 55 | + </li> |
| 56 | + )) |
| 57 | + } |
| 58 | + </ul> |
| 59 | + </section> |
| 60 | +</div> |
| 61 | + |
| 62 | +<style> |
| 63 | + .teams-container { |
| 64 | + animation: fadeIn 0.8s ease-out; |
| 65 | + } |
| 66 | + |
| 67 | + @keyframes fadeIn { |
| 68 | + from { |
| 69 | + opacity: 0; |
| 70 | + transform: translateY(20px); |
| 71 | + } |
| 72 | + to { |
| 73 | + opacity: 1; |
| 74 | + transform: translateY(0); |
| 75 | + } |
| 76 | + } |
| 77 | + |
| 78 | + @media (prefers-reduced-motion: reduce) { |
| 79 | + .teams-container { |
| 80 | + animation: none; |
| 81 | + } |
| 82 | + } |
| 83 | +</style> |
0 commit comments