histoiredunpied/layouts/partials/boutique.html

31 lines
1.3 KiB
HTML

<div class="bg colored">
<a id="_contact" class="ancre"></a>
<div class="container">
<h2 id="contact">BOUTIQUE</h2>
<div class="news">
{{ with .Site.GetPage "/livres" }}
{{ $actu := . }}
{{ range .Resources.ByType "page" }}
{{ if or (not .Params.draft) (eq hugo.Environment "development") }}
<article class="card grid -middle -even-reverse">
<div class="card-image cell -5of12">
{{ $src := $actu.Resources.GetMatch (printf "*%s/%s*" (path.Base .File.Dir) (.Params.Image)) }}
{{ if $src }}
{{ $image := $src.Fill "432x300 Center" }}
{{ $alt := index .Params "image_title" | default (index .Params "title") }}
<img src="{{ $image.RelPermalink }}" alt="{{ $alt }}" loading="lazy" />
{{ end }}
</div>
<div class="card-body cell -7of12">
<h3>{{ .Title }}</h3>
{{ .Content }}
<a href="{{ .Params.link }}" class="button">Acheter</a>
</div>
</article>
{{ end }}
{{ end }}
{{ end }}
</div>
</div>
</div>