@@ -65,7 +65,7 @@ export default () => {
6565 author : 'Andrés Ibañez' ,
6666 title : 'Ciencia de datos y python' ,
6767 photos : [ 'Andres_Ibanez.jpeg' ] ,
68- category : 'Datos ' } ,
68+ category : 'Data ' } ,
6969 {
7070 block : '11:55 - 12:10' ,
7171 author : 'Eduardo Espinoza Norambuena' ,
@@ -114,14 +114,18 @@ export default () => {
114114 const blockCell = row . insertCell ( ) ;
115115 blockCell . innerHTML = obj . block ;
116116 const eventCell = row . insertCell ( ) ;
117+ eventCell . className = "content"
118+ const profileDiv = document . createElement ( "div" ) ;
119+ const photosDiv = document . createElement ( "div" ) ;
120+ const mediaDiv = document . createElement ( "div" ) ;
121+ const eventDiv = document . createElement ( "div" ) ;
122+ eventDiv . className = 'event' ;
117123 obj . photos . forEach ( photo => {
118124 const img = document . createElement ( 'img' )
119125 img . className = 'photo-speaker' ;
120126 img . src = 'assets/speakers/copiapo/' + photo ;
121- eventCell . appendChild ( img )
127+ photosDiv . appendChild ( img )
122128 } ) ;
123- const eventDiv = document . createElement ( "div" ) ;
124- eventDiv . className = 'event'
125129 const titleDiv = document . createElement ( "div" ) ;
126130 titleDiv . className = 'title' ;
127131 titleDiv . innerHTML = obj . title ;
@@ -142,6 +146,31 @@ export default () => {
142146 categoryDiv . innerHTML = obj . category ;
143147 eventDiv . appendChild ( categoryDiv ) ;
144148 }
149+ let link , icon
150+ const urls = {
151+ github : 'https://github.com/' ,
152+ facebook : 'https://www.facebook.com/' ,
153+ instagram : 'https://www.instagram.com/' ,
154+ youtube : 'https://www.youtube.com/' ,
155+ twitter : 'https://x.com/' ,
156+ linkedin : 'https://www.linkedin.com/' ,
157+ twitch : 'https://www.twitch.com/' ,
158+ discord : 'https://discord.gg/' ,
159+ }
160+ Object . keys ( urls ) . forEach ( key => {
161+ if ( key in obj ) {
162+ link = document . createElement ( "a" ) ;
163+ link . href = `${ urls [ key ] } ${ obj [ key ] } ` ;
164+ link . target = '_blank'
165+ icon = document . createElement ( "i" ) ;
166+ icon . className = `bi bi-${ key } `
167+ link . appendChild ( icon ) ;
168+ mediaDiv . appendChild ( link ) ;
169+ }
170+ } )
171+ profileDiv . appendChild ( photosDiv )
172+ profileDiv . appendChild ( mediaDiv )
173+ eventCell . appendChild ( profileDiv )
145174 eventCell . appendChild ( eventDiv )
146175 } )
147176}
0 commit comments