notFound.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. const html = require('choo/html');
  2. const assets = require('../../common/assets');
  3. const modal = require('./modal');
  4. module.exports = function(state, emit) {
  5. const btnText = state.user.loggedIn ? 'okButton' : 'sendYourFilesLink';
  6. return html`
  7. <main class="main">
  8. ${state.modal && modal(state, emit)}
  9. <section
  10. class="flex flex-col items-center justify-center h-full w-full p-6 md:p-8 overflow-hidden md:rounded-xl md:shadow-big"
  11. >
  12. <h1 class="text-center text-3xl font-bold my-2">
  13. ${state.translate('expiredTitle')}
  14. </h1>
  15. <svg class="text-primary my-12">
  16. <use xlink:href="${assets.get('notFound.svg')}#svg124" />
  17. </svg>
  18. <p
  19. class="max-w-md text-center text-grey-80 leading-normal dark:text-grey-40 ${state
  20. .user.loggedIn
  21. ? 'hidden'
  22. : ''}"
  23. >
  24. ${state.translate('trySendDescription')}
  25. </p>
  26. <p class="my-5">
  27. <a href="/" class="btn rounded-lg flex items-center" role="button"
  28. >${state.translate(btnText)}</a
  29. >
  30. </p>
  31. </section>
  32. </main>
  33. `;
  34. };