File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,32 @@ document.addEventListener("DOMContentLoaded", () => {
2020
2121 const spotsLeft = details . max_participants - details . participants . length ;
2222
23+ // Build participants list HTML
24+ let participantsHTML = "" ;
25+ if ( details . participants . length > 0 ) {
26+ participantsHTML = `
27+ <div class="participants-section">
28+ <strong>Participants:</strong>
29+ <ul class="participants-list">
30+ ${ details . participants . map ( email => `<li>${ email } </li>` ) . join ( "" ) }
31+ </ul>
32+ </div>
33+ ` ;
34+ } else {
35+ participantsHTML = `
36+ <div class="participants-section">
37+ <strong>Participants:</strong>
38+ <span class="no-participants">No participants yet</span>
39+ </div>
40+ ` ;
41+ }
42+
2343 activityCard . innerHTML = `
2444 <h4>${ name } </h4>
2545 <p>${ details . description } </p>
2646 <p><strong>Schedule:</strong> ${ details . schedule } </p>
2747 <p><strong>Availability:</strong> ${ spotsLeft } spots left</p>
48+ ${ participantsHTML }
2849 ` ;
2950
3051 activitiesList . appendChild ( activityCard ) ;
Original file line number Diff line number Diff line change @@ -142,3 +142,31 @@ footer {
142142 padding : 20px ;
143143 color : # 666 ;
144144}
145+
146+ .participants-section {
147+ margin-top : 12px ;
148+ padding : 10px ;
149+ background-color : # eef2ff ;
150+ border-radius : 4px ;
151+ border : 1px solid # c5cae9 ;
152+ }
153+
154+ .participants-section strong {
155+ color : # 3949ab ;
156+ display : block;
157+ margin-bottom : 6px ;
158+ }
159+
160+ .participants-list {
161+ list-style-type : disc;
162+ margin-left : 20px ;
163+ margin-bottom : 0 ;
164+ color : # 333 ;
165+ font-size : 15px ;
166+ }
167+
168+ .no-participants {
169+ color : # 888 ;
170+ font-style : italic;
171+ margin-left : 5px ;
172+ }
You can’t perform that action at this time.
0 commit comments