From cd8a6bc19540385709ce2d1580a06d94f5c9628d Mon Sep 17 00:00:00 2001 From: tvluke <tvluke@chaotikum.org> Date: Tue, 30 May 2023 10:48:03 +0200 Subject: [PATCH] preview nicer --- _includes/space-status-mobile.html | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/_includes/space-status-mobile.html b/_includes/space-status-mobile.html index d4e82fc8..8c0fe6bd 100644 --- a/_includes/space-status-mobile.html +++ b/_includes/space-status-mobile.html @@ -2,13 +2,14 @@ Ob der Nobreakspace offen ist siehst du <a href='https://status.nobreakspace.org' target='_blank'>hier</a><p>Oder aktiviere Javascript</p> </div> <div id="event_soon_mobile" style="margin-top: 5px;"> -{% capture nowunix %}{{'now' | date: '%s'}}{% endcapture -%} -<b>Demnächst:</b> -{% for e in site.events -%} - {% capture event_start_plus %}{{e.eventdate | date: '%s' | minus: 259200 }}{% endcapture -%} - {% capture event_start %}{{e.eventdate | date: '%s' }}{% endcapture -%} - {% if event_start_plus < nowunix and event_start > nowunix -%} - <p id="nextevent_mobile"> {{ e.eventdate | date: "%d.%m.%Y %H:%M" }}: {{e.title}}</p> - {% endif -%} +{%- capture nowunix %}{{'now' | date: '%s'}}{% endcapture -%} +{%- assign show_event = 2 -%} +{%- for e in site.events -%} + {%- capture event_start_plus %}{{e.eventdate | date: '%s' | minus: 259200 }}{%- endcapture -%} + {%- capture event_start %}{{e.eventdate | date: '%s' }}{%- endcapture -%} + {%- if event_start_plus < nowunix and event_start > nowunix -%} + <b>Demnächst:</b> + {%- assign show_event = 0 - %}<p id="nextevent_mobile"> {{ e.eventdate | date: "%d.%m.%Y %H:%M" }}: {{e.title}}</p> + {%- endif -%} {% endfor -%} </div> -- GitLab