www.kontakt-bamberg.de/layouts/partials/gallery/gallery.html

17 lines
460 B
HTML
Raw Permalink Normal View History

<section class="gallery">
{{ range . }}
<a class="blur-on-hover" href="{{ .RelPermalink }}">
{{ $page := . }}
{{ with .Params.preview }}
{{ $image := $page.Resources.GetMatch . }}
<img alt="{{ $image.Title }}" src="{{ ($image.Fill "560x560").RelPermalink }}">
{{ else }}
{{ with index (.Resources.ByType "image") 0 }}
<img alt="{{ .Title }}" src="{{ (.Fill "560x560").RelPermalink }}">
{{ end }}
{{ end }}
<p>{{ .Title }}</p>
</a>
{{ end }}
</section>