banner.ejs 1.6 KB

123456789101112131415161718192021222324252627282930
  1. <div id="banner" class="banner">
  2. <div style="background:<%=banner.color%>">
  3. <% if(banner.type === "error"){ %>
  4. <svg width="50" height="50" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  5. <circle cx="12" cy="12" r="10"></circle>
  6. <line x1="15" y1="9" x2="9" y2="15"></line>
  7. <line x1="9" y1="9" x2="15" y2="15"></line>
  8. </svg>
  9. <%}else if(banner.type === "success"){ %>
  10. <svg width="50" height="50" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  11. <circle cx="12" cy="12" r="10"></circle>
  12. <line x1="12" y1="8" x2="12" y2="12"></line>
  13. <line x1="12" y1="16" x2="12.01" y2="16"></line>
  14. </svg>
  15. <%}else { %>
  16. <svg width="50" height="50" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  17. <path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path>
  18. <polyline points="22 4 12 14.01 9 11.01"></polyline>
  19. </svg>
  20. <% } %>
  21. </div>
  22. <p><%=banner.message%></p>
  23. <button>
  24. <svg width="18" height="18" viewBox="0 0 24 24" fill="rgb(200, 0, 0)" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  25. <circle cx="12" cy="12" r="10"></circle>
  26. <line x1="15" y1="9" x2="9" y2="15"></line>
  27. <line x1="9" y1="9" x2="15" y2="15"></line>
  28. </svg>
  29. </button>
  30. </div>