|
| 1 | +import { Link } from 'react-router-dom' |
| 2 | +import { useTranslation } from 'react-i18next' |
| 3 | +import SiteShell from './components/SiteShell' |
| 4 | +import { Card } from './components/ui/card' |
| 5 | + |
| 6 | +interface SectionDefinition { |
| 7 | + id: string |
| 8 | + title: string |
| 9 | + paragraphs: string[] |
| 10 | + bullets?: string[] |
| 11 | + note?: string |
| 12 | + linkNote?: boolean |
| 13 | +} |
| 14 | + |
| 15 | +function SpeakerGuidelines() { |
| 16 | + const { t } = useTranslation() |
| 17 | + |
| 18 | + const sections: SectionDefinition[] = [ |
| 19 | + { |
| 20 | + id: 'duracion', |
| 21 | + title: t('speakerGuidelines.duration.title'), |
| 22 | + paragraphs: [t('speakerGuidelines.duration.description')], |
| 23 | + bullets: [ |
| 24 | + t('speakerGuidelines.duration.max'), |
| 25 | + t('speakerGuidelines.duration.ideal'), |
| 26 | + ], |
| 27 | + }, |
| 28 | + { |
| 29 | + id: 'material', |
| 30 | + title: t('speakerGuidelines.material.title'), |
| 31 | + paragraphs: [t('speakerGuidelines.material.description')], |
| 32 | + bullets: [ |
| 33 | + t('speakerGuidelines.material.formats'), |
| 34 | + t('speakerGuidelines.material.access'), |
| 35 | + t('speakerGuidelines.material.recording'), |
| 36 | + ], |
| 37 | + note: t('speakerGuidelines.material.note'), |
| 38 | + }, |
| 39 | + { |
| 40 | + id: 'diseno-slides', |
| 41 | + title: t('speakerGuidelines.slides.title'), |
| 42 | + paragraphs: [t('speakerGuidelines.slides.description')], |
| 43 | + bullets: [ |
| 44 | + t('speakerGuidelines.slides.count'), |
| 45 | + t('speakerGuidelines.slides.typography'), |
| 46 | + t('speakerGuidelines.slides.contrast'), |
| 47 | + t('speakerGuidelines.slides.distance'), |
| 48 | + ], |
| 49 | + }, |
| 50 | + { |
| 51 | + id: 'temas', |
| 52 | + title: t('speakerGuidelines.topics.title'), |
| 53 | + paragraphs: [t('speakerGuidelines.topics.description')], |
| 54 | + bullets: [ |
| 55 | + t('speakerGuidelines.topics.welcome'), |
| 56 | + t('speakerGuidelines.topics.intent'), |
| 57 | + ], |
| 58 | + note: t('speakerGuidelines.topics.codeOfConduct'), |
| 59 | + linkNote: true, |
| 60 | + }, |
| 61 | + ] |
| 62 | + |
| 63 | + const hero = ( |
| 64 | + <section className="pt-8 mb-6"> |
| 65 | + <div className="mx-auto w-full max-w-6xl px-4"> |
| 66 | + <Card className="rounded-3xl px-6 py-8 md:px-8 md:py-10"> |
| 67 | + <span className="inline-flex items-center gap-2 rounded-full border border-yellow-300/40 bg-yellow-300/10 px-3 py-1.5 text-[0.82rem] font-bold uppercase tracking-[0.08em] text-sky-600"> |
| 68 | + {t('speakerGuidelines.heroEyebrow')} |
| 69 | + </span> |
| 70 | + <h1 className="mt-4 text-4xl font-bold leading-none tracking-tight text-brand md:text-5xl"> |
| 71 | + {t('speakerGuidelines.title')} |
| 72 | + </h1> |
| 73 | + <p className="mt-4 max-w-2xl text-base leading-7 text-slate-600 md:text-lg"> |
| 74 | + {t('speakerGuidelines.intro')} |
| 75 | + </p> |
| 76 | + </Card> |
| 77 | + </div> |
| 78 | + </section> |
| 79 | + ) |
| 80 | + |
| 81 | + return ( |
| 82 | + <SiteShell hero={hero}> |
| 83 | + <Card className="rounded-3xl p-6 text-left md:p-8"> |
| 84 | + <div className="space-y-8"> |
| 85 | + {sections.map((section) => ( |
| 86 | + <section key={section.id} id={section.id} className="scroll-mt-24 text-left"> |
| 87 | + <h2 className="text-xl font-bold tracking-tight text-brand md:text-2xl"> |
| 88 | + {section.title} |
| 89 | + </h2> |
| 90 | + |
| 91 | + <div className="mt-3 space-y-3 text-base leading-7 text-slate-700"> |
| 92 | + {section.paragraphs.map((paragraph) => ( |
| 93 | + <p key={paragraph}>{paragraph}</p> |
| 94 | + ))} |
| 95 | + |
| 96 | + {section.bullets && ( |
| 97 | + <ul className="list-disc space-y-2 pl-5"> |
| 98 | + {section.bullets.map((bullet) => ( |
| 99 | + <li key={bullet}>{bullet}</li> |
| 100 | + ))} |
| 101 | + </ul> |
| 102 | + )} |
| 103 | + |
| 104 | + {section.note && ( |
| 105 | + <p className="text-slate-600"> |
| 106 | + {section.linkNote ? ( |
| 107 | + <> |
| 108 | + {section.note}{' '} |
| 109 | + <Link |
| 110 | + to="/code-of-conduct" |
| 111 | + className="font-semibold text-brand underline underline-offset-2 hover:text-sky-700" |
| 112 | + > |
| 113 | + {t('speakerGuidelines.topics.codeOfConductLink')} |
| 114 | + </Link> |
| 115 | + . |
| 116 | + </> |
| 117 | + ) : ( |
| 118 | + section.note |
| 119 | + )} |
| 120 | + </p> |
| 121 | + )} |
| 122 | + </div> |
| 123 | + </section> |
| 124 | + ))} |
| 125 | + </div> |
| 126 | + </Card> |
| 127 | + </SiteShell> |
| 128 | + ) |
| 129 | +} |
| 130 | + |
| 131 | +export default SpeakerGuidelines |
0 commit comments