friendica/view/templates/content/image.tpl
Hypolite Petovan 86141eb363 Add height allocation to single post attached images
- Force single images to expand to the total width of the post
2023-09-23 22:20:17 -04:00

11 lines
592 B
Smarty

{{* $image.widthRatio is only set in the context of Model\Item->makeImageGrid *}}
<figure class="img-allocated-height" style="width: {{if $image.widthRatio}}{{$image.widthRatio}}%{{else}}auto{{/if}}; padding-bottom: {{$allocated_height}}">
{{if $image.preview}}
<a data-fancybox="{{$image.uri_id}}" href="{{$image.attachment.url}}">
<img src="{{$image.preview}}" alt="{{$image.attachment.description}}" title="{{$image.attachment.description}}">
</a>
{{else}}
<img src="{{$image.src}}" alt="{{$image.attachment.description}}" title="{{$image.attachment.description}}">
{{/if}}
</figure>