verify.ejs 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta content="width=device-width, initial-scale=1" name="viewport"/>
  6. <title>The Subline</title>
  7. <link rel="icon" type="img/png" href="/shared/images/logo.png">
  8. <link rel="stylesheet" href="/verifyPage/style.css">
  9. <link href="https://fonts.googleapis.com/css?family=Saira&display=swap" rel="stylesheet">
  10. </head>
  11. <body>
  12. <%- include("../shared/banner.ejs") %>
  13. <form action="/verify/resend" method="post">
  14. <h3>An email has been sent to <%=email%>. Use the link in the email to verify your account.</h3>
  15. <h3>If you didnt recieve an email or need to change your email address, enter it below and click submit.</h3>
  16. <input name="email" type="email" placeholder="EMAIL" required>
  17. <input name="id" type="hidden" value="<%=id%>">
  18. <input type="submit" value="SUBMIT">
  19. </form>
  20. <script>
  21. let locals = <%- JSON.stringify(locals) %>
  22. if(locals.banner !== undefined){
  23. let bannerElem = document.getElementById("banner");
  24. bannerElem.children[0].style.background = locals.banner.color;
  25. bannerElem.children[1].innerText = locals.banner.message;
  26. bannerElem.style.display = "flex";
  27. switch(banner.type){
  28. case "error":
  29. bannerElem.children[0].innerHTML = `
  30. <svg width="50" height="50" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  31. <circle cx="12" cy="12" r="10"></circle>
  32. <line x1="15" y1="9" x2="9" y2="15"></line>
  33. <line x1="9" y1="9" x2="15" y2="15"></line>
  34. </svg>
  35. `;
  36. break;
  37. case "success":
  38. bannerElem.children[0].innerHTML = `
  39. <svg width="50" height="50" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  40. <circle cx="12" cy="12" r="10"></circle>
  41. <line x1="12" y1="8" x2="12" y2="12"></line>
  42. <line x1="12" y1="16" x2="12.01" y2="16"></line>
  43. </svg>
  44. `;
  45. break;
  46. default:
  47. bannerElem.children[0].innerHTML = `
  48. <svg width="50" height="50" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  49. <path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path>
  50. <polyline points="22 4 12 14.01 9 11.01"></polyline>
  51. </svg>
  52. `;
  53. }
  54. let timer = setTimeout(()=>{
  55. bannerElem.style.display = "none"
  56. }, 7000);
  57. bannerElem.children[2].onclick = ()=>{
  58. bannerElem.style.display = "none";
  59. clearTimeout(timer);
  60. }
  61. }
  62. </script>
  63. </body>
  64. </html>