Sommerregen / grav-theme-machine

This theme is a Grav port of the Machine HTML Template (http://w3layouts.com/machine-industrial-category-flat-bootstrap-responsive-web-template/) developed by W3Layouts (http://w3layouts.com/).
Other
7 stars 3 forks source link

carousel does not work with Grav 1.6.24 #12

Closed CreasolTech closed 4 years ago

CreasolTech commented 4 years ago

Hi. I have no experience with Grav and html5/js; a friend ask me to check why his Grav website has a problem with "carousel" : he has a catalog with some pictures, but only the first one is shown. http://www.usatoservice.it/catalogo/carrelli/raniero-b40 He believe that the problem occurred since the upgrade to the last Grav. Is it possible? Any suggestion to fix this problem is very very appreciated. Thanks a lot. Paolo

CreasolTech commented 4 years ago

Solved this problem in this way: I've edited the file /user/themes/machine/templates/default.html.twig and remove the integrity check from line https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js

This is the patch from original file and the working file.

--- default.html.twig_original  2020-05-06 22:43:27.919273556 +0200
+++ default.html.twig   2020-05-06 22:48:26.949809041 +0200
@@ -5,7 +5,7 @@
            {{ assets.css()|raw }}
            {{ assets.js()|raw }}
        {% do assets.add('theme://assets/js/jquery.min.js',{'priority':100}) %}
-      {% do assets.add('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js',{'priority':100,'integrity':'sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u','crossorigin':'anonymous'}) %}
+      {% do assets.add('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js',{'priority':100}) %}
       {{ assets.js() }}
     {% endblock %}
     {% block head %}