File tree Expand file tree Collapse file tree 2 files changed +55
-0
lines changed
Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,36 @@ document.addEventListener("DOMContentLoaded", () => {
2020
2121 const spotsLeft = details . max_participants - details . participants . length ;
2222
23+ // Create 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
31+ . map (
32+ ( email ) =>
33+ `<li><span class="participant-badge">${ email } </span></li>`
34+ )
35+ . join ( "" ) }
36+ </ul>
37+ </div>
38+ ` ;
39+ } else {
40+ participantsHTML = `
41+ <div class="participants-section">
42+ <em>No participants yet.</em>
43+ </div>
44+ ` ;
45+ }
46+
2347 activityCard . innerHTML = `
2448 <h4>${ name } </h4>
2549 <p>${ details . description } </p>
2650 <p><strong>Schedule:</strong> ${ details . schedule } </p>
2751 <p><strong>Availability:</strong> ${ spotsLeft } spots left</p>
52+ ${ participantsHTML }
2853 ` ;
2954
3055 activitiesList . appendChild ( activityCard ) ;
Original file line number Diff line number Diff line change @@ -142,3 +142,33 @@ footer {
142142 padding : 20px ;
143143 color : # 666 ;
144144}
145+
146+ .participants-section {
147+ margin-top : 12px ;
148+ padding : 10px ;
149+ background-color : # e3eafc ;
150+ border-radius : 4px ;
151+ border : 1px solid # c5cae9 ;
152+ }
153+
154+ .participants-section strong {
155+ color : # 1a237e ;
156+ }
157+
158+ .participants-list {
159+ margin-top : 6px ;
160+ margin-left : 18px ;
161+ list-style-type : disc;
162+ }
163+
164+ .participant-badge {
165+ display : inline-block;
166+ background : # 3949ab ;
167+ color : # fff ;
168+ padding : 2px 8px ;
169+ border-radius : 12px ;
170+ font-size : 0.95em ;
171+ margin-bottom : 2px ;
172+ margin-right : 4px ;
173+ letter-spacing : 0.02em ;
174+ }
You can’t perform that action at this time.
0 commit comments