friendica-github/view/templates/content/image_grid.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

8 lines
440 B
Smarty

{{foreach $rows as $images}}
<div class="imagegrid-row" style="height: {{$images[0].commonHeightRatio}}%">
{{foreach $images as $image}}
{{* The absolute pixel value in the calc() should be mirrored from the .imagegrid-row column-gap value *}}
{{include file="content/image.tpl" image=$image allocated_height="calc(`$image.heightRatio * $image.widthRatio / 100`% - 5px / `$column_size`)"}}
{{/foreach}}
</div>
{{/foreach}}