Theme: Keep current event for 6 hours after start date #53
|
@ -5,7 +5,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{- $events := where (.Site.GetPage "blog").Pages ".Params.categories" "event" }}
|
{{- $events := where (.Site.GetPage "blog").Pages ".Params.categories" "event" }}
|
||||||
{{- $upcoming := where $events ".Params.date" "ge" now }}
|
{{- $lookback := time.ParseDuration "-6h" }}
|
||||||
|
{{- $upcoming := where $events ".Params.date" "ge" (time.Now.Add $lookback) }}
|
||||||
{{ if $upcoming }}
|
{{ if $upcoming }}
|
||||||
<div class="announcements">
|
<div class="announcements">
|
||||||
<h2 id="neuigkeiten" class="on-hover-trg">Neuigkeiten <a href="#neuigkeiten" class="on-hover"><i class="fa-solid fa-link small"></i></a></h2>
|
<h2 id="neuigkeiten" class="on-hover-trg">Neuigkeiten <a href="#neuigkeiten" class="on-hover"><i class="fa-solid fa-link small"></i></a></h2>
|
||||||
|
|
Loading…
Reference in a new issue