add last photos and no upcoming concerts
This commit is contained in:
parent
ff2f781082
commit
e9e43bddbb
16 changed files with 20 additions and 11 deletions
|
|
@ -1,13 +1,17 @@
|
|||
{{ $currentTime := (time now) }}
|
||||
|
||||
{{ $sites := where site.RegularPages "Section" "events" }}
|
||||
{{ if gt (len $sites) 0 }}
|
||||
<div class="concerts">
|
||||
<h2>Programme</h2>
|
||||
{{ range sort $sites ".Params.ConcertDate" }}
|
||||
{{ $currentTime := (time now) }}
|
||||
{{ $delta := $currentTime.Sub (time .Params.ConcertDate ) }}
|
||||
{{ if lt $delta 0 }}
|
||||
{{ $events := where $sites "Params.ConcertDate" "gt" $currentTime}}
|
||||
|
||||
<div class="concerts">
|
||||
<h2>Programme</h2>
|
||||
|
||||
{{ if gt (len $events) 0 }}
|
||||
{{ range sort $events ".Params.ConcertDate" }}
|
||||
{{ partial "events/entry.html" (dict "context" . "tickets" true) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ else }}
|
||||
<p>Aucun concert prévu pour l'instant !</p>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue