dropzone.html 966 B

1234567891011121314151617181920212223242526
  1. {% assign id = include.id %}
  2. {% assign text = include.text | default: "Text"%}
  3. {% assign description = include.description | default: "Description" %}
  4. <form class="dropzone" id="dropzone-{{ id }}" action="{{ site.base }}/" autocomplete="off" novalidate>
  5. <div class="fallback">
  6. <input name="file" type="file" {% if include.multiple %} multiple {% endif %} />
  7. </div>
  8. {% if include.custom %}
  9. <div class="dz-message">
  10. <h3 class="dropzone-msg-title">{{text}}</h3>
  11. <span class="dropzone-msg-desc">{{description}}</span>
  12. </div>
  13. {% endif %}
  14. </form>
  15. {% capture_global scripts %}
  16. <script>
  17. // @formatter:off
  18. {% if jekyll.environment == 'development' %}window.tabler_dropzone = window.tabler_dropzone || {};{% endif %}
  19. document.addEventListener("DOMContentLoaded", function() {
  20. {% if jekyll.environment == 'development' %}window.tabler_dropzone["dropzone-{{ id }}"] = {% endif %}new Dropzone("#dropzone-{{ id }}")
  21. })
  22. </script>
  23. {% endcapture_global %}