@@ -13,11 +13,11 @@ import person from "../../assets/img/modal/image-11.png";
1313 <h3 id =" modalSubtitle" class =" emfont-NotoSansTC-600" ></h3 >
1414 <div class =" section-title emfont-NotoSansTC-600" >課程介紹</div >
1515 <div class =" description-container" >
16- <p id =" modalDescription" ></p >
16+ <p id =" modalDescription" class = " emfont-NotoSansTC-600 " ></p >
1717 </div >
1818 <div class =" section-title emfont-NotoSansTC-600" id =" speakerSectionTitle" >講者介紹</div >
1919 <div class =" description-container" >
20- <p id =" speakerDescription" ></p >
20+ <p id =" speakerDescription" class = " emfont-NotoSansTC-600 " ></p >
2121 </div >
2222 <div id =" modalLinks" class =" modal-links emfont-NotoSansTC-500" ></div >
2323 <button class =" close-button" >Close</button >
@@ -463,6 +463,14 @@ import person from "../../assets/img/modal/image-11.png";
463463 document .body .appendChild (modalElement );
464464 }
465465
466+ marked.use({
467+ renderer : {
468+ link ({ tokens , href , text }) {
469+ return ` <a href="${href }" target="_blank" rel="noopener noreferrer" class="emfont-NotoSansTC-400">${text }</a> ` ;
470+ }
471+ }
472+ } );
473+
466474 emfont.init({
467475 forceMin : true ,
468476 root : modalElement ,
@@ -497,13 +505,14 @@ import person from "../../assets/img/modal/image-11.png";
497505 course .speaker4Desc ,
498506 course .speaker5Desc
499507 ];
508+
500509 const speakerNames = [course .speaker1 , course .speaker2 , course .speaker3 , course .speaker4 , course .speaker5 ];
501510 const validDescs = speakerDescs .map ((desc , idx ) => desc ? { name: speakerNames [idx ], desc } : null ).filter (Boolean );
502511 if (validDescs .length === 1 ) {
503- speakerDescriptionEl .innerHTML = ` <div class="speaker-name">${validDescs [0 ].name }</div>${renderMarkdown (validDescs [0 ].desc )} ` ;
512+ speakerDescriptionEl .innerHTML = ` <div class="speaker-name emfont-NotoSansTC-600 ">${validDescs [0 ].name }</div>${renderMarkdown (validDescs [0 ].desc )} ` ;
504513 } else if (validDescs .length > 1 ) {
505514 speakerDescriptionEl .innerHTML = validDescs .map (({ name , desc }) =>
506- name ? ` <div class="speaker-name">${name }</div>${renderMarkdown (desc )} ` : renderMarkdown (desc )
515+ name ? ` <div class="speaker-name emfont-NotoSansTC-600 ">${name }</div>${renderMarkdown (desc )} ` : renderMarkdown (desc )
507516 ).join (" " );
508517 } else if (speakerText ) {
509518 speakerDescriptionEl .innerHTML = ` ${speakerText }是本課程的講師。<br>其他資訊可能得等你自己通靈 ` ;
0 commit comments