Files
caldwell/layouts/partials/components/image/index.html
2025-09-13 20:35:50 +00:00

29 lines
854 B
HTML

{{- $page := .page -}}
{{- $image := .image -}}
{{- $data := partial "components/image/process.html" (dict "image" .image "page" .page) -}}
{{- with $data -}}
<figure class="captioned-image lightbox">
<a
href="{{- $data.full.RelPermalink -}}"
data-pswp-src="{{- $data.full.RelPermalink -}}"
data-pswp-width="{{- $data.full.Width -}}"
data-pswp-height="{{- $data.full.Height -}}"
class="pswp-image"
>
<img
src="{{- $data.thumb.RelPermalink -}}"
width="{{- $data.thumb.Width -}}"
height="{{- $data.thumb.Height -}}"
loading="lazy"
{{ with $data.title }}title="{{- . -}}"{{ end }}
{{ with $data.alt }}alt="{{- . -}}"{{ end }}
/>
</a>
{{ with $data.caption }}
<figcaption>{{ . | safeHTML }}</figcaption>
{{ end }}
</figure>
{{- end -}}