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

Wrapping ekko-lightbox gallery elements #330

Open
sbrbot opened this issue May 16, 2019 · 0 comments
Open

Wrapping ekko-lightbox gallery elements #330

sbrbot opened this issue May 16, 2019 · 0 comments

Comments

@sbrbot
Copy link

sbrbot commented May 16, 2019

In current version of ekko-lightbox elements have to be groupped using data-gallery attribute. There's no wrapper functionality which would be treated as implicit groupping.

For example one can create ekko gallery by groupping elements on the same DOM level using data-gallery="mygallery" attribute. Also one assigns title (data-title) and footer (data-title) attributes to each particular item inside a gallery like:

<a href="image0.jpg" data-toggle="lightbox" data-gallery="myimages" data-title="Hidden image 0">
    <img src="image0.jpg" class="img-fluid">
</a>
<div data-toggle="lightbox" data-gallery="myimages" data-remote="image1.jpg" data-title="Hidden image 1"></div>
<div data-toggle="lightbox" data-gallery="myimages" data-remote="image2.jpg" data-title="Hidden image 2"></div>

I'd like to have ekko-lightbox feature where one would be able to group gallery elements impliciltly with wrapping DIV. Then ekko-lightbox would take title and footer data attributes from group element and show them to all images inside this group (child elements). Only if title and footer element for particular element exist, ekko-lightbox should show them instead of common title and footer attributes.

For example;

<div class="ekko-group" data-toggle="lightbox" data-title="common group title" data-footer="common group footer">
  <a href="image0.jpg">
      <img src="image0.jpg" class="img-fluid">
  </a>
  <div data-remote="image1.jpg"></div>
  <div data-remote="image2.jpg" data-title="particular image title"></div>
</div>

In this case inner elements of ekko-lightbox group belong to one group and one should not reference them with data-gallery attribute. Also all elements inside a group should use common title and footer attributes. Only if particular group element title and/or footer exists, they should be shown.

So i this last example all inner group elements should have the same title "data-title="Hidden image 1", only last one should have "particular image title".

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

No branches or pull requests

1 participant