Skip to content
This repository has been archived by the owner on May 22, 2020. It is now read-only.

Thumbnail support for image gallery #146

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

Siim
Copy link

@Siim Siim commented Nov 17, 2015

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

@ashleydw
Copy link
Owner

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?

@Siim
Copy link
Author

Siim commented Nov 19, 2015

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

@ashleydw
Copy link
Owner

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

nunomira and others added 3 commits November 23, 2015 11:14
…mage is not the first one to be clicked

Add preview/thumbnail support for image gallery. Displays thumbs in a lightbox window.

Handle preview for videos

Handle preview for videos. Update docs

Build

Preview option via data attribute. Move preview area to the bottom of the lightbox window
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants