From e7b8039c962b6f4c784b9be55643b522a86576f1 Mon Sep 17 00:00:00 2001 From: "Uwe Jandt (DESY)" <uwe.jandt@desy.de> Date: Wed, 2 Dec 2020 15:56:01 +0100 Subject: [PATCH] events on frontpage --- _layouts/frontpage.html | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/_layouts/frontpage.html b/_layouts/frontpage.html index aed60edae..ca3f9137c 100644 --- a/_layouts/frontpage.html +++ b/_layouts/frontpage.html @@ -52,6 +52,35 @@ <a href="{{ 'news/' | relative_url }}" class="btn btn-outline-secondary">More HIFIS News</a> </section> </div> + + <div class="frontpage-jumbotron"> + <section> + <h1><i class="far fa-calendar-alt" aria-hidden="true"></i> Events</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 %} + {% endfor %} + {% if has_upcoming_events == false %} + <article class="list-entry"> + <h1> + There are no upcoming events right now ... stay tuned. + </h1> + </article> + {% endif %} + </div> + </section> + </div> + <div class="transition-block"> {% include transition.html direction="top" %} -- GitLab