Closed Serge-kab closed 2 years ago
Usually, such problems are caused by other plugins or themes.
Could you try setting the default theme and disabling other plugins one by one to isolate the problem?
Hi @sal0max !
I just solved my issue which appeared to be caused by the way I handled javascript in the base template. I corrected it that way :
`{% block javascript %} {% do assets.addJs('theme://js/jquery.min.js', {group: 'bottom'}) %} {% do assets.addJs('theme://js/jquery.scrolly.min.js', {group: 'bottom'}) %} {% do assets.addJs('theme://js/jquery.scrollex.min.js', {group: 'bottom'}) %} {% do assets.addJs('theme://js/jquery.dropotron.min.js', {group: 'bottom'}) %} {% do assets.addJs('theme://js/browser.min.js', {group: 'bottom'}) %} {% do assets.addJs('theme://js/breakpoints.min.js', {group: 'bottom'}) %} {% do assets.addJs('theme://js/util.js',{group: 'bottom'}) %} {% do assets.addJs('theme://js/main.js', {group: 'bottom'}) %} {% do assets.addJs('theme://js/custom.js',{group: 'bottom'}) %}
{% endblock %}
{% block assets deferred %} {{ assets.js()|raw}} {{ assets.css()|raw }}
{% endblock %}`
And at the bottom :
{% block bottom %} {{ assets.js('bottom')|raw }} {% endblock %}
I'm still struggling a lot with Twig, especially dealing with assets.
I found that solution on the grav discord server.
Great you found a solution and thanks for the heads up.
Hi @sal0max !
I just solved my issue which appeared to be caused by the way I handled javascript in the base template. I corrected it that way :
`{% block javascript %} {% do assets.addJs('theme://js/jquery.min.js', {group: 'bottom'}) %} {% do assets.addJs('theme://js/jquery.scrolly.min.js', {group: 'bottom'}) %} {% do assets.addJs('theme://js/jquery.scrollex.min.js', {group: 'bottom'}) %} {% do assets.addJs('theme://js/jquery.dropotron.min.js', {group: 'bottom'}) %} {% do assets.addJs('theme://js/browser.min.js', {group: 'bottom'}) %} {% do assets.addJs('theme://js/breakpoints.min.js', {group: 'bottom'}) %} {% do assets.addJs('theme://js/util.js',{group: 'bottom'}) %} {% do assets.addJs('theme://js/main.js', {group: 'bottom'}) %} {% do assets.addJs('theme://js/custom.js',{group: 'bottom'}) %}
{% endblock %}
{% block assets deferred %} {{ assets.js()|raw}} {{ assets.css()|raw }}
{% endblock %}`
And at the bottom :
{% block bottom %} {{ assets.js('bottom')|raw }} {% endblock %}
I'm still struggling a lot with Twig, especially dealing with assets.
I found that solution on the grav discord server.
Would you be able to post your full base.html.twig? I'm struggling with exactly the same issue, but I can't seem to quite get the twig right!
Edit:
Digging further, I think the theme I'm using just doesn't include some of these js files. In addition to that, I note that my gallery++ folder (when installed via the Admin panel) does not include the ./vendor folder (or its contents).
@sal0max Is this expected behaviour?
If anyone knows where I can get the relevant .js files I'd appreciate it as the current default theme (quark) doesn't seem to include them.
Hi ! Thanks for the great work.
I'm having the following issue : while the gallery seems to be working good, the lightbox effect doesn't work. Instead of having the full-screen popup with the navigation arrows, it just go the url of the image, displaying it in my browser without any effect or navigation option. Naturally, if i try to change some of the lightbox options in the admin panel, nothing happens on the frontend.
Can you help me with that ? Thank you so much !