lestoitsduval/layouts/actualites/single.html

37 lines
1.1 KiB
HTML
Raw Permalink Normal View History

2020-03-26 18:48:07 +01:00
{{ define "main" }}
2020-05-22 11:13:09 +02:00
<div class="container small">
{{ $path := .Params.image }}
2021-04-27 16:38:54 +02:00
{{ $credit := .Params.image_credit }}
2020-05-22 11:13:09 +02:00
{{ with .Resources.GetMatch $path }}
{{ $img := .Fill "680x382 center" }}
2021-04-27 16:38:54 +02:00
<img class="actu-image" src="{{ $img.RelPermalink }}"{{ with $credit }} alt="{{ . }}" title="{{ . }}"{{ end}} />
2020-05-22 11:13:09 +02:00
{{ end }}
{{ .Content }}
<hr>
<h3 class="txt-center">Articles précédents et suivants</h3>
</div>
<div class="container">
<aside class="grid actualites -middle">
{{ with .NextInSection }}
{{ partial "actualite" . }}
{{else}}
<div class="cell -6of12 empty">
<div class="info grid -middle -center">
Vous lisez l'article le plus récent
</div>
</div>
{{ end }}
{{ with .PrevInSection }}
{{ partial "actualite" . }}
{{else}}
<div class="cell -6of12 empty">
<div class="info grid -middle -center">
Vous lisez l'article le plus ancien
</div>
</div>
{{ end }}
</div>
</aside>
</div>
2020-03-26 18:48:07 +01:00
{{ end }}