diff --git a/_layouts/frab.xml b/_layouts/frab.xml index 51fea228b606b819ab9b1401ddd7ed6704b436d8..25ce4a21e72caea6d1118444232eca79bbddc2cd 100644 --- a/_layouts/frab.xml +++ b/_layouts/frab.xml @@ -18,8 +18,6 @@ Documentation: https://wiki.chaotikum.org/howto:chaotikumwebsite:media (Please u Finding the first and last talk to establish the variables "earliest" and "latest". Then converting this into a duration in days. {% endcomment -%} - -{% capture earliest %}{{'now' | date: '%s'}}{% endcapture -%} {% capture latest %}0{% endcapture -%} {% assign conference_media = site.media | where_exp: "video", "video.conferences contains conference.acronym" -%} @@ -43,13 +41,19 @@ Finding the first and last talk to establish the variables "earliest" and "lates {% if conference.date and recording_date.event != ''%} {% assign recording_date = conference.date -%} {% else -%} - {% assign recording_date = earliest -%} + {% assign recording_date = now -%} {% endif -%} {% endif -%} {% capture recordingdate %}{{recording_date | date: '%s'}}{% endcapture -%} - {% if recordingdate < earliest -%} + + {% if earliest and earliest != '' -%} + {% if recordingdate < earliest -%} + {% assign earliest = recordingdate -%} + {% endif -%} + {% else -%} {% assign earliest = recordingdate -%} {% endif -%} + {% if recordingdate > latest -%} {% assign latest = recordingdate -%} {% endif -%}