sal0max / grav-plugin-shortcode-gallery-plusplus

A Shortcode extension to add sweet galleries with a lightbox to your Grav website.
MIT License
33 stars 8 forks source link

Shortcode Gallery++ doesn't work with the Gantry 5 Helium theme #1

Closed garned closed 3 years ago

garned commented 3 years ago

Grav v1.7.5, Gantry v5.4.37

It seems like jQuery as well as the plugin specific JS and CSS files aren't being included. I got it working by adding the following into /user/plugins/gantry5/engines/nucleus/templates/page_head.html.twig, which isn't very elegant but the best I could come up with.

 <script src="//code.jquery.com/jquery-3.1.1.min.js" type="text/javascript"></script>
 <script src="http://mysite.com/grav/user/plugins/shortcode-gallery-plusplus/vendor/glightbox/glightbox.min.js" type="text/javascript"></script>
  <script src="http://mysite.comh/grav/user/plugins/shortcode-gallery-plusplus/vendor/justified-gallery/jquery.justifiedGallery.min.js" type="text/javascript"></script>
  <link rel="stylesheet" href="http://mysite.com/grav/user/plugins/shortcode-gallery-plusplus/vendor/glightbox/glightbox.min.css">
  <link rel="stylesheet" href="http://mysite.com/grav/user/plugins/shortcode-gallery-plusplus/vendor/justified-gallery/justifiedGallery.min.css">

right before

{% block head_application -%}
        {{ gantry.styles('head')|join("\n")|raw }}
        {{ gantry.scripts('head')|join("\n")|raw }}
{%- endblock %}

Thank you for your work! Tobias

sal0max commented 3 years ago

Thanks a lot for the bug report!

I indeed missed, that Justified-Gallery depends on jQuery. It is added now in bugfix version 1.0.2

I don't see a problem with the JS and CSS files. Could you test and report, please?

garned commented 3 years ago

Thanks for the quick response and fix! It seems to work fine now without my changes to the twig file.

vparmeland commented 1 year ago

What's the workaround ?

sal0max commented 1 year ago

What's the workaround ?

No workaround needed. Just use the latest version of the plugin.