Remove tickets from past events
This commit is contained in:
parent
cf5458909d
commit
fdb835f397
1 changed files with 74 additions and 70 deletions
|
|
@ -1,76 +1,80 @@
|
||||||
<div class="concerts">
|
<div class="concerts">
|
||||||
{{ $sites := where site.RegularPages "Section" "events" }}
|
{{ $sites := where site.RegularPages "Section" "events" }}
|
||||||
{{ range sort $sites ".Params.ConcertDate" }}
|
{{ range sort $sites ".Params.ConcertDate" }}
|
||||||
<div class="concert-entry">
|
<div class="concert-entry">
|
||||||
<p class="concert-date">
|
<p class="concert-date">
|
||||||
{{ $t := time.AsTime .Params.ConcertDate }}
|
{{ $t := time.AsTime .Params.ConcertDate }}
|
||||||
{{ $format := "Monday 2 Jan 2006 15h04" }}
|
{{ $format := "Monday 2 Jan 2006 15h04" }}
|
||||||
{{ time.Format $format $t | humanize }}
|
{{ time.Format $format $t | humanize }}
|
||||||
</p>
|
</p>
|
||||||
<div class="concert-cover">
|
<div class="concert-cover">
|
||||||
{{ with .Resources.GetMatch "cover.*" }}
|
{{ with .Resources.GetMatch "cover.*" }}
|
||||||
<img
|
<img
|
||||||
src="{{ .RelPermalink }}"
|
src="{{ .RelPermalink }}"
|
||||||
width="{{ .Width }}"
|
width="{{ .Width }}"
|
||||||
height="{{ .Height }}"
|
height="{{ .Height }}"
|
||||||
alt="Concert cover"
|
alt="Concert cover"
|
||||||
/>
|
/>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
<div class="concert-overview">
|
<div class="concert-overview">
|
||||||
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||||
<h3>{{ .Summary }}</h3>
|
<h3>{{ .Summary }}</h3>
|
||||||
<h4>{{ .Description }}</h4>
|
<h4>{{ .Description }}</h4>
|
||||||
|
|
||||||
<img src="bar.png" class="separator" />
|
<img src="bar.png" class="separator" />
|
||||||
<div class="concert-buttons">
|
<div class="concert-buttons">
|
||||||
<a class="concert-button" href="{{ .Params.TicketsLink }}">
|
{{ $currentTime := (time now) }}
|
||||||
<img src="billets.png" />
|
{{ $delta := $currentTime.Sub (time .Params.ConcertDate ) }}
|
||||||
<span>Billets</span>
|
{{ if lt $delta 0 }}
|
||||||
</a>
|
<a class="concert-button" href="{{ .Params.TicketsLink }}">
|
||||||
<a class="concert-button" href="{{ .RelPermalink }}">
|
<img src="billets.png" />
|
||||||
<img src="info.png" />
|
<span>Billets</span>
|
||||||
<span>Infos</span>
|
</a>
|
||||||
</a>
|
{{ end }}
|
||||||
</div>
|
<a class="concert-button" href="{{ .RelPermalink }}">
|
||||||
</div>
|
<img src="info.png" />
|
||||||
|
<span>Infos</span>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="concert-entry-small">
|
<div class="concert-entry-small">
|
||||||
<h4 class="concert-date">
|
<h4 class="concert-date">
|
||||||
{{ $t := time.AsTime .Params.ConcertDate }}
|
{{ $t := time.AsTime .Params.ConcertDate }}
|
||||||
{{ $format := "Monday 2 Jan 2006 15h04" }}
|
{{ $format := "Monday 2 Jan 2006 15h04" }}
|
||||||
{{ time.Format $format $t | humanize }}
|
{{ time.Format $format $t | humanize }}
|
||||||
</h4>
|
</h4>
|
||||||
<img src="bar.png" class="separator" />
|
<img src="bar.png" class="separator" />
|
||||||
<div class="concert-entry-container">
|
<div class="concert-entry-container">
|
||||||
<div class="concert-cover">
|
<div class="concert-cover">
|
||||||
{{ with .Resources.GetMatch "cover.*" }}
|
{{ with .Resources.GetMatch "cover.*" }}
|
||||||
<img
|
<img
|
||||||
src="{{ .RelPermalink }}"
|
src="{{ .RelPermalink }}"
|
||||||
width="{{ .Width }}"
|
width="{{ .Width }}"
|
||||||
height="{{ .Height }}"
|
height="{{ .Height }}"
|
||||||
alt="Concert cover"
|
alt="Concert cover"
|
||||||
/>
|
/>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
|
||||||
<div class="concert-overview">
|
|
||||||
<a href="{{ .RelPermalink }}"><h3>{{ .LinkTitle }}</h3></a>
|
|
||||||
<h4>{{ .Description }}</h4>
|
|
||||||
<p>{{ .Summary }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<img src="bar.png" class="separator" />
|
|
||||||
<div class="concert-buttons">
|
|
||||||
<a class="concert-button" href="{{ .Params.TicketsLink }}">
|
|
||||||
<img src="billets.png" />
|
|
||||||
<span>Billets</span>
|
|
||||||
</a>
|
|
||||||
<a class="concert-button" href="{{ .RelPermalink }}">
|
|
||||||
<img src="info.png" />
|
|
||||||
<span>Infos</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
<div class="concert-overview">
|
||||||
|
<a href="{{ .RelPermalink }}"><h3>{{ .LinkTitle }}</h3></a>
|
||||||
|
<h4>{{ .Description }}</h4>
|
||||||
|
<p>{{ .Summary }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<img src="bar.png" class="separator" />
|
||||||
|
<div class="concert-buttons">
|
||||||
|
<a class="concert-button" href="{{ .Params.TicketsLink }}">
|
||||||
|
<img src="billets.png" />
|
||||||
|
<span>Billets</span>
|
||||||
|
</a>
|
||||||
|
<a class="concert-button" href="{{ .RelPermalink }}">
|
||||||
|
<img src="info.png" />
|
||||||
|
<span>Infos</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue