1
Fork 0
theorangeone.net-legacy/layouts/_default/_markup/render-image.html
Jake Howard fd8f9788ac
Add a very basic lightbox to all content images
It's a bit nicer than just opening the image in a new tab
2021-12-12 18:58:05 +00:00

14 lines
504 B
HTML

{{ $destination := .Destination }}
{{ $resource := .Page.Resources.GetMatch $destination }}
{{ if $resource }}
{{ $destination = ($resource.Resize "1500x").RelPermalink }}
{{ end }}
<figure class="text-center">
<img src="{{ $destination | safeURL }}" alt="{{ .Text | plainify }}" style='max-width: {{ default "90" .Title }}%;' referrerpolicy="no-referrer" loading="lazy" decoding="async" />
<figcaption class="text-center">
<small>{{ .Text | markdownify }}</small>
</figcaption>
</figure>