Open krodelabestiole opened 6 years ago
Hi, the jQuery lib is indeed hardcoded. I coipied the jquery.min.js
from the original theme. I can update the jQuery lib that is provided with the theme. I am not sure though if it solves your problem.
If you want to resolve your problem fast, then just create a copy of the theme and remove the following line:
https://github.com/Aisbergg/grav-theme-introspect/blob/785d7965bcb69965c2929d3216deda9a6ec7f8bf/templates/partials/base.html.twig#L21
A nice feature of grav is also the recursive themes, where you can create a custom theme above an existing one. There you would just replace or extent existing files of a theme and would still be able to get updates for the ground theme.
sorry, I wasn't expecting such a quick answer so I have switched to the default theme that I have customized. Thanks a lot about this tip with "recursive" themes, I didn't knew about that, here is the doc : https://getgrav.org/blog/theme-development-with-inheritance
I don't know why unite-gallery works with Quark and not Introspect... here is what they use :
{% block javascripts %}
{% do assets.addJs('jquery', 101) %}
{% do assets.addJs('theme://js/jquery.treemenu.js', {group:'bottom'}) %}
{% do assets.addJs('theme://js/site.js', {group:'bottom'}) %}
{% endblock %}
{{ assets.js() }}
However the final HTML loads jQuery 2 :
<script src="/system/assets/jquery/jquery-2.x.min.js" ></script>
jQuery 2 is passed by default as a collection in the asset management in the admin panel (I don't know if this behavior is due to the admin plugin, the unite-gallery install or what, but here it is). Maybe you should ensure that these assets are loaded with Introspect...
Anyway thanks again, feel free to fix or not and close this issue however you want.
hi i'm trying to use the unite -gallery plugin with your theme.
but i run into an issue :
Uncaught ReferenceError: jQuery is not defined
I'm loading jQuery 2.x with the asset manager : https://learn.getgrav.org/themes/asset-manager but it doesn't seem to load in your theme which just loads jQuery v1.11.3 (I guess this might be hard coded in the html itself ?)