1- import Gallery from ' @/components/Gallery' ;
1+ import Gallery from " @/components/Gallery" ;
22
3- const { images, videos } = require ( ' @/data/multimedia' ) ;
3+ const { images, videos } = require ( " @/data/multimedia" ) ;
44
55export default function MultimediaPage ( ) {
6+ const photoYears = Array . from ( new Set ( images . map ( ( i ) => i . year ) ) )
7+ . sort ( )
8+ . reverse ( ) ;
9+ const videoYears = Array . from (
10+ new Set ( videos . map ( ( v ) => new Date ( v . date ) . getFullYear ( ) . toString ( ) ) )
11+ )
12+ . sort ( )
13+ . reverse ( ) ;
14+
615 return (
716 < div className = "container-py" >
817 < h1 className = "section-title" > Galería Multimedia</ h1 >
9-
10- { /* Sección de Fotos */ }
11- < section className = "mb-16" >
12- < h2 className = "text-2xl font-bold mb-6 text-center" > Fotos de ediciones anteriores</ h2 >
13- < div className = "max-w-6xl mx-auto" >
14- < Gallery images = { images } />
15- </ div >
18+
19+ { /* Fotos por año */ }
20+ < section id = "photos" >
21+ < h2 className = "text-2xl font-bold mb-6 text-center" > Fotos</ h2 >
22+ { photoYears . map ( ( year ) => (
23+ < div key = { year } id = { `photos-${ year } ` } className = "mb-12" >
24+ < h3 className = "text-xl font-semibold mb-4 text-py-text" >
25+ PyDay { year }
26+ </ h3 >
27+ < Gallery images = { images . filter ( ( img ) => img . year === year ) } />
28+ </ div >
29+ ) ) }
1630 </ section >
17-
18- { /* Sección de Videos */ }
19- < section >
20- < h2 className = "text-2xl font-bold mb-6 text-center" > Videos destacados</ h2 >
21- < div className = "grid grid-cols-1 md:grid-cols-2 gap-8 max-w-6xl mx-auto" >
22- { videos . map ( ( video ) => (
23- < div key = { video . id } className = "bg-black/30 backdrop-blur-sm rounded-lg overflow-hidden shadow-lg" >
24- < div className = "aspect-video relative" >
25- < iframe
26- width = "560"
27- height = "315"
28- src = { video . url }
29- title = { video . title }
30- frameBorder = "0"
31- allow = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
32- referrerPolicy = "strict-origin-when-cross-origin"
33- allowFullScreen
34- className = "absolute inset-0 w-full h-full"
35- > </ iframe >
36- </ div >
37- < div className = "p-4" >
38- < h3 className = "text-lg font-semibold" > { video . title } </ h3 >
39- < p className = "text-sm text-gray-300 mt-1" >
40- { video . speaker } • PyDay Chile { video . year }
41- </ p >
42- </ div >
31+
32+ { /* Videos por año */ }
33+ < section id = "videos" >
34+ < h2 className = "text-2xl font-bold mb-6 text-center" > Videos</ h2 >
35+ { videoYears . map ( ( year ) => (
36+ < div key = { year } id = { `videos-${ year } ` } className = "mb-12" >
37+ < h3 className = "text-xl font-semibold mb-4 text-py-text" >
38+ PyDay { year }
39+ </ h3 >
40+ < div className = "grid grid-cols-1 md:grid-cols-2 gap-8" >
41+ { videos
42+ . filter (
43+ ( v ) => new Date ( v . date ) . getFullYear ( ) . toString ( ) === year
44+ )
45+ . map ( ( video ) => (
46+ < div
47+ key = { video . id }
48+ className = "bg-black/30 backdrop-blur-sm rounded-lg overflow-hidden shadow-lg"
49+ >
50+ < div className = "aspect-video relative" >
51+ < iframe
52+ src = { video . url }
53+ title = { video . title }
54+ frameBorder = "0"
55+ allowFullScreen
56+ className = "absolute inset-0 w-full h-full"
57+ />
58+ </ div >
59+ < div className = "p-4" >
60+ < h4 className = "text-lg font-semibold" > { video . title } </ h4 >
61+ < p className = "text-sm text-gray-300 mt-1" > { video . date } </ p >
62+ </ div >
63+ </ div >
64+ ) ) }
4365 </ div >
44- ) ) }
45- </ div >
66+ </ div >
67+ ) ) }
4668 </ section >
4769 </ div >
4870 ) ;
49- }
71+ }
0 commit comments