Renamed. The image was actually the small version.
This commit is contained in:
parent
f2a283606e
commit
fce8fe2dce
3 changed files with 6 additions and 20 deletions
|
|
@ -1,7 +1,3 @@
|
||||||
a.black href=package_path(name: pkg.name)
|
a.black href=package_path(name: pkg.name)
|
||||||
.image
|
.image
|
||||||
= small_img(screenshots_visible_to_user(pkg, session).first, cls: '')
|
= small_img(screenshots_visible_to_user(pkg, session).first, cls: '')
|
||||||
.text.pkgname
|
|
||||||
= pkg.name
|
|
||||||
.text
|
|
||||||
= pkg.description
|
|
||||||
|
|
@ -8,14 +8,14 @@
|
||||||
// Search form
|
// Search form
|
||||||
= render 'packages/searchfield'
|
= render 'packages/searchfield'
|
||||||
|
|
||||||
// Grid view
|
// Grid view of packages
|
||||||
.grid-x
|
.grid-x
|
||||||
.small-9.large-10.cell
|
.small-9.large-10.cell
|
||||||
- if @packages.length>0
|
- if @packages.length>0
|
||||||
.grid-x.grid-margin-x.small-up-1.medium-up-2.large-up-3 data-equalizer=true data-equalize-on="medium"
|
.grid-x.grid-margin-x.small-up-1.medium-up-2.large-up-3 data-equalizer=true data-equalize-on="medium"
|
||||||
- @packages.all.each do |pkg|
|
- @packages.all.each do |pkg|
|
||||||
.cell.pkgcard data-equalizer-watch=true
|
.cell.pkgcard data-equalizer-watch=true
|
||||||
= render partial: 'packages/grid_thumbnail', locals: { pkg: pkg }
|
= render partial: 'packages/grid_small_image', locals: { pkg: pkg }
|
||||||
|
|
||||||
- else
|
- else
|
||||||
= render 'packages/noresults'
|
= render 'packages/noresults'
|
||||||
|
|
|
||||||
|
|
@ -8,24 +8,14 @@
|
||||||
// Search form
|
// Search form
|
||||||
= render 'packages/searchfield'
|
= render 'packages/searchfield'
|
||||||
|
|
||||||
// Package list
|
// List view of packages
|
||||||
.grid-x.packagepage
|
.grid-x
|
||||||
.small-9.medium-10.cell
|
.small-9.medium-10.cell
|
||||||
- if @packages.length>0
|
- if @packages.length>0
|
||||||
- @packages.to_a.each do |pkg|
|
- @packages.to_a.each do |pkg|
|
||||||
.grid-x.listview
|
.grid-x.listview
|
||||||
.small-12.medium-4.cell
|
.small-12.medium-4.cell.pkgcard
|
||||||
- if pkg.screenshots_approved.any?
|
= render partial: 'packages/grid_small_image', locals: { pkg: pkg }
|
||||||
// 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-8.cell
|
.small-12.medium-8.cell
|
||||||
h1
|
h1
|
||||||
a href=package_path(name: pkg.name)
|
a href=package_path(name: pkg.name)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue