Skip to content
Snippets Groups Projects
Commit 45f9f782 authored by Uwe Jandt (DESY, HIFIS)'s avatar Uwe Jandt (DESY, HIFIS)
Browse files

switch events and news on frontpage

parent 41d00d0a
No related branches found
No related tags found
2 merge requests!203WIP: Test MR,!177HIFIS unified step 1
...@@ -58,6 +58,41 @@ ...@@ -58,6 +58,41 @@
--> -->
<section> <section>
<div class="info-col"> <div class="info-col">
<div class="frontpage-jumbotron">
<h1><a href="{{ 'events' | relative_url }}"><i class="far fa-calendar-alt" aria-hidden="true"></i>&nbsp; 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"> <div class="frontpage-jumbotron">
{% if page.notification.description and page.notification.title %} {% if page.notification.description and page.notification.title %}
{% include frontpage/notification.html {% include frontpage/notification.html
...@@ -95,42 +130,6 @@ ...@@ -95,42 +130,6 @@
download> download>
News Feed <i class="fas fa-rss"></i></a> News Feed <i class="fas fa-rss"></i></a>
</div> </div>
<div class="frontpage-jumbotron">
<h1><a href="{{ 'events' | relative_url }}"><i class="far fa-calendar-alt" aria-hidden="true"></i>&nbsp; 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> </div>
</section> </section>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment