grav-theme-learn2 icon indicating copy to clipboard operation
grav-theme-learn2 copied to clipboard

Featherlight plugin - gallery not working

Open JHG-media opened this issue 1 year ago • 0 comments

Since learn2 adds featherlight as standard asset and adds some featherlight related code in the learn.js file, the gallery activated in the plugin settings breaks/does not work and the featherlight scripts are loaded multiple times.

Remove this from learn.js

$(function() {
    $('a[rel="lightbox"]').featherlight({
        root: 'section#body'
    });
});

And kill

{% do assets.addJs('theme://js/featherlight.min.js') %}
{% do assets.addCss('theme://css/featherlight.min.css') %}

from base.html.twig.

After this, i successfully set up a featherlight gallery.

JHG-media avatar May 24 '23 22:05 JHG-media