Try to fix broken background-image URL again

This commit is contained in:
Chris Hodapp 2020-04-28 08:15:58 -04:00
parent dc951d1590
commit a9fce04e16

View File

@ -44,7 +44,7 @@ Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/
<div class="box{{ with .Get "caption-position" }} fancy-figure caption-position-{{.}}{{end}}{{ with .Get "caption-effect" }} caption-effect-{{.}}{{end}}" {{ with .Get "width" }}style="max-width:{{.}}"{{end}}>
<figure {{ with .Get "class" }}class="{{.}}"{{ end }} itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
<div class="img"{{ if .Parent }} style="background-image: url('{{ $thumb }}');"{{ end }}{{ with .Get "size" }} data-size="{{.}}"{{ end }}>
<div class="img"{{ if .Parent }} style="background-image: url('../..{{ $thumb }}');"{{ end }}{{ with .Get "size" }} data-size="{{.}}"{{ end }}>
<img itemprop="thumbnail" src="{{ $thumb }}" {{ with .Get "alt" | default (.Get "caption" | markdownify) }}alt="{{.}}"{{ end }}/><!-- <img> hidden if in .gallery -->
</div>