Moved from Fancybox to Photoswipe for click-to-zoom

This commit is contained in:
Christoph Haas 2025-05-08 01:10:03 +02:00
parent aaf1eb34c4
commit 9164e2a636
10 changed files with 3178 additions and 28 deletions

View file

@ -33,19 +33,3 @@ html
= yield
= render 'layouts/footer'
// Load Javascript libraries
/ javascript:
/ $(".fancybox").fancybox({
/ prevEffect : 'none',
/ nextEffect : 'none',
/ helpers : {
/ title : {
/ type: 'outside'
/ },
/ thumbs : {
/ width : 50,
/ height : 50
/ }
/ }
/ });

View file

@ -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: '')

View file

@ -276,11 +276,20 @@
ul
li A custom made web application called <em>debshots</em>
li Ruby-on-Rails
li Shrine for file management
li PostgreSQL to store metadata
li The Zurb Foundation web toolkit
li
a href="https://rubyonrails.org/" Ruby-on-Rails
li
a href="https://shrinerb.com/" Shrine for file management
li
a href="https://www.postgresql.org/" PostgreSQL to store metadata
li
a href="https://get.foundation/" The Zurb Foundation web toolkit
li Icons from Font Awesome
li Nginx as a caching reverse proxy
li Debian as an operating system to run everything on
li Dokku to make the deployment painless
li
a href="https://nginx.org/" Nginx as a caching reverse proxy
li
a href="https://www.debian.org/" Debian as an operating system to run everything on
li
a href="https://dokku.com/" Dokku to make the deployment painless
li
a href="https://photoswipe.com/" Photoswipe for the click-to-zoom on images