@@ -3,18 +3,28 @@ import Image from "next/image";
33import TalkCard from "@/components/TalkCard" ;
44import MapSection from "@/components/Maps" ;
55import HeroSection from "@/components/HeroSection" ;
6- import FAQSection from ' @/components/FAQSection' ;
6+ import FAQSection from " @/components/FAQSection" ;
77import CTAFinal from "@/components/CTAFinal" ;
88import cityData from "@/data/cities" ;
9- import { generalFAQs } from ' @/data/faqs' ;
9+ import { generalFAQs } from " @/data/faqs" ;
1010
1111export function generateStaticParams ( ) {
12- return [ { city : "valparaiso" } , { city : "santiago" } , { city : "copiapo" } ] ;
12+ return Object . keys ( cityData ) . map ( ( city ) => ( { city } ) ) ;
1313}
1414
1515async function getCityData ( city ) {
16- await Promise . resolve ( ) ;
17- return cityData [ city ] || null ;
16+ const data = cityData [ city ] ;
17+
18+ if ( ! data ) return null ;
19+
20+ return {
21+ ...data ,
22+ schedule : data . schedule . map ( ( talk ) => ( {
23+ ...talk ,
24+ city : data . name ,
25+ date : data . date ,
26+ } ) ) ,
27+ } ;
1828}
1929
2030export default async function CityPage ( { params } ) {
@@ -47,52 +57,31 @@ export default async function CityPage({ params }) {
4757
4858 { /* Mapa y dirección */ }
4959 < section className = "container-py" >
50- < div className = "grid grid-cols-1 md:grid-cols-2 gap-8 " >
60+ < div className = "grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-8 max-w-7xl mx-auto " >
5161 { /* Mapa */ }
52- < div className = "bg-black/20 backdrop-blur rounded-lg overflow-hidden" >
62+ < div className = "bg-black/20 backdrop-blur rounded-lg overflow-hidden h-[300px] md:h-auto " >
5363 < MapSection city = { data } />
54-
55- { /* </div>
56- <div className="p-4">
57- <a
58- href={data.mapUrl}
59- target="_blank"
60- rel="noopener noreferrer"
61- className="text-green-400 hover:underline flex items-center justify-center space-x-2"
62- >
63- <span>Ver en Google Maps</span>
64- <svg
65- xmlns="http://www.w3.org/2000/svg"
66- className="h-4 w-4"
67- fill="none"
68- viewBox="0 0 24 24"
69- stroke="currentColor"
70- >
71- <path
72- strokeLinecap="round"
73- strokeLinejoin="round"
74- strokeWidth={2}
75- d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
76- />
77- </svg>
78- </a>
79- </div> */ }
8064 </ div >
8165
8266 { /* Información de transporte */ }
83- < div >
84- < h2 className = "text-2xl font-bold mb-4" > Cómo llegar</ h2 >
85- < p className = "text-lg font-medium mb-2" > { data . address } </ p >
86-
87- < h3 className = "text-xl font-semibold mt-4 mb-2" >
67+ < div className = "p-4" >
68+ < h2 className = "text-xl md:text-2xl font-bold mb-2 md:mb-4" >
69+ Cómo llegar
70+ </ h2 >
71+ < p className = "text-base md:text-lg font-medium mb-2" >
72+ { data . address }
73+ </ p >
74+
75+ < h3 className = "text-lg md:text-xl font-semibold mt-3 md:mt-4 mb-2" >
8876 Opciones de transporte:
8977 </ h3 >
78+
9079 < ul className = "space-y-2" >
9180 { data . transportation . map ( ( option , index ) => (
9281 < li key = { index } className = "flex items-start space-x-2" >
9382 < svg
9483 xmlns = "http://www.w3.org/2000/svg"
95- className = "h-5 w-5 mt-0.5 text-green-400"
84+ className = "h-5 w-5 mt-0.5 text-green-400 flex-shrink-0 "
9685 fill = "none"
9786 viewBox = "0 0 24 24"
9887 stroke = "currentColor"
@@ -104,7 +93,7 @@ export default async function CityPage({ params }) {
10493 d = "M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7"
10594 />
10695 </ svg >
107- < span > { option } </ span >
96+ < span className = "text-sm md:text-base" > { option } </ span >
10897 </ li >
10998 ) ) }
11099 </ ul >
@@ -115,13 +104,14 @@ export default async function CityPage({ params }) {
115104 { /* Agenda */ }
116105 < section className = "container-py" >
117106 < h2 className = "section-title" > Agenda</ h2 >
118- < div className = "space-y-6 mt-8" >
107+
108+ < div className = "space-y-4 md:space-y-6 mt-6 md:mt-8 max-w-4xl mx-auto" >
119109 { data . schedule . map ( ( talk , index ) => (
120- < TalkCard key = { index } talk = { talk } />
110+ < TalkCard key = { talk . id } talk = { talk } />
121111 ) ) }
122112 </ div >
123113
124- < div className = "mt-12 text-center" >
114+ < div className = "mt-8 md:mt- 12 text-center" >
125115 < Link
126116 href = "/register"
127117 target = "_blank"
@@ -146,45 +136,18 @@ export default async function CityPage({ params }) {
146136 </ div >
147137 </ section >
148138
149- { /* Speakers destacados */ }
150- < section className = "container-py bg-black/20 backdrop-blur" >
151- < h2 className = "section-title" > Ponentes destacados</ h2 >
152- < div className = "grid grid-cols-1 md:grid-cols-3 gap-6 mt-8" >
153- { data . schedule . map ( ( talk , index ) => (
154- < div
155- key = { index }
156- className = "bg-black/30 backdrop-blur rounded-lg overflow-hidden"
157- >
158- < div className = "relative h-48" >
159- < Image
160- src = { talk . speaker . image }
161- alt = { talk . speaker . name }
162- fill
163- className = "object-cover"
164- />
165- </ div >
166- < div className = "p-4" >
167- < h3 className = "font-bold text-xl" > { talk . speaker . name } </ h3 >
168- < p className = "text-green-400 mb-2" > { talk . title } </ p >
169- < p className = "opacity-80 text-sm" > { talk . description } </ p >
170- </ div >
171- </ div >
172- ) ) }
173- </ div >
174- </ section >
175-
176139 < FAQSection faqs = { generalFAQs } />
177-
140+
178141 < CTAFinal
179142 title = { `¡Únete a la comunidad Python en ${ data . name } !` }
180143 subtitle = "Aprende, comparte y conecta con desarrolladores y entusiastas de Python de toda la región y de Chile."
181144 buttonText = "Registrarme ahora"
182145 href = "https://docs.google.com/forms/d/e/1FAIpQLSdhHlnqwmYffl6JNzbAZ4IRRyM_8fcOB1QH0hyz6Vwi3VFOwg/viewform"
183- className = "bg-gradient-to-br from-green-900/60 to-black/80 backdrop-blur rounded-lg my-8 mx-4 md:mx-8"
146+ className = "bg-gradient-to-br from-green-900/60 to-black/80 backdrop-blur rounded-lg my-4 md:my- 8 mx-2 md:mx-8"
184147 />
185148
186149 { /* Segundo enlace independiente para "Conocer la comunidad" */ }
187- < div className = "text-center max-w-2xl mx-auto mb-8" >
150+ < div className = "text-center max-w-2xl mx-auto mb-6 md:mb- 8" >
188151 < Link
189152 href = "https://pythonchile.cl/pages/coordinacion.html"
190153 target = "_blank"
@@ -194,37 +157,8 @@ export default async function CityPage({ params }) {
194157 </ Link >
195158 </ div >
196159
197- { /* Call to Action final */ }
198- { /* <section className="container-py bg-gradient-to-br from-green-900/60 to-black/80 backdrop-blur rounded-lg my-8 mx-4 md:mx-8">
199- <div className="text-center max-w-2xl mx-auto">
200- <h2 className="text-3xl font-bold mb-4">
201- ¡Únete a la comunidad Python en {data.name}!
202- </h2>
203- <p className="mb-6 text-lg">
204- Aprende, comparte y conecta con desarrolladores y entusiastas de
205- Python de toda la región y de Chile.
206- </p>
207- <div className="flex flex-col sm:flex-row gap-4 justify-center">
208- <Link
209- href="https://docs.google.com/forms/d/e/1FAIpQLSdhHlnqwmYffl6JNzbAZ4IRRyM_8fcOB1QH0hyz6Vwi3VFOwg/viewform"
210- target="_blank"
211- className="btn-primary"
212- >
213- Registrarme ahora
214- </Link>
215- <Link
216- href="https://pythonchile.cl/pages/coordinacion.html"
217- target="_blank"
218- className="btn-secondary"
219- >
220- Conocer la comunidad
221- </Link>
222- </div>
223- </div>
224- </section> */ }
225-
226160 { /* Footer específico de la ciudad */ }
227- < footer className = "container-py text-center text-sm opacity-60" >
161+ < footer className = "py-6 md:py-8 text-center text-xs md: text-sm opacity-60" >
228162 < p > PyDay { data . name } es organizado por la comunidad Python Chile.</ p >
229163 < p className = "mt-2" >
230164 Si quieres ser patrocinador o colaborador,{ " " }
0 commit comments