diff --git a/_layouts/frontpage.html b/_layouts/frontpage.html index 8bdd06e106d10930f33008f530ea08eb434d01d0..80235f3dfa8b2a75132e7f1de9f63e9c91802367 100644 --- a/_layouts/frontpage.html +++ b/_layouts/frontpage.html @@ -58,6 +58,41 @@ --> <section> <div class="info-col"> + <div class="frontpage-jumbotron"> + <h1><a href="{{ 'events' | relative_url }}"><i class="far fa-calendar-alt" aria-hidden="true"></i> Events</a></h1> + <div class="flex-content-wrapper"> + {% assign sorted_events = site.events | sort: "start.date" %} + {% assign today = "now" | date: "%Y-%m-%d" %} + {% assign has_upcoming_events = false %} + {% for event in sorted_events %} + {% if event.start.date < today or + event.registration_period.to < today %} + {% continue %} + {% else %} + {% assign has_upcoming_events = true %} + {% endif %} + {% include frontpage/event-card.html + title = event.excerpt %} + {% assign events_counter = events_counter|plus:1 %} + {% if events_counter >= 3 %} + {% break %} + {% endif %} + {% endfor %} + {% if has_upcoming_events == false %} + <article class="list-entry"> + <h1> + There are no upcoming events right now ... stay tuned. + </h1> + </article> + {% endif %} + </div> + <a href="{{ 'events' | relative_url }}" class="btn btn-outline-secondary">All Events</a> + <a class="btn btn-outline-secondary" href="{{ '/feed/events.xml' | relative_url }}" + title="Subscribe to HIFIS Events Feed" + type="application/atom+xml" + download> + Events Feed <i class="fas fa-rss"></i></a> + </div> <div class="frontpage-jumbotron"> {% if page.notification.description and page.notification.title %} {% include frontpage/notification.html @@ -95,42 +130,6 @@ download> News Feed <i class="fas fa-rss"></i></a> </div> - - <div class="frontpage-jumbotron"> - <h1><a href="{{ 'events' | relative_url }}"><i class="far fa-calendar-alt" aria-hidden="true"></i> Events</a></h1> - <div class="flex-content-wrapper"> - {% assign sorted_events = site.events | sort: "start.date" %} - {% assign today = "now" | date: "%Y-%m-%d" %} - {% assign has_upcoming_events = false %} - {% for event in sorted_events %} - {% if event.start.date < today or - event.registration_period.to < today %} - {% continue %} - {% else %} - {% assign has_upcoming_events = true %} - {% endif %} - {% include frontpage/event-card.html - title = event.excerpt %} - {% assign events_counter = events_counter|plus:1 %} - {% if events_counter >= 3 %} - {% break %} - {% endif %} - {% endfor %} - {% if has_upcoming_events == false %} - <article class="list-entry"> - <h1> - There are no upcoming events right now ... stay tuned. - </h1> - </article> - {% endif %} - </div> - <a href="{{ 'events' | relative_url }}" class="btn btn-outline-secondary">All Events</a> - <a class="btn btn-outline-secondary" href="{{ '/feed/events.xml' | relative_url }}" - title="Subscribe to HIFIS Events Feed" - type="application/atom+xml" - download> - Events Feed <i class="fas fa-rss"></i></a> - </div> </div> </section>