Renamed. The image was actually the small version.

This commit is contained in:
Christoph Haas 2021-02-14 10:35:50 +01:00
parent f2a283606e
commit fce8fe2dce
3 changed files with 6 additions and 20 deletions

View file

@ -8,24 +8,14 @@
// Search form
= render 'packages/searchfield'
// Package list
.grid-x.packagepage
// List view of packages
.grid-x
.small-9.medium-10.cell
- if @packages.length>0
- @packages.to_a.each do |pkg|
.grid-x.listview
.small-12.medium-4.cell
- if pkg.screenshots_approved.any?
// TODO: smarter search for the best screenshot instead of taking the first one
- screenshot = pkg.screenshots.first
a.black title=screenshot.caption href=package_path(name: pkg.name)
= image_tag(screenshot.medium_image, alt: screenshot.caption)
/- if pkg.screenshots.length > 1
a.black href=package_path(name: pkg.name)
'and #{pluralize(pkg.screenshots.length-1, 'screenshot')} more…
- else
a href=package_path(name: pkg.name)
img.screenshot src="/images/dummy/no-screenshots-upload-one.svg" width="100%"
.small-12.medium-4.cell.pkgcard
= render partial: 'packages/grid_small_image', locals: { pkg: pkg }
.small-12.medium-8.cell
h1
a href=package_path(name: pkg.name)