footer-scripts.html 847 B

1234567891011121314151617181920212223242526272829303132
  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 page.ext-js %}
  21. {% for js in page.ext-js %}
  22. {% include ext-js.html js=js %}
  23. {% endfor %}
  24. {% endif %}
  25. {% if page.js %}
  26. {% for js in page.js %}
  27. <script src="{{ js | relative_url }}"></script>
  28. {% endfor %}
  29. {% endif %}