Moved from Fancybox to Photoswipe for click-to-zoom
This commit is contained in:
parent
aaf1eb34c4
commit
9164e2a636
10 changed files with 3178 additions and 28 deletions
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
- if @screenshots.any?
|
||||
= render(partial: 'packages/paginator', locals: {items: @screenshots})
|
||||
.grid-x.grid-margin-x.medium-up-1.large-up-2 data-equalizer=true data-equalize-on="medium"
|
||||
#gallery.grid-x.grid-margin-x.medium-up-1.large-up-2 data-equalizer=true data-equalize-on="medium"
|
||||
- @screenshots.each do |screenshot|
|
||||
- @divclasses = %W(cell pkgcard)
|
||||
- @divclasses << (screenshot.approved ? "approved" : "unapproved")
|
||||
|
|
@ -22,7 +22,12 @@
|
|||
div class=(@divclasses.join(' ')) data-equalizer-watch=true
|
||||
/ TODO: try to align the buttons to the bottom
|
||||
= render(partial: 'admin_buttons', locals: {screenshot: screenshot})
|
||||
a.black href =url_for(screenshot.simage_url(:large)) rel='fancybox-thumb' title=screenshot.caption data-fancybox='gallery' data-caption=screenshot_caption(screenshot)
|
||||
/ Photoswipe needs to know the dimensions of the full-size image to zoom to
|
||||
a.foobar.black [
|
||||
href=url_for(screenshot.simage_url(:large))
|
||||
data-pswp-width=screenshot.simage.width
|
||||
data-pswp-height=screenshot.simage.height
|
||||
]
|
||||
.image.image-with-zoom-icon
|
||||
= small_img(screenshot, cls: '')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue