lightbox icon indicating copy to clipboard operation
lightbox copied to clipboard

Thumbnail support for image gallery

Open Siim opened this issue 9 years ago • 3 comments

Displays image thumbnails in a lightbox window. Example included and documentation updated for this feature.

Siim avatar Nov 17 '15 16:11 Siim

In the example, you have used the same gallery name multiimages which already exists on the page. If you rename it - which you should as it's a separate gallery - the previews fail. This is because the gallery specifically looks for data-toggle="lightbox" when looking for @gallery_items.

See: https://github.com/ashleydw/lightbox/blob/master/ekko-lightbox.coffee#L78

I would rename the option to something smaller like thumbnail or preview and then you can allow the user to set the option via a data attribute - this would remove the need for the lightbox-preview toggle.

How about moving the thumbnails to the bottom? When viewing a wide but short image, it looks a bit messy:

image

Could you also add a YouTube and Vimeo video to the example documentation so we can see how the previews work?

ashleydw avatar Nov 19 '15 09:11 ashleydw

Hi! I made the changes you suggested:

  • added preview option via data attribute
  • Moved preview area to the bottom of the lightbox window

Edit: Added youtube example

Siim avatar Nov 19 '15 10:11 Siim

Great! If you squash your commits, I'll merge it in and get a new version going

ashleydw avatar Nov 22 '15 09:11 ashleydw