js.html 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!-- Libs JS -->
  2. {% assign page-libs = page-libs | default: layout.page-libs %}
  3. {% assign google-maps-key = site.google-maps-dev-key %}
  4. {% if env != 'development' %}
  5. {% assign google-maps-key = site.google-maps-key %}
  6. {% endif %}
  7. {% for lib in libs.js %}
  8. {% if page-libs contains lib[0] or libs.global-libs contains lib[0] %}
  9. {% for file in lib[1] %}
  10. <script src="{% if file contains 'http://' or file contains 'https://' %}{{ file | replace: 'GOOGLE_MAPS_KEY', google-maps-key }}{% else %}{{ base }}/assets/libs/{{ file }}{% if env != 'development' %}?{{ site.time | date: '%s' }}{% endif %}{% endif %}" defer></script>
  11. {% endfor %}
  12. {% endif %}
  13. {% endfor %}
  14. <!-- Tabler Core -->
  15. <script src="{{ base }}/dist/js/tabler.bundle{% if env != 'development' %}.min{% endif %}.js{% if env != 'development' %}?{{ site.time | date: '%s' }}{% endif %}" defer></script>
  16. <script src="{{ base }}/dist/js/demo{% if env != 'development' %}.min{% endif %}.js{% if env != 'development' %}?{{ site.time | date: '%s' }}{% endif %}" defer></script>
  17. {% comment %}
  18. {% for script in site.captured_global.scripts %}
  19. {{ script }}
  20. {% endfor %}
  21. {% for script in site.captured_once.scripts %}
  22. {{ script }}
  23. {% endfor %}
  24. {% assign libs = page.libs | default: layout.libs %}
  25. {% for lib in libs.js-files %}
  26. {% if libs contains lib[0] or libs.global-libs contains lib[0] %}
  27. {% for file in lib[1] %}
  28. {% assign filename = 'js/' | append: file | append: '.html' %}
  29. {% include filename %}
  30. {% endfor %}
  31. {% endif %}
  32. {% endfor %}
  33. {% endcomment %}