{{ define "main" }} <div class="container"> {{ $headless := site.GetPage "/" }} {{ $imageSize := "1208x459 Center webp" }} {{ $image := default ($headless.Resources.GetMatch "**.jpg") (.Resources.GetMatch (default "**.jpg" .Params.image)) }} {{ if $image }} {{ $resized := $image.Fill $imageSize }} <img class="hero no-print" src="{{ $resized.RelPermalink }}" alt="{{ or .Params.image_ .Params.image_credit }}" title="{{ or .Params.image_ .Params.image_credit }}" /> {{ end }} <h1>{{ .RenderString .Title }}</h1> <div class="container news md"> <small> Publié le <time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Day }} {{ index $.Site.Data.mois (printf "%d" .Date.Month) }} {{ .Date.Year }}</time>{{ if isset .Params "auteur" }} - {{ .Params.auteur }}{{ end }} </small> {{ .Content }} <aside> <hr> <h2> {{ if and .NextInSection .PrevInSection }} Les actualités suivantes et précédentes {{ else if .NextInSection }} L'actualité précédente {{ else }} L'actualité suivante {{ end }} </h2> {{ with .NextInSection }} {{ .Scratch.Set "big" false }} {{ partial "article-preview.html" . }} {{ end }} {{ with .PrevInSection }} {{ .Scratch.Set "big" false }} {{ partial "article-preview.html" . }} {{ end }} </aside> </div> </div> {{ end }}