2022-07-25 15:16:26 +02:00
|
|
|
{{ $url := .Destination }}
|
2020-07-20 16:03:28 +02:00
|
|
|
<figure>
|
2022-07-25 15:16:26 +02:00
|
|
|
{{ if or (hasPrefix $url "/") (hasPrefix $url "https://") (hasPrefix $url "http://") }}
|
|
|
|
{{ else }}
|
|
|
|
{{ $url = (printf "%s%s" .Page.Permalink $url) }}
|
|
|
|
{{ end }}
|
2022-07-25 12:19:05 +02:00
|
|
|
<a href="{{ $url | absURL }}" class="lbox">
|
2022-11-11 09:53:18 +01:00
|
|
|
<img src="{{ $url | absURL }}" loading="lazy"{{ with .Text }} alt="{{ . }}"{{ end }}{{ with .Title}} title="{{ . }}"{{ end }} data-pagefind-index-attrs="title">
|
2020-07-20 16:03:28 +02:00
|
|
|
</a>
|
|
|
|
{{ with .Title }}
|
|
|
|
<figcaption>{{ . }}</figcaption>
|
|
|
|
{{ end }}
|
|
|
|
</figure>
|