2020-02-14 16:40:46 +01:00
|
|
|
<div class="news">
|
|
|
|
{{ with .Site.GetPage "/actu" }}
|
|
|
|
{{ $actu := . }}
|
|
|
|
{{ range .Resources.ByType "page" }}
|
2020-02-14 17:01:56 +01:00
|
|
|
{{ if or (not .Params.draft) (eq hugo.Environment "development") }}
|
2020-02-20 18:29:02 +01:00
|
|
|
<article class="card grid -middle -even-reverse">
|
|
|
|
<div class="card-image cell -5of12">
|
2020-02-14 16:40:46 +01:00
|
|
|
{{ $src := $actu.Resources.GetMatch (printf "*%s/%s*" (path.Base .File.Dir) (.Params.Image)) }}
|
|
|
|
{{ if $src }}
|
2020-03-09 11:24:34 +01:00
|
|
|
{{ $image := $src.Fill "432x300 Center" }}
|
2020-03-09 16:11:20 +01:00
|
|
|
{{ $alt := index .Params "image_title" | default (index .Params "title") }}
|
|
|
|
<img src="{{ $image.RelPermalink }}" alt="{{ $alt }}" />
|
2020-02-14 16:40:46 +01:00
|
|
|
{{ end }}
|
|
|
|
</div>
|
2020-02-20 18:29:02 +01:00
|
|
|
<div class="card-body cell -7of12">
|
2020-02-14 16:40:46 +01:00
|
|
|
<h3>{{ .Title }}</h3>
|
|
|
|
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Day }} {{ index $.Site.Data.mois (printf "%d" .Date.Month) }} {{ .Date.Year }}</time>
|
|
|
|
{{ .Content }}
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</div>
|