sachinchoolur / lightgallery.js

Full featured JavaScript image & video gallery. No dependencies
https://sachinchoolur.github.io/lightgallery.js/
Other
5.3k stars 596 forks source link

how to include lightgalley.js on a default apache index page #142

Closed oupala closed 3 years ago

oupala commented 5 years ago

Here is how I managed to include lightgallery on a default apache index page (on which I cannot change anything on the html markup, obviously):

<script type="text/javascript">
var imageSelector = [
    'tr:not(.parent) td.indexcolname a[href$=".png"]',
    'tr:not(.parent) td.indexcolname a[href$=".jpg"]',
    'tr:not(.parent) td.indexcolname a[href$=".jpeg"]',
].join(', ');

lightGallery(document.getElementById('indexlist'), {
    selector: imageSelector,
    mode: 'lg-slide',
    hideBarsDelay: 2000,
    loop: false,
    hideControlOnEnd: true,
    download: true,
    // other options here
});
</script>

Don't forget to add lightgallery css and js files.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. If the issue is still valid for version 2.x, please re-open. Apologize for not responding on time. Thank you for your contributions.