diff --git a/layouts/_default/home.html b/layouts/_default/home.html index 1945fb7..8270548 100644 --- a/layouts/_default/home.html +++ b/layouts/_default/home.html @@ -1,13 +1,15 @@ {{ define "main" }}
-

Programme

{{ partial "events/program.html" . }}
-

Évènements à venir

{{ partial "events/upcoming.html" . }}
+ +
+ {{ partial "events/past.html" . }} +
{{ end }} diff --git a/layouts/partials/events/past.html b/layouts/partials/events/past.html new file mode 100644 index 0000000..9c6fb32 --- /dev/null +++ b/layouts/partials/events/past.html @@ -0,0 +1,89 @@ +{{ $sites := where site.RegularPages "Section" "events" }} +{{ if gt (len $sites) 0 }} +
+

Évènements passés

+ {{ range sort $sites ".Params.ConcertDate" }} + {{ $currentTime := (time now) }} + {{ $delta := $currentTime.Sub (time .Params.ConcertDate ) }} + {{ if gt $delta 0 }} +
+

+ {{ $t := time.AsTime .Params.ConcertDate }} + {{ $format := "Monday 2 Jan 2006 15h04" }} + {{ time.Format $format $t | humanize }} +

+
+ {{ with .Resources.GetMatch "cover.*" }} + Concert cover + {{ end }} +
+
+

+ {{ .LinkTitle }} +

+

{{ .Summary }}

+

{{ .Description }}

+ + + +
+
+ +
+

+ {{ $t := time.AsTime .Params.ConcertDate }} + {{ $format := "Monday 2 Jan 2006 15h04" }} + {{ time.Format $format $t | humanize }} +

+ +
+
+ {{ with .Resources.GetMatch "cover.*" }} + Concert cover + {{ end }} +
+
+

{{ .LinkTitle }}

+

{{ .Description }}

+

{{ .Summary }}

+
+
+ + +
+ {{ end }} + {{ end }} +
+{{ end }} diff --git a/layouts/partials/events/program.html b/layouts/partials/events/program.html index c10950f..78f4c57 100644 --- a/layouts/partials/events/program.html +++ b/layouts/partials/events/program.html @@ -1,80 +1,96 @@ -
- {{ $sites := where site.RegularPages "Section" "events" }} - {{ range sort $sites ".Params.ConcertDate" }} -
-

- {{ $t := time.AsTime .Params.ConcertDate }} - {{ $format := "Monday 2 Jan 2006 15h04" }} - {{ time.Format $format $t | humanize }} -

-
- {{ with .Resources.GetMatch "cover.*" }} - Concert cover +{{ $sites := where site.RegularPages "Section" "events" }} +{{ if gt (len $sites) 0 }} +
+

Programme

+ {{ range sort $sites ".Params.ConcertDate" }} + {{ $currentTime := (time now) }} + {{ $delta := $currentTime.Sub (time .Params.ConcertDate ) }} + {{ if lt $delta 0 }} +
+

+ {{ $t := time.AsTime .Params.ConcertDate }} + {{ $format := "Monday 2 Jan 2006 15h04" }} + {{ time.Format $format $t | humanize }} +

+
+ {{ with .Resources.GetMatch "cover.*" }} + Concert cover + {{ end }} +
+
+

+ {{ .LinkTitle }} +

+

{{ .Summary }}

+

{{ .Description }}

+ + + +
+
+ +
+

+ {{ $t := time.AsTime .Params.ConcertDate }} + {{ $format := "Monday 2 Jan 2006 15h04" }} + {{ time.Format $format $t | humanize }} +

+ +
+
+ {{ with .Resources.GetMatch "cover.*" }} + Concert cover + {{ end }} +
+
+

{{ .LinkTitle }}

+

{{ .Description }}

+

{{ .Summary }}

+
+
+ + +
+ {{ end }} {{ end }} -
-
-

{{ .LinkTitle }}

-

{{ .Summary }}

-

{{ .Description }}

- - -
- {{ $currentTime := (time now) }} - {{ $delta := $currentTime.Sub (time .Params.ConcertDate ) }} - {{ if lt $delta 0 }} - - - Billets - - {{ end }} - - - Infos - -
-
- -
-

- {{ $t := time.AsTime .Params.ConcertDate }} - {{ $format := "Monday 2 Jan 2006 15h04" }} - {{ time.Format $format $t | humanize }} -

- -
-
- {{ with .Resources.GetMatch "cover.*" }} - Concert cover - {{ end }} -
-
-

{{ .LinkTitle }}

-

{{ .Description }}

-

{{ .Summary }}

-
-
- - -
- {{ end }} -
+{{ end }} diff --git a/layouts/partials/events/upcoming.html b/layouts/partials/events/upcoming.html index 44acad0..5293215 100644 --- a/layouts/partials/events/upcoming.html +++ b/layouts/partials/events/upcoming.html @@ -1,17 +1,20 @@ -
- {{ $sites := where site.RegularPages "Section" "upcoming" }} - {{ range sort $sites ".Params.ConcertDate" }} -
-

- {{ $t := time.AsTime .Params.ConcertDate }} - {{ $format1 := "Monday 2 Jan 2006" }} - {{ $format2 := "Jan 2006" }} +{{ $sites := where site.RegularPages "Section" "upcoming" }} +{{ if gt (len $sites) 0 }} +

Évènements à venir

+
+ {{ range sort $sites ".Params.ConcertDate" }} +
+

+ {{ $t := time.AsTime .Params.ConcertDate }} + {{ $format1 := "Monday 2 Jan 2006" }} + {{ $format2 := "Jan 2006" }} - - {{ time.Format $format2 $t | humanize }} -

-

{{ .LinkTitle }}

-
- {{ end }} -
+ + {{ time.Format $format2 $t | humanize }} +

+

{{ .LinkTitle }}

+
+ {{ end }} +
+{{ end }}