_layouts/events.html in langara-department-jekyll-theme-0.4.2 vs _layouts/events.html in langara-department-jekyll-theme-0.5.0

- old
+ new

@@ -14,55 +14,20 @@ <!-- START NEWS CONTENT --> <h2 class="tk-adelle lang-orange">Events</h2> {%- assign date_format = "%a %b %-d, %Y %l:%M%P" -%} {%- assign time_format = "%l:%M%P" -%} - {%- for event in paginator.posts -%} + {%- assign eventsByStartTime = site.events | sort: "start_date" | reverse -%} + {%- for event in eventsByStartTime -%} <div class="mt-3"> <h4>{{ event.title | escape }}</h4> {{ event.excerpt }} <p> <small class="text-muted text-uppercase d-block">{{ event.start_date | date: date_format }} - {{ event.end_date | date: time_format }}, {{ event.location }}</small> <a class="article-link d-block text-right text-uppercase" href="{{ event.url | relative_url }}">Read more</a> </p> </div> {%- endfor -%} - - {% if paginator.total_pages > 1 %} - <ul class="pagination"> - {% if paginator.first_page %} - <li class="page-item"> - <a class="page-link" href="{{ paginator.first_page_path | prepend: site.baseurl | replace: '//', '/' }}">&laquo;</a> - </li> - {% endif %} - - {% if paginator.previous_page %} - <li class="page-item"> - <a class="page-link" href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">&lsaquo;</a> - </li> - {% endif %} - - {% if paginator.page_trail %} - {% for trail in paginator.page_trail %} - <li {% if page.url == trail.path %}class="page-item active"{% else %}class="page-item"{% endif %}> - <a class="page-link" href="{{ trail.path | prepend: site.baseurl | replace: '//', '/' }}" title="{{trail.title}}">{{ trail.num }}</a> - </li> - {% endfor %} - {% endif %} - - {% if paginator.next_page %} - <li class="page-item"> - <a class="page-link" href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">&rsaquo;</a> - </li> - {% endif %} - - {% if paginator.last_page %} - <li class="page-item"> - <a class="page-link" href="{{ paginator.last_page_path | prepend: site.baseurl | replace: '//', '/' }}">&raquo;</a> - </li> - {% endif %} - </ul> - {% endif %} </div> </section><!-- END NEWS-EVENTS CONTENT -->