website/layouts/actualites/single.html
Matthieu Bessat fc9627506f
All checks were successful
Deploy workflow / deploy (push) Successful in 28s
fix: various style and content fixes
2024-03-12 15:18:14 +01:00

50 lines
1.6 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" }}
<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>
{{ with .Params.author }}
<div class="article__author">
Par {{ .name }}.
</div>
{{ end }}
</article>
</main>
{{ end }}