Use resize_to_limit to avoid stretching images

This commit is contained in:
Christoph Haas 2020-08-17 01:48:51 +02:00
parent 53911f226d
commit b70a9f1a07
7 changed files with 13 additions and 13 deletions

View file

@ -30,7 +30,7 @@
h2 Newest upload
.thumb-height
a href=package_path(@newest_upload.package.name)
= image_tag(@newest_upload.image.variant(resize: "160x120"), alt: @newest_upload.caption)
= image_tag(@newest_upload.image.variant(resize_to_limit: "160x120"), alt: @newest_upload.caption)
p
strong
=@newest_upload.package.name
@ -41,7 +41,7 @@
.thumb-height
- if @most_popular_package
a href=package_path(@most_popular_package.name)
= image_tag(@most_popular_package.screenshots.first.image.variant(resize: "160x120"))
= image_tag(@most_popular_package.screenshots.first.image.variant(resize_to_limit: "160x120"))
- else
'No uploaded screenshots yet.
p