Skip to content

Commit

Permalink
Styling for hidden attendees elements
Browse files Browse the repository at this point in the history
  • Loading branch information
lowercasename committed Feb 5, 2024
1 parent f11a16e commit 456de15
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
26 changes: 26 additions & 0 deletions public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,28 @@ body, html {
font-weight: bold;
}

.attendeesList > li.hidden-attendee {
border: 4px solid #ccc;
background: #eee;
}

.attendeesList > li.hidden-attendee a {
color: #555;
}

.hidden-attendees-message {
display: inline-block;
border: 4px solid #ccc;
text-align: center;
border-radius: 2em;
padding: 0.5em 1em;
background: #eee;
color: #555;
font-size: 0.95em;
font-weight: bold;
margin: 0;
}

.expand {
-webkit-transition: height 0.2s;
-moz-transition: height 0.2s;
Expand Down Expand Up @@ -321,6 +343,10 @@ body, html {
color: #fff;
}

li.hidden-attendee .attendee-name {
color: #555;
}

.remove-attendee {
color: #fff;
}
Expand Down
8 changes: 4 additions & 4 deletions views/event.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -139,28 +139,28 @@
<button type="button" id="unattendEvent" class="btn btn-secondary" data-toggle="modal" data-target="#unattendModal"><i class="fas fa-user-times"></i> Remove me</button>
</div>
</h5>
<div class="card-body">
<div class="card-body text-center">
{{#if eventData.maxAttendees}}
{{#if noMoreSpots}}
<div class="alert alert-warning text-center" id="attendees-alert">This event is at capacity.</div>
{{else}}
<div class="alert alert-warning text-center" id="attendees-alert">{{spotsRemaining}} {{plural spotsRemaining "spot(s)"}} remaining - add yourself now!</div>
{{/if}}
{{/if}}
{{#if visibleAttendees}}
{{#if numberOfAttendees}}
<ul class="attendeesList">
{{#each visibleAttendees}}
<li{{#if ../editingEnabled}} data-attendee-name="{{this.name}}" data-attendee-id="{{this._id}}"{{/if}}><span class="attendee-name">{{this.name}}</span>{{#if ../editingEnabled}} <a href="#" class="remove-attendee" data-toggle="modal" data-target="#removeAttendeeModal" title="Remove user from event"><i class="fas fa-user-times"></i></a>{{/if}}</li>
{{/each}}
{{#if editingEnabled}}
{{#each hiddenAttendees}}
<li{{#if ../editingEnabled}} data-attendee-name="{{this.name}}" data-attendee-id="{{this._id}}"{{/if}}><span class="attendee-name">{{this.name}} (hidden from public list)</span>{{#if ../editingEnabled}} <a href="#" class="remove-attendee" data-toggle="modal" data-target="#removeAttendeeModal" title="Remove user from event"><i class="fas fa-user-times"></i></a>{{/if}}</li>
<li{{#if ../editingEnabled}} data-attendee-name="{{this.name}}" data-attendee-id="{{this._id}}"{{/if}} class="hidden-attendee"><span class="attendee-name">{{this.name}} (hidden from public list)</span>{{#if ../editingEnabled}} <a href="#" class="remove-attendee" data-toggle="modal" data-target="#removeAttendeeModal" title="Remove user from event"><i class="fas fa-user-times"></i></a>{{/if}}</li>
{{/each}}
{{/if}}
</ul>
{{#unless editingEnabled}}
{{#if numberOfHiddenAttendees}}
<p class="text-center text-muted mb-0">+{{numberOfHiddenAttendees}} hidden attendee{{plural numberOfHiddenAttendees ""}}</p>
<div class="hidden-attendees-message">{{numberOfHiddenAttendees}} hidden attendee{{plural numberOfHiddenAttendees ""}}</div>
{{/if}}
{{/unless}}
{{else}}
Expand Down

0 comments on commit 456de15

Please sign in to comment.