Merge pull request #13512 from MrPetovan/bug/13506-allocated-width

Fix wrong template variable name when using content/image/single_with_height_allocation.tpl
This commit is contained in:
Tobias Diekershoff 2023-10-07 14:26:43 +02:00 committed by GitHub
commit d1e6a16cde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -39,7 +39,7 @@ class Image
$media = Renderer::replaceMacros(Renderer::getMarkupTemplate('content/image/single_with_height_allocation.tpl'), [
'$image' => $PostMediaImages[0],
'$allocated_height' => $PostMediaImages[0]->getAllocatedHeight(),
'$allocated_max_width' => ($PostMediaImages[0]->previewWidth ?? $PostMediaImages[0]->width) . 'px',
'$allocated_width' => ($PostMediaImages[0]->previewWidth ?? $PostMediaImages[0]->width) . 'px',
]);
}
} else {

View file

@ -715,6 +715,7 @@ figure.img-allocated-height {
position: relative;
background: center / auto rgba(0, 0, 0, 0.05) url(/images/icons/image.png) no-repeat;
margin: 0;
max-width: 100%;
}
figure.img-allocated-height img{
position: absolute;