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,19 @@ document.addEventListener("DOMContentLoaded", () => {
2020
2121 const spotsLeft = details . max_participants - details . participants . length ;
2222
23+ const participantsList = details . participants . length > 0
24+ ? `<ul class="participants-list">${ details . participants . map ( email => `<li>${ email } </li>` ) . join ( '' ) } </ul>`
25+ : `<p class="no-participants">No participants yet</p>` ;
26+
2327 activityCard . innerHTML = `
2428 <h4>${ name } </h4>
2529 <p>${ details . description } </p>
2630 <p><strong>Schedule:</strong> ${ details . schedule } </p>
2731 <p><strong>Availability:</strong> ${ spotsLeft } spots left</p>
32+ <div class="participants-section">
33+ <h5>Participants:</h5>
34+ ${ participantsList }
35+ </div>
2836 ` ;
2937
3038 activitiesList . appendChild ( activityCard ) ;
Original file line number Diff line number Diff line change @@ -74,6 +74,47 @@ section h3 {
7474 margin-bottom : 8px ;
7575}
7676
77+ .participants-section {
78+ margin-top : 15px ;
79+ padding-top : 10px ;
80+ border-top : 1px solid # e0e0e0 ;
81+ }
82+
83+ .participants-section h5 {
84+ margin-bottom : 8px ;
85+ color : # 1a237e ;
86+ font-size : 14px ;
87+ font-weight : bold;
88+ }
89+
90+ .participants-list {
91+ list-style : none;
92+ padding : 0 ;
93+ margin : 0 ;
94+ }
95+
96+ .participants-list li {
97+ padding : 3px 0 ;
98+ padding-left : 15px ;
99+ position : relative;
100+ font-size : 14px ;
101+ color : # 555 ;
102+ }
103+
104+ .participants-list li : before {
105+ content : "•" ;
106+ color : # 1a237e ;
107+ font-weight : bold;
108+ position : absolute;
109+ left : 0 ;
110+ }
111+
112+ .no-participants {
113+ font-style : italic;
114+ color : # 888 ;
115+ font-size : 14px ;
116+ }
117+
77118.form-group {
78119 margin-bottom : 15px ;
79120}
You can’t perform that action at this time.
0 commit comments