Skip to content
Snippets Groups Projects
Commit 1306acf4 authored by Lukas Schauer's avatar Lukas Schauer :unlock:
Browse files

show event dates instead of publishing dates on website

parent 16419e5f
No related branches found
No related tags found
No related merge requests found
{% if include.post.categories contains 'event' %}
{% capture startday %}{{ include.post.eventstart | date: '%d.%m.%y' }}{% endcapture %}
{% capture endday %}{{ include.post.eventend | date: '%d.%m.%y' }}{% endcapture %}
{% if include.post.eventend %}
{% capture eventend %}
{% if startday == endday %}
{{ include.post.eventend | date: "%H:%M" }}
{% else %}
{{ include.post.eventend | date: "%d.%m.%Y %H:%M" }}
{% endif %}
{% endcapture %}
{% endif %}
Termin: {{ include.post.eventstart | date: "%d.%m.%Y %H:%M" }}{% if include.post.eventend %} - {{ eventend }}{% endif %}<br />
{% if include.long %}
Ort: {% if include.post.location %}{{ include.post.location }}{% else %}Free Software Lab{% endif %}<br />
{% if include.post.organizer %}Organisation: {{ include.post.organizer }}<br />{% endif %}
{% endif %}
{% else %}
{{ include.post.date | date: "%d.%m.%Y" }}
{% endif %}
......@@ -4,14 +4,12 @@ layout: default
<div class="post">
<header class="post-header">
<h1 class="post-title">{% if page.categories contains 'event' %}Termin: {% endif %}{{ page.title }}</h1>
<p class="post-meta">{{ page.date | date: "%b %-d, %Y" }}{% if page.author %} • {{ page.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}</p>
<h1>
{{ page.title }}
</h1>
<p class="post-meta">{% include postmeta.html post=page long="1" %}</p>
{% if page.categories contains 'event' %}
<p class="event-date">
Anfang: {{ page.eventstart | date: "%d.%m.%Y %H:%M" }}<br />
Ende: {{ page.eventend | date: "%d.%m.%Y %H:%M" }}<br />
Ort: {% if page.location %}{{ page.location }}{% else %}Free Software Lab{% endif %}
{% if page.organizer %}<br />Organisation: {{ page.organizer }}{% endif %}
</p>
{% endif %}
......
......@@ -53,7 +53,9 @@ layout: default
<ul class="post-list">
{% for post in site.posts %}
<li>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
<span class="post-meta">
{% include postmeta.html post=post %}
</span>
<h2>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{% if post.categories contains 'event' %}Termin: {% endif %}{{ post.title }}</a>
......
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