@@ -4,51 +4,53 @@ import Link from "next/link";
44
55export default function ChileMap ( { cities } ) {
66 const [ activeCity , setActiveCity ] = useState ( null ) ;
7-
7+
88 return (
9- < div className = "flex flex-col md:flex-row justify-between gap-8 mx-auto max-w-6xl px-4" >
10- { /* Mapa SVG - Más grande en móvil y adaptativo en escritorio */ }
11- < div className = "w-full md:w-1/2 lg:w-2/5 mx-auto" >
12- < div className = "aspect-[3/6] w-full bg-white/10 backdrop-blur-sm rounded-lg p-4 relative" >
9+ < div className = "flex flex-col md:flex-row md:items-center justify-between gap-8 mx-auto max-w-6xl px-4" >
10+ { /* Contenedor del mapa */ }
11+ < div className = "w-full md:w-1/2 lg:w-1/3 mx-auto" >
12+ < div className = "aspect-[3/6] lg:aspect-auto lg:h-[400px] w-full bg-white/10 backdrop-blur-sm rounded-lg p-4 relative" >
1313 { /* SVG simplificado del mapa de Chile */ }
1414 < svg viewBox = "0 0 100 300" className = "w-full h-full" >
15- < path
16- d = "M50,20 Q60,50 55,100 Q50,150 60,200 Q70,250 50,280"
17- fill = "none"
18- stroke = "white"
19- strokeWidth = "2"
20- className = "opacity-50"
21- />
22- { cities . map ( ( city ) => (
23- < g
24- key = { city . slug }
25- onClick = { ( ) => setActiveCity ( city . slug ) }
26- className = "cursor-pointer"
27- >
28- < circle
29- cx = { city . mapCoords . x }
30- cy = { city . mapCoords . y }
31- r = { activeCity === city . slug ? 6 : 4 }
32- fill = { activeCity === city . slug ? "#FFD700" : "#8A2BE2" }
33- className = "transition-all duration-300"
34- />
35- < text
36- x = { city . mapCoords . x + 8 }
37- y = { city . mapCoords . y + 4 }
38- fontSize = "8"
39- fill = "white"
40- className = "pointer-events-none"
15+ < g transform = "translate(-10,0) scale(1.2,1)" >
16+ < path
17+ d = "M50,20 Q60,50 55,100 Q50,150 60,200 Q70,250 50,280"
18+ fill = "none"
19+ stroke = "white"
20+ strokeWidth = "2"
21+ className = "opacity-50"
22+ />
23+ { cities . map ( ( city ) => (
24+ < g
25+ key = { city . slug }
26+ onClick = { ( ) => setActiveCity ( city . slug ) }
27+ className = "cursor-pointer"
4128 >
42- { city . name }
43- </ text >
44- </ g >
45- ) ) }
29+ < circle
30+ cx = { city . mapCoords . x }
31+ cy = { city . mapCoords . y }
32+ r = { activeCity === city . slug ? 6 : 4 }
33+ fill = { activeCity === city . slug ? "#FFD700" : "#8A2BE2" }
34+ className = "transition-all duration-300"
35+ />
36+ < text
37+ x = { city . mapCoords . x + 8 }
38+ y = { city . mapCoords . y + 4 }
39+ fontSize = "8"
40+ fill = "white"
41+ className = "pointer-events-none"
42+ >
43+ { city . name }
44+ </ text >
45+ </ g >
46+ ) ) }
47+ </ g >
4648 </ svg >
4749 </ div >
4850 </ div >
49-
50- { /* Lista de ciudades - A la derecha en desktop, abajo en móvil */ }
51- < div className = "w-full md:w-1/2 mt-6 md:mt-0 space-y-4" >
51+
52+ { /* Lista de ciudades, centrada verticalmente */ }
53+ < div className = "w-full md:w-1/2 lg:w-1/3 flex flex-col justify-center mt-6 md:mt-0 space-y-4" >
5254 { cities . map ( ( city ) => (
5355 < Link
5456 href = { `/${ city . slug } ` }
@@ -77,4 +79,4 @@ export default function ChileMap({ cities }) {
7779 </ div >
7880 </ div >
7981 ) ;
80- }
82+ }
0 commit comments