16 lines
517 B
HTML
16 lines
517 B
HTML
|
{{- $url := .Destination | safeURL -}}
|
||
|
{{- $block := gt (len .Title) 0 -}}
|
||
|
|
||
|
{{- if $block -}}
|
||
|
<span class="image-container"><span class="link">
|
||
|
{{- end -}}
|
||
|
<a target="_blank" rel="noopener noreferrer"
|
||
|
href="{{- $url -}}"><img {{ if $block }}class="img"{{ end }} src="{{- $url -}}"
|
||
|
alt{{- with .Text -}}="{{- . -}}" {{- end -}} /></a>
|
||
|
{{- if $block -}}
|
||
|
</span>
|
||
|
{{- if ne .Title " " -}}
|
||
|
<span class="caption"><span class="title">{{- .Title | safeHTML -}}</span></span>
|
||
|
{{- end -}}
|
||
|
</span>
|
||
|
{{- end -}}
|