Fixed events list in sidebar

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
Jim Martens 2018-05-21 10:23:04 +02:00
parent 2ce564f492
commit 0413544809
1 changed files with 2 additions and 2 deletions

View File

@ -3,12 +3,12 @@
<header class="card-header">
Events
</header>
<ul class="list-group list-group-flush list-unstyled">
<ul class="list-group list-group-flush">
{% capture now-unix %}{{ 'now' | date: '%s' | divided_by: 86400 }}{% endcapture %}
{% for event in site.events %}
{% capture event-time %}{{ event.start_date | date: '%s' | divided_by: 86400 }}{% endcapture %}
{% if now-unix <= event-time %}
<li itemscope itemtype="http://schema.org/Event">
<li class="list-group-item" itemscope itemtype="http://schema.org/Event">
<div class="card-body">
<header>
<h6 itemprop="name about"><a href="{{ event.url | relative_url }}">{{ event.title }}</a></h6>