oupala / apaxy

a simple, customisable theme for your apache directory listing
https://oupala.github.io/apaxy/
GNU General Public License v3.0
1.86k stars 256 forks source link

featherlight as lightbox gallery #120

Closed mathetos closed 5 years ago

mathetos commented 5 years ago

Is your feature request related to a problem? Please describe. A lightbox gallery makes a lot of sense. Similarly to #89 but I prefer the style of featherlight to lightGallery.

Describe the solution you'd like Here's the code I use in my header.html:

<link href="//cdn.rawgit.com/noelboss/featherlight/1.7.13/release/featherlight.min.css" type="text/css" rel="stylesheet" />
<link href="//cdn.rawgit.com/noelboss/featherlight/1.7.13/release/featherlight.gallery.min.css" type="text/css" rel="stylesheet" />

<script src="//code.jquery.com/jquery-latest.js"></script>
<script src="//cdn.rawgit.com/noelboss/featherlight/1.7.13/release/featherlight.min.js" type="text/javascript" charset="utf-8"></script>
<script src="//cdn.rawgit.com/noelboss/featherlight/1.7.13/release/featherlight.gallery.min.js" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript">
    jQuery(document).ready(function ($) {
        $('td.indexcolname a[href$=".png"]').featherlightGallery({
            previousIcon: '&#9664;',     /* Code that is used as previous icon */
            nextIcon: '&#9654;',         /* Code that is used as next icon */
            galleryFadeIn: 100,          /* fadeIn speed when slide is loaded */
            galleryFadeOut: 300          /* fadeOut speed before slide is loaded */
        });
    });
</script>
<div class="wrapper">
    <ol class="breadcrumb" id="breadcrumbs">
    </ol>
<!-- we open the `wrapper` element here, but close it in the `footer.html` file -->

Describe alternatives you've considered

89 works fine, but I like this better.

Additional context I agree with many other users that this project should have a way to submit modules/plugins whatever you want to call it to extend it in simple ways like this.

Thanks!

oupala commented 5 years ago

Thanks for this contribution @mathetos. Can you please create a pull request with your changes so that we have a working prototype to test?

oupala commented 5 years ago

See branch feature/featherlight in this repo.

oupala commented 5 years ago

Now that there is a branch to explore featherlight, let's close this issue.

oupala commented 5 years ago

featherlight will not be merged to apaxy as we prefer to use lightgallery.js.

lightgallery.js is indeed more powerful (plugins, download link, ...) and does not require jQuery.