Sync dev with master #269
@ -224,8 +224,8 @@
|
|||||||
{{ with .Site.GetPage "/termine/_index.md" }}
|
{{ with .Site.GetPage "/termine/_index.md" }}
|
||||||
|
|
||||||
{{ $events := slice }}
|
{{ $events := slice }}
|
||||||
{{ range .Params.events }}
|
{{ range sort .Params.events ".date" }}
|
||||||
{{ if or (ge (.date | time.AsTime).Unix now.Unix) (and .enddate (ge (.enddate | time.AsTime).Unix now.Unix)) }}
|
{{ if partial "data/termin-upcoming" . }}
|
||||||
{{ $events = $events | append . }}
|
{{ $events = $events | append . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
1
layouts/partials/data/termin-upcoming.html
Normal file
1
layouts/partials/data/termin-upcoming.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ return or (ge (.date | time.AsTime) now) (and .enddate (ge (.enddate | time.AsTime) now)) }}
|
@ -86,7 +86,7 @@
|
|||||||
|
|
||||||
{{ $top_banner := .Site.Data.homepage.top_banner }}
|
{{ $top_banner := .Site.Data.homepage.top_banner }}
|
||||||
{{ if and $top_banner.enable }}
|
{{ if and $top_banner.enable }}
|
||||||
{{ if or (not $top_banner.temporarily.enable) (and $top_banner.temporarily.enable (and (le ($top_banner.temporarily.start_date | time.AsTime).Unix now.Unix ) (ge ($top_banner.temporarily.end_date | time.AsTime).Unix now.Unix))) }}
|
{{ if or (not $top_banner.temporarily.enable) (and $top_banner.temporarily.enable (and (le ($top_banner.temporarily.start_date | time.AsTime) now) (ge ($top_banner.temporarily.end_date | time.AsTime) now))) }}
|
||||||
{{ with $top_banner }}
|
{{ with $top_banner }}
|
||||||
<div id="top-banner" class="p-3" style="background: {{ .color }}" data-pagefind-ignore>
|
<div id="top-banner" class="p-3" style="background: {{ .color }}" data-pagefind-ignore>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
@ -1,2 +1 @@
|
|||||||
{{ $related := (where .Site.RegularPages "Type" .Type) | intersect (where .Site.Pages ".Title" "!=" .Title) | union (.Site.RegularPages.Related . ) | shuffle | first 3 }}
|
{{ return (where .Site.RegularPages "Type" .Type) | intersect (where .Site.Pages ".Title" "!=" .Title) | union (.Site.RegularPages.Related . ) | shuffle | first 3 }}
|
||||||
{{ return $related }}
|
|
@ -8,8 +8,8 @@
|
|||||||
<li class="list-inline-item m-3 text-uppercase" data-filter="past">Vergangen</li>
|
<li class="list-inline-item m-3 text-uppercase" data-filter="past">Vergangen</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="filter-container row mx-auto">
|
<div class="filter-container row mx-auto">
|
||||||
{{ range .Params.events }}
|
{{ range sort .Params.events ".date" }}
|
||||||
<div class="filter-item col-12" data-groups="{{ if or (ge (.date | time.AsTime).Unix now.Unix) (and .enddate (ge (.enddate | time.AsTime).Unix now.Unix)) }}upcoming{{else}}past{{end}}" data-time="{{.date}}">
|
<div class="filter-item col-12" data-groups='{{if partial "data/termin-upcoming" .}}upcoming{{else}}past{{end}}'>
|
||||||
{{ partial "termin" . }}
|
{{ partial "termin" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user