| 1 | @model StockMaster.ViewModels.LoginViewModel
|
|---|
| 2 |
|
|---|
| 3 | <!DOCTYPE html>
|
|---|
| 4 | <html>
|
|---|
| 5 | <head>
|
|---|
| 6 | <meta charset="utf-8" />
|
|---|
| 7 | <meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|---|
| 8 | <title>Login - Stock Master</title>
|
|---|
| 9 | <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/css/bootstrap.min.css" />
|
|---|
| 10 | <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" />
|
|---|
| 11 | <style>
|
|---|
| 12 | body {
|
|---|
| 13 | background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|---|
| 14 | min-height: 100vh;
|
|---|
| 15 | display: flex;
|
|---|
| 16 | align-items: center;
|
|---|
| 17 | justify-content: center;
|
|---|
| 18 | font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|---|
| 19 | }
|
|---|
| 20 |
|
|---|
| 21 | .login-container {
|
|---|
| 22 | width: 100%;
|
|---|
| 23 | max-width: 450px;
|
|---|
| 24 | padding: 20px;
|
|---|
| 25 | }
|
|---|
| 26 |
|
|---|
| 27 | .login-card {
|
|---|
| 28 | background: white;
|
|---|
| 29 | border-radius: 20px;
|
|---|
| 30 | box-shadow: 0 20px 60px rgba(0,0,0,0.3);
|
|---|
| 31 | overflow: hidden;
|
|---|
| 32 | }
|
|---|
| 33 |
|
|---|
| 34 | .login-header {
|
|---|
| 35 | background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
|
|---|
| 36 | color: white;
|
|---|
| 37 | padding: 2.5rem 2rem;
|
|---|
| 38 | text-align: center;
|
|---|
| 39 | }
|
|---|
| 40 |
|
|---|
| 41 | .login-header h2 {
|
|---|
| 42 | margin: 0;
|
|---|
| 43 | font-weight: 700;
|
|---|
| 44 | font-size: 2rem;
|
|---|
| 45 | }
|
|---|
| 46 |
|
|---|
| 47 | .login-header p {
|
|---|
| 48 | margin: 0.5rem 0 0 0;
|
|---|
| 49 | opacity: 0.9;
|
|---|
| 50 | }
|
|---|
| 51 |
|
|---|
| 52 | .login-body {
|
|---|
| 53 | padding: 2.5rem 2rem;
|
|---|
| 54 | }
|
|---|
| 55 |
|
|---|
| 56 | .form-label {
|
|---|
| 57 | font-weight: 600;
|
|---|
| 58 | color: #334155;
|
|---|
| 59 | margin-bottom: 0.5rem;
|
|---|
| 60 | }
|
|---|
| 61 |
|
|---|
| 62 | .form-control {
|
|---|
| 63 | border: 2px solid #e2e8f0;
|
|---|
| 64 | border-radius: 10px;
|
|---|
| 65 | padding: 0.75rem 1rem;
|
|---|
| 66 | font-size: 1rem;
|
|---|
| 67 | transition: all 0.3s;
|
|---|
| 68 | }
|
|---|
| 69 |
|
|---|
| 70 | .form-control:focus {
|
|---|
| 71 | border-color: #2563eb;
|
|---|
| 72 | box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
|
|---|
| 73 | }
|
|---|
| 74 |
|
|---|
| 75 | .input-group-text {
|
|---|
| 76 | background-color: #f1f5f9;
|
|---|
| 77 | border: 2px solid #e2e8f0;
|
|---|
| 78 | border-right: none;
|
|---|
| 79 | border-radius: 10px 0 0 10px;
|
|---|
| 80 | }
|
|---|
| 81 |
|
|---|
| 82 | .input-group .form-control {
|
|---|
| 83 | border-left: none;
|
|---|
| 84 | border-radius: 0 10px 10px 0;
|
|---|
| 85 | }
|
|---|
| 86 |
|
|---|
| 87 | .btn-login {
|
|---|
| 88 | background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
|
|---|
| 89 | border: none;
|
|---|
| 90 | border-radius: 10px;
|
|---|
| 91 | padding: 0.875rem;
|
|---|
| 92 | font-weight: 600;
|
|---|
| 93 | font-size: 1.1rem;
|
|---|
| 94 | color: white;
|
|---|
| 95 | width: 100%;
|
|---|
| 96 | transition: all 0.3s;
|
|---|
| 97 | }
|
|---|
| 98 |
|
|---|
| 99 | .btn-login:hover {
|
|---|
| 100 | transform: translateY(-2px);
|
|---|
| 101 | box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
|
|---|
| 102 | }
|
|---|
| 103 |
|
|---|
| 104 | .text-danger {
|
|---|
| 105 | font-size: 0.875rem;
|
|---|
| 106 | margin-top: 0.25rem;
|
|---|
| 107 | }
|
|---|
| 108 |
|
|---|
| 109 | .icon-wrapper {
|
|---|
| 110 | width: 60px;
|
|---|
| 111 | height: 60px;
|
|---|
| 112 | background: rgba(255,255,255,0.2);
|
|---|
| 113 | border-radius: 50%;
|
|---|
| 114 | display: flex;
|
|---|
| 115 | align-items: center;
|
|---|
| 116 | justify-content: center;
|
|---|
| 117 | margin: 0 auto 1rem;
|
|---|
| 118 | font-size: 2rem;
|
|---|
| 119 | }
|
|---|
| 120 | </style>
|
|---|
| 121 | </head>
|
|---|
| 122 | <body>
|
|---|
| 123 | <div class="login-container">
|
|---|
| 124 | <div class="login-card">
|
|---|
| 125 | <div class="login-header">
|
|---|
| 126 | <div class="icon-wrapper">
|
|---|
| 127 | <i class="fas fa-boxes"></i>
|
|---|
| 128 | </div>
|
|---|
| 129 | <h2>Stock Master</h2>
|
|---|
| 130 | <p>Inventory Management System</p>
|
|---|
| 131 | </div>
|
|---|
| 132 | <div class="login-body">
|
|---|
| 133 | <form asp-action="Login" asp-controller="Account" method="post">
|
|---|
| 134 | <div class="mb-3">
|
|---|
| 135 | <label asp-for="Username" class="form-label">Username</label>
|
|---|
| 136 | <div class="input-group">
|
|---|
| 137 | <span class="input-group-text">
|
|---|
| 138 | <i class="fas fa-user"></i>
|
|---|
| 139 | </span>
|
|---|
| 140 | <input asp-for="Username" class="form-control" placeholder="Enter your username" />
|
|---|
| 141 | </div>
|
|---|
| 142 | <span asp-validation-for="Username" class="text-danger"></span>
|
|---|
| 143 | </div>
|
|---|
| 144 |
|
|---|
| 145 | <div class="mb-4">
|
|---|
| 146 | <label asp-for="Password" class="form-label">Password</label>
|
|---|
| 147 | <div class="input-group">
|
|---|
| 148 | <span class="input-group-text">
|
|---|
| 149 | <i class="fas fa-lock"></i>
|
|---|
| 150 | </span>
|
|---|
| 151 | <input asp-for="Password" class="form-control" placeholder="Enter your password" />
|
|---|
| 152 | </div>
|
|---|
| 153 | <span asp-validation-for="Password" class="text-danger"></span>
|
|---|
| 154 | </div>
|
|---|
| 155 |
|
|---|
| 156 | @if (ViewData.ModelState.ErrorCount > 0 && !ViewData.ModelState.ContainsKey("Username") && !ViewData.ModelState.ContainsKey("Password"))
|
|---|
| 157 | {
|
|---|
| 158 | <div class="alert alert-danger">
|
|---|
| 159 | <i class="fas fa-exclamation-triangle"></i>
|
|---|
| 160 | @Html.ValidationSummary(false, "", new { @class = "mb-0" })
|
|---|
| 161 | </div>
|
|---|
| 162 | }
|
|---|
| 163 |
|
|---|
| 164 | <button type="submit" class="btn btn-login">
|
|---|
| 165 | <i class="fas fa-sign-in-alt me-2"></i> Login
|
|---|
| 166 | </button>
|
|---|
| 167 | </form>
|
|---|
| 168 |
|
|---|
| 169 | <div class="mt-4 text-center text-muted">
|
|---|
| 170 |
|
|---|
| 171 | </div>
|
|---|
| 172 | </div>
|
|---|
| 173 | </div>
|
|---|
| 174 | </div>
|
|---|
| 175 | </body>
|
|---|
| 176 | </html> |
|---|