website/layouts/actualites/single.html

50 lines
1.6 KiB
HTML
Raw Permalink Normal View History

2024-03-12 14:18:14 +00:00
{{ 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>
2024-03-12 14:18:14 +00:00
<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>
2022-10-14 18:56:56 +00:00
{{ if .Params.featured_image }}
{{ $featuredImage := .Resources.GetMatch (.Params.featured_image.src | safeURL) }}
{{ if $featuredImage }}
{{ $featuredImage = $featuredImage.Resize "900x" }}
2022-10-14 18:56:56 +00:00
<figure class="article__featured-image">
<img alt="" src="{{ $featuredImage.RelPermalink }}" />
{{ with .Params.featured_image.caption }}
<figcaption>{{ . }}</figcaption>
{{ end }}
</figure>
{{ end }}
{{ end }}
{{ range .Params.tags }}
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
<div>
{{ .Content }}
</div>
2024-03-12 14:18:14 +00:00
{{ with .Params.author }}
<div class="article__author">
Par {{ .name }}.
</div>
{{ end }}
</article>
</main>
{{ end }}