error.js 1.1 KB

123456789101112131415161718192021222324252627282930313233
  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('errorPageHeader')}
  14. </h1>
  15. <img class="my-12 h-48" src="${assets.get('error.svg')}" />
  16. <p
  17. class="max-w-md text-center text-grey-80 leading-normal dark:text-grey-40 ${state
  18. .user.loggedIn
  19. ? 'hidden'
  20. : ''}"
  21. >
  22. ${state.translate('trySendDescription')}
  23. </p>
  24. <p class="my-5">
  25. <a href="/" class="btn rounded-lg flex items-center" role="button"
  26. >${state.translate(btnText)}</a
  27. >
  28. </p>
  29. </section>
  30. </main>
  31. `;
  32. };