nicolas-t / Chocolat

Chocolat : the lightbox so cool horses use it :horse:
http://chocolat.insipi.de
GNU General Public License v3.0
1.69k stars 170 forks source link

feature_request(enhancement): thumbnails bar #121

Closed Kristinita closed 4 years ago

Kristinita commented 4 years ago

1. Summary

It would be nice, if Chocolat as its alternatives will have thumbnails bar.

2. Argumentation

2.1. Common cause

Accessibility. Save users time.

2.2. Details

Currently, Chocolat end-user can solely view one image after another. If the gallery of images is large, it can be time-consuming.

If thumbnails bar will implement, end-users can quickly view all gallery.

3. Examples in another libraries

3.1. Fancybox (preferable)

Right-side bar.

Demo:

Fancybox

3.2. lightGallery.js

Demo:

lightGallery.js

4. Note

If this feature will be implemented, it would be nice to make it as a separated plugin, as in lightgallery.js, e.g.:

<script src="https://cdn.jsdelivr.net/npm/chocolat/dist/js/chocolat.min.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/chocolat/dist/js/plugins/chocolat-thumbnail.min.js" defer></script>

In order to reduce the JavaScript size for users who don’t need this feature.

Thanks.

nicolas-t commented 4 years ago

Hello,

I want to keep Chocolat very simple and low level, so I won't implement it directly in the project. But you are right, it can be built as an external plugin, once again it should be easy using Chocolat's API.