Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show whole collection in lightbox #17

Open
JOJ0 opened this issue Jul 27, 2022 · 1 comment
Open

Show whole collection in lightbox #17

JOJ0 opened this issue Jul 27, 2022 · 1 comment

Comments

@JOJ0
Copy link
Contributor

JOJ0 commented Jul 27, 2022

Hi, it's not really an issue but rather asking for some advice for an enhancement of wagtail-simple-gallery.

In a picture collection on the web usually a user would expect when clicking on an image they then can swipe (on mobile) or click (on desktop) through the whole collection of available pictures. In case of wagtail-simple-gallery + lightbox, only the currently page of pictures will be available to swipe/click through. I am brainstorming about possibilities to load all pictures into lightbox to make that possible. I'm looking at this right now: https://github.com/feimosi/baguetteBox.js#showindex-gallery

A pragmatical approach would be to load all pictures from the collection, additionally to the paginated ones, into a hidden div (is that even possible?? my css knowledge is so bad ;-)) and then use .run and .show as described in the docs link above.

Do you have any better ideas? Wanna help me brainstorm?

@NaakkaDev
Copy link
Owner

Hmm.. I would only pre-load the next 3-5 images from the current position I think. I don't really have much experience with js gallery plugins though. You can use ajax (js) to append more content into the .gallery element, but I'm not sure if baguetteBox knows about post-page load DOM changes automatically.

I hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants