Add caption to described images without a preview
This commit is contained in:
parent
2c297da755
commit
2eab25e7c1
2 changed files with 9 additions and 1 deletions
|
@ -1,5 +1,10 @@
|
||||||
{{if $image->preview}}
|
{{if $image->preview}}
|
||||||
<a data-fancybox="{{$image->uriId}}" href="{{$image->url}}"><img src="{{$image->preview}}" alt="{{$image->description}}" title="{{$image->description}}" loading="lazy"></a>
|
<a data-fancybox="{{$image->uriId}}" href="{{$image->url}}"><img src="{{$image->preview}}" alt="{{$image->description}}" title="{{$image->description}}" loading="lazy"></a>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
<figure>
|
||||||
<img src="{{$image->url}}" alt="{{$image->description}}" title="{{$image->description}}" loading="lazy">
|
<img src="{{$image->url}}" alt="{{$image->description}}" title="{{$image->description}}" loading="lazy">
|
||||||
|
{{if $image->description}}
|
||||||
|
<figcaption>{{$image->description}}</figcaption>
|
||||||
|
{{/if}}
|
||||||
|
</figure>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -12,6 +12,9 @@
|
||||||
</a>
|
</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
<img src="{{$image->url}}" alt="{{$image->description}}" title="{{$image->description}}" loading="lazy">
|
<img src="{{$image->url}}" alt="{{$image->description}}" title="{{$image->description}}" loading="lazy">
|
||||||
|
{{if $image->description}}
|
||||||
|
<figcaption>{{$image->description}}</figcaption>
|
||||||
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</figure>
|
</figure>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue