Add upcoming section
This commit is contained in:
parent
bcd86c1ebe
commit
af606d3188
10 changed files with 172 additions and 105 deletions
|
|
@ -1,72 +1,11 @@
|
|||
{{ define "main" }}
|
||||
<h2>Actualités</h2>
|
||||
<div class="concerts">
|
||||
{{ range where site.RegularPages "Section" "event" }}
|
||||
<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>
|
||||
</div>
|
||||
<div class="concert-buttons">
|
||||
<a class="concert-button" href="{{ .Params.TicketsLink }}"
|
||||
>Billets</a
|
||||
>
|
||||
<a class="concert-button" href="{{ .RelPermalink }}"
|
||||
>Infos</a
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h2>Programme</h2>
|
||||
{{ partial "events/program.html" . }}
|
||||
</div>
|
||||
|
||||
<div class="concert-entry-small">
|
||||
<h4 class="concert-date">{{ .Params.ConcertDate }}</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 }}
|
||||
<div>
|
||||
<h2>Évènements à venir</h2>
|
||||
{{ partial "events/upcoming.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
|
|||
76
layouts/partials/events/program.html
Normal file
76
layouts/partials/events/program.html
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
<div class="concerts">
|
||||
{{ $sites := where site.RegularPages "Section" "event" }}
|
||||
{{ range sort $sites ".Params.ConcertDate" }}
|
||||
<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="{{ .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>
|
||||
|
||||
<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 }}
|
||||
</div>
|
||||
17
layouts/partials/events/upcoming.html
Normal file
17
layouts/partials/events/upcoming.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<div class="upcoming">
|
||||
{{ $sites := where site.RegularPages "Section" "upcoming" }}
|
||||
{{ range sort $sites ".Params.ConcertDate" }}
|
||||
<div class="upcoming-entry">
|
||||
<p class="concert-date">
|
||||
{{ $t := time.AsTime .Params.ConcertDate }}
|
||||
{{ $format1 := "Monday 2 Jan 2006" }}
|
||||
{{ $format2 := "Jan 2006" }}
|
||||
|
||||
|
||||
<!-- TODO: Try format1 -->
|
||||
{{ time.Format $format2 $t | humanize }}
|
||||
</p>
|
||||
<h2>{{ .LinkTitle }}</h2>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue