Add past events
This commit is contained in:
parent
62ada17675
commit
bd59013800
4 changed files with 205 additions and 95 deletions
|
|
@ -1,13 +1,15 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<div class="home">
|
<div class="home">
|
||||||
<div>
|
<div>
|
||||||
<h2>Programme</h2>
|
|
||||||
{{ partial "events/program.html" . }}
|
{{ partial "events/program.html" . }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h2>Évènements à venir</h2>
|
|
||||||
{{ partial "events/upcoming.html" . }}
|
{{ partial "events/upcoming.html" . }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ partial "events/past.html" . }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
||||||
89
layouts/partials/events/past.html
Normal file
89
layouts/partials/events/past.html
Normal file
|
|
@ -0,0 +1,89 @@
|
||||||
|
{{ $sites := where site.RegularPages "Section" "events" }}
|
||||||
|
{{ if gt (len $sites) 0 }}
|
||||||
|
<div class="concerts">
|
||||||
|
<h2>Évènements passés</h2>
|
||||||
|
{{ range sort $sites ".Params.ConcertDate" }}
|
||||||
|
{{ $currentTime := (time now) }}
|
||||||
|
{{ $delta := $currentTime.Sub (time .Params.ConcertDate ) }}
|
||||||
|
{{ if gt $delta 0 }}
|
||||||
|
<div class="concert-entry">
|
||||||
|
<p class="concert-date">
|
||||||
|
{{ $t := time.AsTime .Params.ConcertDate }}
|
||||||
|
{{ $format := "Monday 2 Jan 2006 15h04" }}
|
||||||
|
{{ time.Format $format $t | humanize }}
|
||||||
|
</p>
|
||||||
|
<div class="concert-cover">
|
||||||
|
{{ with .Resources.GetMatch "cover.*" }}
|
||||||
|
<img
|
||||||
|
src="{{ .RelPermalink }}"
|
||||||
|
width="{{ .Width }}"
|
||||||
|
height="{{ .Height }}"
|
||||||
|
alt="Concert cover"
|
||||||
|
/>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
<div class="concert-overview">
|
||||||
|
<h2>
|
||||||
|
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
|
||||||
|
</h2>
|
||||||
|
<h3>{{ .Summary }}</h3>
|
||||||
|
<h4>{{ .Description }}</h4>
|
||||||
|
|
||||||
|
<img src="bar.png" class="separator" />
|
||||||
|
<div class="concert-buttons">
|
||||||
|
<a
|
||||||
|
class="concert-button"
|
||||||
|
href="{{ .RelPermalink }}"
|
||||||
|
>
|
||||||
|
<img src="info.png" />
|
||||||
|
<span>Infos</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="concert-entry-small">
|
||||||
|
<h4 class="concert-date">
|
||||||
|
{{ $t := time.AsTime .Params.ConcertDate }}
|
||||||
|
{{ $format := "Monday 2 Jan 2006 15h04" }}
|
||||||
|
{{ time.Format $format $t | humanize }}
|
||||||
|
</h4>
|
||||||
|
<img src="bar.png" class="separator" />
|
||||||
|
<div class="concert-entry-container">
|
||||||
|
<div class="concert-cover">
|
||||||
|
{{ with .Resources.GetMatch "cover.*" }}
|
||||||
|
<img
|
||||||
|
src="{{ .RelPermalink }}"
|
||||||
|
width="{{ .Width }}"
|
||||||
|
height="{{ .Height }}"
|
||||||
|
alt="Concert cover"
|
||||||
|
/>
|
||||||
|
{{ 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>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
@ -1,6 +1,11 @@
|
||||||
<div class="concerts">
|
{{ $sites := where site.RegularPages "Section" "events" }}
|
||||||
{{ $sites := where site.RegularPages "Section" "events" }}
|
{{ if gt (len $sites) 0 }}
|
||||||
|
<div class="concerts">
|
||||||
|
<h2>Programme</h2>
|
||||||
{{ range sort $sites ".Params.ConcertDate" }}
|
{{ range sort $sites ".Params.ConcertDate" }}
|
||||||
|
{{ $currentTime := (time now) }}
|
||||||
|
{{ $delta := $currentTime.Sub (time .Params.ConcertDate ) }}
|
||||||
|
{{ if lt $delta 0 }}
|
||||||
<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 }}
|
||||||
|
|
@ -18,21 +23,25 @@
|
||||||
{{ 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">
|
||||||
{{ $currentTime := (time now) }}
|
<a
|
||||||
{{ $delta := $currentTime.Sub (time .Params.ConcertDate ) }}
|
class="concert-button"
|
||||||
{{ if lt $delta 0 }}
|
href="{{ .Params.TicketsLink }}"
|
||||||
<a class="concert-button" href="{{ .Params.TicketsLink }}">
|
>
|
||||||
<img src="billets.png" />
|
<img src="billets.png" />
|
||||||
<span>Billets</span>
|
<span>Billets</span>
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
<a
|
||||||
<a class="concert-button" href="{{ .RelPermalink }}">
|
class="concert-button"
|
||||||
|
href="{{ .RelPermalink }}"
|
||||||
|
>
|
||||||
<img src="info.png" />
|
<img src="info.png" />
|
||||||
<span>Infos</span>
|
<span>Infos</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -59,14 +68,19 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
<div class="concert-overview">
|
<div class="concert-overview">
|
||||||
<a href="{{ .RelPermalink }}"><h3>{{ .LinkTitle }}</h3></a>
|
<a href="{{ .RelPermalink }}"
|
||||||
|
><h3>{{ .LinkTitle }}</h3></a
|
||||||
|
>
|
||||||
<h4>{{ .Description }}</h4>
|
<h4>{{ .Description }}</h4>
|
||||||
<p>{{ .Summary }}</p>
|
<p>{{ .Summary }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<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 }}">
|
<a
|
||||||
|
class="concert-button"
|
||||||
|
href="{{ .Params.TicketsLink }}"
|
||||||
|
>
|
||||||
<img src="billets.png" />
|
<img src="billets.png" />
|
||||||
<span>Billets</span>
|
<span>Billets</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -77,4 +91,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
<div class="upcoming">
|
{{ $sites := where site.RegularPages "Section" "upcoming" }}
|
||||||
{{ $sites := where site.RegularPages "Section" "upcoming" }}
|
{{ if gt (len $sites) 0 }}
|
||||||
|
<h2>Évènements à venir</h2>
|
||||||
|
<div class="upcoming">
|
||||||
{{ range sort $sites ".Params.ConcertDate" }}
|
{{ range sort $sites ".Params.ConcertDate" }}
|
||||||
<div class="upcoming-entry">
|
<div class="upcoming-entry">
|
||||||
<p class="concert-date">
|
<p class="concert-date">
|
||||||
|
|
@ -14,4 +16,5 @@
|
||||||
<h2>{{ .LinkTitle }}</h2>
|
<h2>{{ .LinkTitle }}</h2>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue