diff --git a/public_html/media/js/post-list.js b/public_html/media/js/post-list.js index dacdb80e..f2cb5b59 100644 --- a/public_html/media/js/post-list.js +++ b/public_html/media/js/post-list.js @@ -44,7 +44,10 @@ function alignPosts() var margin = thumbnailOuterWidth - thumbnailInnerWidth; var numberOfThumbnailsToFitInRow = Math.ceil(containerWidth / thumbnailOuterWidth); var newThumbnailWidth = Math.floor(containerWidth / numberOfThumbnailsToFitInRow) - margin; - container.find('.thumb').css('width', newThumbnailWidth + 'px'); + var newThumbnailHeight = newThumbnailWidth * thumbnailHeight / thumbnailWidth; + container.find('.thumb').css({ + width: newThumbnailWidth + 'px', + height: newThumbnailHeight + 'px'}); } $(function()