File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 142142 .talk-type { display : inline-block; font-size : 0.62rem ; font-weight : 600 ; padding : 0.1rem 0.4rem ; border-radius : 2px ; margin-left : 0.4rem ; vertical-align : middle; }
143143 .talk-type-talk { background : var (--accent-light ); color : var (--accent ); }
144144 .talk-type-poster { background : var (--tag-multiferroics-bg ); color : var (--tag-multiferroics ); }
145+ .talk-type-workshop { background : var (--tag-methods-bg ); color : var (--tag-methods ); }
146+ .talk-type-other { background : var (--border-light ); color : var (--text-mid ); }
145147
146148 /* Contact */
147149 .contact-content { max-width : 1400px ; margin : 0 auto; padding : 0 3rem 4rem ; display : grid; grid-template-columns : 1fr 1fr ; gap : 4rem ; }
@@ -374,8 +376,12 @@ <h2>${sec.title}</h2>
374376 <div class="talks-list">
375377 ${ D . talks . items . map ( ( t , i ) => {
376378 let badge = '' ;
377- if ( t . type === 'talk' ) badge = ' <span class="talk-type talk-type-talk">talk</span>' ;
378- if ( t . type === 'poster' ) badge = ' <span class="talk-type talk-type-poster">poster</span>' ;
379+ if ( t . type ) {
380+ const typeKey = t . type . toLowerCase ( ) ;
381+ const typeClassMap = { talk : 'talk-type-talk' , poster : 'talk-type-poster' , workshop : 'talk-type-workshop' } ;
382+ const typeClass = typeClassMap [ typeKey ] || 'talk-type-other' ;
383+ badge = ` <span class="talk-type ${ typeClass } ">${ typeKey } </span>` ;
384+ }
379385 if ( t . venues ) {
380386 const venueLines = t . venues . map ( v =>
381387 `<div class="talk-venue-line"><span class="talk-venue-date">${ v . date } </span> · ${ v . venue } </div>`
You can’t perform that action at this time.
0 commit comments