dynamic / silverstripe-elemental-gallery

A block to display a collection of images
BSD 3-Clause "New" or "Revised" License
2 stars 7 forks source link

FEATURE BS5-Lightbox in default template #30

Open jsirish opened 1 year ago

jsirish commented 1 year ago

Since Bootstrap doesn't have anything fancy for a gallery overlay, I'd like to implement the bs5-lightbox library into the default template:

https://trvswgnr.github.io/bs5-lightbox/

It requires Bootstrap 5 to run, and it leverages the Modal and Carousel classes. It plays nicely with our webpack setup as well. And the template HTML will be much less then what's in there currently, which will make it easier to maintain.

jsirish commented 1 year ago

There's also awesome mixed-media implementations that I'd like to explore for other blocks, or a Media Gallery block.

felixbec commented 1 year ago

After further investigation, it looks like that package hasn't been updated to work with BS 5.3 and up. I will look into other packages to see what's out there.

jsirish commented 1 year ago

Ah that makes sense, I was shocked I wasn't able to get it to work

felixbec commented 1 year ago

@jsirish https://github.com/dynamic/silverstripe-elemental-gallery/tree/feature/2023-10-26_bootstrap-modal-adjustments

I adjusted the template a bit to mimic the lightbox look/feel utilizing the default BS classes. Let me know what you think and I can create a PR