activate.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. import downloadPreview from "./download-preview.js"
  2. export default () => {
  3. const selector = "#download-form > *:last-child"
  4. const html = `
  5. <h3>Generate Preview files</h3>
  6. <p>
  7. <button id="download-preview" type="button" class="button size-300">
  8. <span>contract-demo.html</span>
  9. <span class="icon">
  10. <svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg">
  11. <use href="#icon-download"></use>
  12. </svg>
  13. </span>
  14. </button>
  15. </p>
  16. <p>
  17. <button id="download-preview-signed" type="button" class="button size-300">
  18. <span>contract-signed.html</span>
  19. <span class="icon">
  20. <svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg">
  21. <use href="#icon-download"></use>
  22. </svg>
  23. </span>
  24. </button>
  25. </p>`;
  26. document.querySelector(selector).innerHTML += html
  27. downloadPreview("#download-preview")
  28. downloadPreview("#download-preview-signed", true)
  29. }