debshots/app/views/packages/_grid_thumbnail.slim

15 lines
608 B
Text

// TODO: Handle packages with multiple screenshots
a.black href=package_path(name: pkg.name)
div.grid-thumbnail
- if pkg.screenshots.any?
// TODO: smarter search for the beste screenshot instead of taking the first one
- screenshot = pkg.screenshots.first
= image_tag(screenshot.image.url(:thumb, timestamp: false), alt: screenshot.caption)
- else
img.screenshot src="/images/dummy/no-screenshots-upload-one.svg"
div
// TODO: use description instead of package name (as soon as it is available)
.pkgname
=pkg.name
.pkgdescription
= pkg.description