_TermResultHistoryV2.cshtml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. @model LotteryWebApp.Models.TermResultHistoryModel
  2. @using LotteryWebApp.Languages
  3. @if (Model != null && Model.listTerm != null && Model.listTerm.Count > 0)
  4. {
  5. foreach (var item in Model.listTerm)
  6. {
  7. if (string.Equals(item.result, "NA", StringComparison.OrdinalIgnoreCase)) continue;
  8. var gameColor = item.gameId == "30" ? "#0062FF" : item.gameId == "31" ? "#26A31E" : item.gameId == "32" ? "#B529E9" : "#0062FF";
  9. var gameGradient = item.gameId == "30" ? "linear-gradient(135deg, #FF3D63 0%, #E3132D 60%, #BA0F21 100%)" :
  10. item.gameId == "31" ? "linear-gradient(135deg, #4ADE80 0%, #26A31E 100%)" :
  11. item.gameId == "32" ? "linear-gradient(135deg, #C084FC 0%, #B529E9 100%)" :
  12. "linear-gradient(135deg, #FF3D63 0%, #BA0F21 100%)";
  13. <!-- Result Item Card -->
  14. <div class="result-item-red animate__animated animate__fadeInUp relative overflow-hidden" style="border-color: @gameColor">
  15. <!-- Game Label Badge -->
  16. <div class="absolute top-2 right-4 px-2 py-0.5 rounded-full text-[9px] font-black text-white uppercase tracking-tighter z-10 shadow-sm" style="background-color: @gameColor">
  17. @(item.gameId == "30" ? "Basic" : item.gameId == "31" ? "Big/Small" : item.gameId == "32" ? "Odd/Even" : "Mega")
  18. </div>
  19. <div class="item-date-text font-bricolage">
  20. @{
  21. DateTime drawDate;
  22. if (DateTime.TryParse(item.date_random, out drawDate)) {
  23. <div class="day">@drawDate.ToString("dddd,", System.Globalization.CultureInfo.InvariantCulture)</div>
  24. <div class="date">@drawDate.ToString("MMM dd, yyyy", System.Globalization.CultureInfo.InvariantCulture)</div>
  25. } else {
  26. <div class="day">Draw Date:</div>
  27. <div class="date">@item.date_random</div>
  28. }
  29. }
  30. </div>
  31. <div class="balls-container">
  32. @if (!string.IsNullOrEmpty(item.result))
  33. {
  34. var balls = item.result.Split(new[] { ',', ';' }, StringSplitOptions.RemoveEmptyEntries);
  35. foreach (var ball in balls)
  36. {
  37. var cleanBall = ball.Trim();
  38. if (!string.IsNullOrEmpty(cleanBall))
  39. {
  40. <div class="yellow-ball" style="background: @gameGradient">@cleanBall</div>
  41. }
  42. }
  43. }
  44. else
  45. {
  46. <span class="text-gray-400 italic text-[12px]">@Lang.waiting_for_result</span>
  47. }
  48. </div>
  49. </div>
  50. }
  51. }
  52. else
  53. {
  54. <div class="w-full py-20 flex flex-col items-center justify-center text-gray-400 opacity-60">
  55. <i class="fas fa-search text-5xl mb-4"></i>
  56. <p class="font-bold">@Lang.no_results_found</p>
  57. </div>
  58. }