You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

HTMLHelper.cs 4.1KB

3 lat temu
3 lat temu
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace Diligent.WebAPI.Business.Helper
  7. {
  8. public static class HTMLHelper
  9. {
  10. public static string RenderForgotPasswordPage(string url)
  11. {
  12. return "<div style=\"font-family: sans-serif\">" +
  13. "<div style=\"font-family: sans-serif;text-align: center;\">" +
  14. "<h2 style=\"color: #017397;\">HR Center Password Reset</h2>" +
  15. "<p style=\"font-size: 20px\">" +
  16. "To reset your HR Center password, please click on the button below." +
  17. "</p>" +
  18. "<a style = \"color: white;text-decoration:none;background-color: #017397;cursor: pointer;font-size: 20px;width: 220px;text-align: center;border-radius: 5px;padding: 5px 15px;height: 25px;\" " +
  19. $"href=\"{url}\">" +
  20. " RESET PASSWORD" +
  21. "</a>" +
  22. "<p style = \"font-size: 12px; margin-top: 25px;\" >" +
  23. "Please do not reply to this email.This message was sent from a notification-only address that is not monitored." +
  24. "</p>" +
  25. "</div>" +
  26. "</div>";
  27. }
  28. public static string RenderRegisterPage(string url)
  29. {
  30. return "<div style=\"font-family: sans-serif\">" +
  31. "<div style=\"font-family: sans-serif;text-align: center;\">" +
  32. "<h2 style=\"color: #017397;\">Welcome to HR Center</h2>" +
  33. "<p style=\"font-size: 20px\">" +
  34. "To register, please click on the button below." +
  35. "</p>" +
  36. "<a style = \"color: white;text-decoration:none;background-color: #017397;cursor: pointer;font-size: 20px;width: 220px;text-align: center;border-radius: 5px;padding: 5px 15px;height: 25px;\" " +
  37. $"href=\"{url}\">" +
  38. " Click here to register" +
  39. "</a>" +
  40. "<p style = \"font-size: 12px; margin-top: 25px;\" >" +
  41. "Please do not reply to this email.This message was sent from a notification-only address that is not monitored." +
  42. "</p>" +
  43. "</div>" +
  44. "</div>";
  45. }
  46. public static string RenderTagPage(string url)
  47. {
  48. return "<div>" +
  49. "<a style = \"color: white;text-decoration:none;background-color: #017397;cursor: pointer;font-size: 20px;border-radius: 5px;padding: 5px 15px;height: 25px;margin-top:10px;\" " +
  50. $"href=\"{url}\">" +
  51. "Click here to see the comment" +
  52. "</a>" +
  53. "</div>";
  54. }
  55. public static string SuccessfulStep(string message, string pattern, string date)
  56. {
  57. return "<div style=\"font-family: sans-serif\">" +
  58. "<div style=\"font-family: sans-serif; text-align: center; \">" +
  59. "<h2 style=\"color: #017397;\">" + pattern + "</h2>" +
  60. "</div>" +
  61. "<div style=\"padding: 0.25rem 2rem 0 2rem\">" +
  62. "<p style=\"color: #017397;\">Poštovani,</p >" +
  63. "</div>" +
  64. "<div style=\"padding: 0 13rem 0 4rem; \">" +
  65. "<p style=\"color: #017397;\">" + message + " " + date + "</p>" +
  66. "</div>" + "<div style=\"padding: 0 2rem; \">" +
  67. "<p style=\"color: #017397;\">Srdačan pozdrav,<br>Diligent HR Team</p>" +
  68. "</div>" +
  69. "</div>";
  70. }
  71. //public static string ScheduleInterview(string pattern, string message)
  72. //{
  73. // Dictionary<string, string> Patterns = new Dictionary<string, string>
  74. // {
  75. // { "Neuspesan korak", $"<div><p>Neuspesan korak: {message}</p></div>" },
  76. // { "Uspesan korak", SuccessfulStep(message, pattern) }
  77. // };
  78. // return Patterns[pattern];
  79. //}
  80. }
  81. }