Migration to Shrine attachment handling

This commit is contained in:
Christoph Haas 2020-11-01 15:07:16 +01:00
parent 2d53397dda
commit c4f5741b0c
13 changed files with 175 additions and 181 deletions

View file

@ -4,7 +4,8 @@ a.black href=package_path(name: pkg.name)
- if pkg.screenshots_approved.any?
// TODO: smarter selection of the most useful screenshot instead of taking the first one
- screenshot = pkg.screenshots.first
= image_tag(screenshot.image.variant(resize_to_limit: [160,120]), alt: screenshot.caption, class: 'thumbnail')
/= image_tag(screenshot.image.variant(resize_to_limit: [160,120]), alt: screenshot.caption, class: 'thumbnail')
= image_tag(screenshot.simage_url(:small), alt: screenshot.caption, class: 'thumbnail')
- else
img.screenshot.thumbnail src="/images/dummy/no-screenshots-upload-one.svg"
div