_layouts/home.html in langara-department-jekyll-theme-0.3.0 vs _layouts/home.html in langara-department-jekyll-theme-0.4.0

- old
+ new

@@ -13,11 +13,11 @@ <aside id="events" class="col-lg-6"> <h2 class="tk-adelle lang-orange">Events</h2> {%- assign date_format = "%a %b %-d, %Y %l:%M%P" -%} {%- assign time_format = "%l:%M%P" -%} - {%- assign eventsByStartTime = site.events | sort: "start_date" -%} + {%- assign eventsByStartTime = site.events | sort: "start_date" | reverse | slice: 0, 3 -%} {%- for event in eventsByStartTime -%} <div class="d-inline-block mt-3"> <h4>{{ event.title | escape }}</h4> {{ event.excerpt }} <p> @@ -30,11 +30,11 @@ <!-- START NEWS CONTENT --> <aside id="news" class="col-lg-6"> <h2 class="tk-adelle lang-orange">News</h2> - - {%- for post in site.posts -%} + {%- assign firstFewPosts = site.posts | slice: 0, 3 -%} + {%- for post in firstFewPosts -%} <div class="d-inline-block mt-3"> <h4>{{ post.title | escape }}</h4> {{ post.excerpt }} <p> <small class="text-muted text-uppercase d-block">Submitted on {{ post.date | date: date_format }}</small>