footer-scripts.html 982 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. {% if layout.common-ext-js %}
  2. {% for js in layout.common-ext-js %}
  3. {% include ext-js.html js=js %}
  4. {% endfor %}
  5. {% endif %}
  6. {% if layout.common-js %}
  7. {% for js in layout.common-js %}
  8. <!-- doing something a bit funky here because I want to be careful not to include JQuery twice! -->
  9. {% if js contains 'jquery' %}
  10. <script>
  11. if (typeof jQuery == 'undefined') {
  12. document.write('<script src="{{ js | relative_url }}"></scr' + 'ipt>');
  13. }
  14. </script>
  15. {% else %}
  16. <script src="{{ js | relative_url }}"></script>
  17. {% endif %}
  18. {% endfor %}
  19. {% endif %}
  20. {% if site.site-js %}
  21. {% for js in site.site-js %}
  22. <script src="{{ js | relative_url }}"></script>
  23. {% endfor %}
  24. {% endif %}
  25. {% if page.ext-js %}
  26. {% for js in page.ext-js %}
  27. {% include ext-js.html js=js %}
  28. {% endfor %}
  29. {% endif %}
  30. {% if page.js %}
  31. {% for js in page.js %}
  32. <script src="{{ js | relative_url }}"></script>
  33. {% endfor %}
  34. {% endif %}