13 lines
743 B
HTML
13 lines
743 B
HTML
|
{{- $url := .Destination | safeURL -}}
|
||
|
{{- $img := .Page.Resources.GetMatch .Destination -}}
|
||
|
{{- if and (not $img) .Page.File -}}
|
||
|
{{ $path := path.Join .Page.File.Dir .Destination }}
|
||
|
{{- $img = resources.Get $path -}}
|
||
|
{{- end -}}
|
||
|
{{- with $img -}}
|
||
|
{{- $large := $img.Resize "800x webp" -}}
|
||
|
<a class="gallery-img spotlight" href="{{ $img.RelPermalink }}" data-download="true"><img class="fancy-img" alt="{{ $.Text }}" width="{{ $large.Width }}" height="{{ $large.Height }}" src="{{ $large.RelPermalink }}" src="{{ $large.RelPermalink }}" /></a>
|
||
|
{{- else -}}
|
||
|
|
||
|
<a class="gallery-img spotlight" href="{{ .Destination | safeURL }}" data-download="true"><img class="fancy-img" src="{{ .Destination | safeURL }}" alt="{{ $.Text }}" />{{- end -}}</a>
|