vmems-website/layouts/_default/single.html

38 lines
1.3 KiB
HTML
Raw Normal View History

2023-10-28 08:20:52 +00:00
{{ define "main" }}
<main class="container">
2023-10-28 08:20:52 +00:00
<article class="article">
<h1 class="page-title">{{ .Title }}</h1>
2023-10-28 08:20:52 +00:00
<p class="text-small">
{{ with .Date }}
<span>Publié le <b><time>{{ . | time.Format ":date_full" }}</time></b>,</span>
{{ end }}
{{ with .Lastmod }}
<span>Mis à jour le <b><time>{{ . | time.Format ":date_full" }}</time></b></span>
{{ end }}
</p>
2023-10-28 08:20:52 +00:00
{{ if .Params.featured_image }}
{{ $featuredImage := .Resources.GetMatch (.Params.featured_image.src | safeURL) }}
{{ if $featuredImage }}
{{ $featuredImage = $featuredImage.Resize "600x" }}
<figure class="figure">
<img class="figure-img img-fluid" alt="" src="{{ $featuredImage.RelPermalink }}" />
2023-10-28 08:20:52 +00:00
{{ with .Params.featured_image.caption }}
<figcaption class="figure-caption">{{ . }}</figcaption>
2023-10-28 08:20:52 +00:00
{{ end }}
</figure>
{{ end }}
{{ end }}
{{ range .Params.tags }}
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
<div>
{{ .Content }}
</div>
</article>
</main>
{{ end }}