Login.cshtml 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. @using LotteryV2.Web.Language
  2. @{
  3. Layout = null;
  4. }
  5. <!DOCTYPE html>
  6. <html lang="en">
  7. <head>
  8. <meta charset="UTF-8">
  9. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10. <title>Login - Mega Loto</title>
  11. <script src="https://cdn.tailwindcss.com"></script>
  12. <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap" rel="stylesheet">
  13. <link rel="stylesheet" href="~/css/flash_view.css" />
  14. <style>
  15. body { font-family: 'Inter', sans-serif; }
  16. </style>
  17. </head>
  18. <body class="bg-gray-100 flex justify-center items-center h-screen">
  19. <!-- Full Height Responsive Frame -->
  20. <div class="relative w-full h-screen max-w-[450px] bg-[#EE0033] sm:shadow-2xl sm:rounded-2xl overflow-hidden flex flex-col items-center">
  21. <!-- 1. LOGO SECTION (Y: 15px) -->
  22. <div class="absolute top-[15px] left-[55px] w-[283px] h-[137px] flex justify-center">
  23. <img src="~/images/logo.png" alt="MEGA LOTO Logo" class="w-full h-full object-contain">
  24. </div>
  25. <!-- 2. LOGIN FORM SECTION (Y: 180px) -->
  26. <div class="absolute top-[180px] w-full px-[35px] flex flex-col space-y-[20px] z-20">
  27. <!-- Phone Input with Prefix -->
  28. <div class="flex items-center bg-white border border-black rounded-[12px] h-[44px] overflow-hidden">
  29. <!-- Country Code -->
  30. <div class="flex items-center justify-center bg-[#DCDCDC] text-black font-semibold text-[18px] px-3 h-full">
  31. +509
  32. </div>
  33. <!-- Number Input -->
  34. <input type="tel" class="flex-1 px-4 text-black text-[18px] font-semibold outline-none placeholder-gray-400" placeholder="888 999 888" />
  35. </div>
  36. <!-- Get OTP Button -->
  37. <button class="w-full h-[47px] bg-gradient-to-r from-[#EFAD19] to-[#FFF385] border-2 border-white rounded-[12px] text-black font-extrabold text-[20px] shadow-lg flex justify-center items-center active:scale-95 transition-transform">
  38. @Language.ResourceManager.GetString("GetOTP")
  39. </button>
  40. </div>
  41. <!-- 3. DECORATIVE BACKGROUND BALLS (Y: 300px, X: 16px) -->
  42. <div class="absolute top-[300px] left-[16px] w-[352px] h-[345px] z-10 pointer-events-none flex justify-center">
  43. <img src="~/images/login_decorations.png" alt="decorations" class="w-full h-full object-contain">
  44. </div>
  45. <!-- 4. LANGUAGE SWITCHER (Bottom context) -->
  46. <div class="absolute bottom-[40px] flex justify-center items-center space-x-[20px] w-[199px] h-[43px] bg-red-700/80 backdrop-blur-md rounded-[12px] px-[16px] text-white font-semibold text-[15px] z-20">
  47. <button onclick="setLanguage('en')" class="flex items-center space-x-1 cursor-pointer hover:opacity-80 active:scale-95 transition-all">
  48. <span>🏴󠁧󠁢󠁥󠁮󠁧󠁿</span> <span class="text-white">EN</span>
  49. </button>
  50. <div class="w-[1px] h-[16px] bg-white/30"></div>
  51. <button onclick="setLanguage('vi')" class="flex items-center space-x-1 cursor-pointer hover:opacity-80 active:scale-95 transition-all">
  52. <span>🇭🇹</span> <span>HT</span>
  53. </button>
  54. </div>
  55. </div>
  56. <!-- Load jQuery for AJAX -->
  57. <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  58. <!-- AJAX for Language Switching -->
  59. <script>
  60. function setLanguage(culture) {
  61. $.ajax({
  62. url: '/Home/SetLanguage',
  63. type: 'POST',
  64. data: { culture: culture },
  65. success: function (response) {
  66. if (response.success) {
  67. window.location.reload();
  68. }
  69. },
  70. error: function (xhr, status, error) {
  71. console.error('Error setting language:', error);
  72. }
  73. });
  74. }
  75. </script>
  76. </body>
  77. </html>