getgrav / getgrav/grav-theme-learn2

Featherlight plugin - gallery not working

Open Beginner friendly
#104 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
SCSS
Stars
79
Forks
40
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Inspect the Featherlight initialization in learn.js and the asset additions in base.html.twig. Remove the duplicated setup described in the issue, then verify that a gallery enabled in the plugin settings works and that Featherlight scripts are not loaded multiple times.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.