Last active
October 23, 2019 16:18
-
-
Save MTRNord/b153b148af86a4f4da4d00ac0a8bcddd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% assign sorted_events = (site.events | sort: 'event_date') %} | |
{% for event in sorted_events %} | |
{% unless event.event_section %} | |
{% if event.event_fulldate %} | |
<span style="font-weight: bold;">{{event.title}}</span> <br> | |
<span style="font-style: italic;">am {% include translated_date.html date=event.event_date format="%-d. %B %Y" lang="de" %}</span> <br> | |
{{event.content | remove: '<p>' | remove: '</p>'}}<br><br> | |
{% else %} | |
<span style="font-weight: bold;">{{event.title}}</span> <br> | |
<span style="font-style: italic;">am {% include translated_date.html date=event.event_date format="%-d. %B %Y, %H:%M Uhr" lang="de" %}</span> <br> | |
{{event.content | remove: '<p>' | remove: '</p>'}}<br><br> | |
{% endif %} | |
{% endunless %} | |
{% endfor %} | |
{% assign sections_events = (site.events | where_exp: 'item', 'item.event_section != nil') | sort 'event_section' %} | |
{% assign printed_sections = site.emptyArray %} | |
{% assign printed_events = site.emptyArray %} | |
{% for section_event in sections_events %} | |
{% unless printed_sections contains section_event.event_section %} | |
{% assign sorted_sections_events = ((sections_events | where_exp: 'item', 'item.event_section != nil' ) | sort: 'event_date') %} | |
{% assign printed_sections = printed_sections | push: section_event.event_section %} | |
<span style="font-weight: bold;">{{section_event.event_section}}</span> <br> | |
{% unless printed_events contains section_event.title %} | |
{% for event in sorted_sections_events %} | |
{% assign printed_events = printed_events | push: event.title %} | |
{% if event.event_section %} | |
{% if event.event_fulldate %} | |
<span style="font-style: italic;">{% include translated_date.html date=event.event_date format="%-d.%-m.%Y:" lang="de" %}</span> {{event.title | remove: '<p>' | remove: '</p>'}}<br> | |
{% else %} | |
<span style="font-style: italic;">{% include translated_date.html date=event.event_date format="%-d.%-m.%Y, %H:%M Uhr:" lang="de" %}</span> {{event.title | remove: '<p>' | remove: '</p>'}}<br> | |
{% endif %} | |
{% endif %} | |
{% endfor %} | |
{% endunless %} | |
{% endunless %} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment