BUGFIX: fix url error for the single picture type
This commit is contained in:
parent
816a3489e4
commit
321ab8c87e
1 changed files with 9 additions and 1 deletions
|
@ -101,7 +101,11 @@
|
|||
|
||||
{{ if (eq (len $pictures_set) 1) }}
|
||||
{{ range $pictures_set }}
|
||||
<img src="{{ . }}" class="single-pic" alt="Responsive image" data-fancybox="gallery" data-caption={{ $picture_caption }}></img>
|
||||
{{ $src := . }}
|
||||
{{ if resources.Get $src }}
|
||||
{{ $src = (resources.Get $src).Permalink }}
|
||||
{{ end }}
|
||||
<img src="{{ $src }}" class="single-pic" alt="Responsive image" data-fancybox="gallery" data-caption={{ $picture_caption }}></img>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
@ -111,6 +115,10 @@
|
|||
|
||||
{{/* Probably DEPRECATED in the future: single picture (old version API `pic`)*/}}
|
||||
{{ with $page.Params.pic }}
|
||||
{{ $src := . }}
|
||||
{{ if resources.Get $src }}
|
||||
{{ $src = (resources.Get $src).Permalink }}
|
||||
{{ end }}
|
||||
<img src="{{ . }}" class="single-pic" alt="Responsive image" data-fancybox="gallery" data-caption={{ $picture_caption }}></img>
|
||||
{{ end }}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue