website/layouts/actualites/single.html

51 lines
1.7 KiB
HTML

{{ define "head" }}
{{ with .Params.author }}
<meta name="author" content="{{ .name | default " L'Équipe communication de l'Étoile de Bethléem" }}" />
{{ end }}
{{ end }}
{{ define "main" }}
<main class="page-container read-article">
<article class="article">
<h1>{{ .Title }}</h1>
<div class="article__meta">
{{ with .Date }}
<div class="article__date">
Publié le
{{ $date := .Format "2006-01-02" }}
<time date="{{ $date }}">{{ time.Format "2 January 2006" $date }}</time>
</div>
{{ end }}
</div>
{{ if .Params.featured_image }}
{{ $featuredImage := .Resources.GetMatch (.Params.featured_image.src | safeURL) }}
{{ if $featuredImage }}
{{ $featuredImage = $featuredImage.Resize "900x" }}
<div class="single-figure-container article__featured-image-container">
<figure class="article__featured-image fig-img">
<img alt="" src="{{ $featuredImage.RelPermalink }}" />
{{ with .Params.featured_image.caption }}
<figcaption>{{ . }}</figcaption>
{{ end }}
</figure>
</div>
{{ end }}
{{ end }}
{{ range .Params.tags }}
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
<div>
{{ .Content }}
</div>
{{ with .Params.author }}
<div class="article__author">
Par {{ .name }}.
</div>
{{ end }}
</article>
</main>
{{ end }}