grav-theme-learn2
grav-theme-learn2 copied to clipboard
Featherlight plugin - gallery not working
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.