layout | title | permalink |
---|---|---|
default |
Past Events |
/events/past-events |
{% assign past_events = site.events | where: 'completed', true | sort: 'date' | reverse %} {% assign event_count = past_events | size %}
{% if event_count == 0 %}
No recent events at the moment. Please check back later.
{% elsif event_count == 1 %}
{% elsif event_count == 2 %}
{% else %}
{% endif %}
{% for event in past_events %}
<!-- Event Info Below Image -->
<div class="text-justify">
<!-- Date Badge -->
<div
class="inline-flex items-center gap-2 mb-2 text-sm font-inter font-regular text-[{{site.text-colors.white}}]">
<i class="fa-solid fa-calendar-days"></i>
<!-- Event Date Logic -->
{% if event.end_date %}
<!-- Multi-day event: Show start and end dates -->
{{ event.date | date: "%a, %b %e" }} - {{ event.end_date | date: "%a, %b %e, %Y" }}
{% else %}
<!-- Single-day event: Show only the start date -->
{{ event.date | date: "%a, %B %e, %Y" }}
{% endif %}
</div>
<h3 class="font-montserrat text-xl font-semibold text-white truncate">{{ event.title }}</h3>
<!-- Event Description with Show More/Show Less -->
<p class="font-inter text-sm my-1 text-white">
<span class="event-description-short">{{ event.description | truncate: 120, "..." }}</span>
<span class="event-description-full hidden">{{ event.description }}</span>
<button class="text-blue-400 read-more relative z-10">Read More</button>
<button class="text-blue-400 read-less hidden relative z-10">Show Less</button>
</p>
</div>
</div>
{% endfor %}