Files
caldwell/layouts/partials/gallery/list.html
2025-09-13 19:37:44 +00:00

39 lines
1.2 KiB
HTML

<div class="gallery masonry lightbox">
<div class="grid-sizer"></div>
{{ range sort .Pages "Date" "desc" }}
{{ if not .Params.private }}
{{ $imageData := partial "components/image/reflect.html" .Params.hero }}
{{ with $imageData.image }}
<div class="image grid-item">
<a
href="{{- .Page.RelPermalink -}}"
data-pswp-src="{{- .RelPermalink -}}"
data-pswp-width="{{- .Width -}}"
data-pswp-height="{{- .Height -}}"
class="pswp-image"
>
<img
src="{{- .RelPermalink -}}"
width="{{- .Width -}}"
height="{{- .Height -}}"
loading="lazy"
{{ with $imageData.title }}title="{{- . -}}"{{ end }}
{{ with $imageData.alt }}alt="{{- . -}}"{{ end }}
/>
</a>
<div class="pswp-caption-content">
<div>
{{ upper .Page.Title }}
<div class="meta">
{{ .Page.Date | time.Format ":date_medium" }}
&middot;
<a href="{{- .Page.RelPermalink -}}">View Post</a>
</div>
</div>
</div>
</div>
{{ end }}
{{ end }}
{{ end }}
</div>