Reorganize partials
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
22
layouts/partials/components/image/index.html
Normal file
22
layouts/partials/components/image/index.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{{ $imageData := partial "components/image/reflect.html" . }}
|
||||
{{- with $imageData.image -}}
|
||||
<figure class="captioned-image lightbox">
|
||||
<a
|
||||
href="{{- .RelPermalink -}}"
|
||||
data-pswp-width="{{- .Width -}}"
|
||||
data-pswp-height="{{- .Height -}}"
|
||||
>
|
||||
<img
|
||||
src="{{- .RelPermalink -}}"
|
||||
width="{{- .Width -}}"
|
||||
height="{{- .Height -}}"
|
||||
loading="lazy"
|
||||
{{ with $imageData.title }}title="{{- . -}}"{{ end }}
|
||||
{{ with $imageData.alt }}alt="{{- . -}}"{{ end }}
|
||||
/>
|
||||
</a>
|
||||
{{ with $imageData.caption }}
|
||||
<figcaption>{{ . }}</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{- end -}}
|
Reference in New Issue
Block a user