source: KernelRecordsMVC.Web/Views/Account/Login.cshtml

main
Last change on this file was d89d25b, checked in by mmilevski <markomilevski3@…>, 4 weeks ago

Added few implementaions, minor UI changes.

  • Property mode set to 100644
File size: 4.6 KB
RevLine 
[08aefc6]1@model KernelRecordsMVC.Application.ViewModels.LoginViewModel
2
[d89d25b]3@{
4 ViewData["Title"] = "Login";
5}
[08aefc6]6
[d89d25b]7<div class="auth-page">
[08aefc6]8
[d89d25b]9 <div class="auth-shell">
[08aefc6]10
[d89d25b]11 <div class="auth-brand-panel">
[08aefc6]12
[d89d25b]13 <a asp-controller="Home"
14 asp-action="Index"
15 class="auth-logo-link">
[08aefc6]16
[d89d25b]17 <img src="~/images/logo.png"
18 asp-append-version="true"
19 alt="Kernel Records"
20 class="auth-logo" />
[08aefc6]21
[d89d25b]22 </a>
[08aefc6]23
[d89d25b]24 <div class="auth-brand-copy">
[08aefc6]25
[d89d25b]26 <span class="auth-eyebrow">
27 KERNEL RECORDS
28 </span>
[08aefc6]29
[d89d25b]30 <h1>
31 Welcome back.
32 </h1>
[08aefc6]33
[d89d25b]34 <p>
35 Sign in to manage your wishlist,
36 orders and record collection.
37 </p>
[08aefc6]38
[d89d25b]39 </div>
[08aefc6]40
[d89d25b]41 </div>
[08aefc6]42
43
[d89d25b]44 <div class="auth-form-panel">
45
46 <div class="auth-form-header">
47
48 <span class="auth-eyebrow">
49 ACCOUNT
50 </span>
51
52 <h2>Login</h2>
53
54 <p>
55 Enter your account details below.
56 </p>
57
58 </div>
59
60
61 <form asp-action="Login"
62 method="post"
63 class="auth-form">
64
65 @Html.AntiForgeryToken()
66
67
68 <div asp-validation-summary="ModelOnly"
69 class="auth-validation-summary">
70 </div>
71
72
73 <!-- USERNAME -->
74
75 <div class="auth-field">
76
77 <label asp-for="Username">
78 Username
79 </label>
80
81 <input asp-for="Username"
82 autocomplete="username"
83 placeholder="Enter your username" />
84
85 <span asp-validation-for="Username"
86 class="auth-field-error">
87 </span>
[08aefc6]88
[d89d25b]89 </div>
[08aefc6]90
91
[d89d25b]92 <!-- PASSWORD -->
[08aefc6]93
[d89d25b]94 <div class="auth-field">
[08aefc6]95
[d89d25b]96 <label asp-for="Password">
97 Password
98 </label>
[08aefc6]99
[d89d25b]100 <div class="auth-password-field">
[08aefc6]101
[d89d25b]102 <input asp-for="Password"
103 autocomplete="current-password"
104 placeholder="Enter your password"
105 id="loginPassword" />
[08aefc6]106
[d89d25b]107 <button type="button"
108 class="auth-password-toggle"
109 data-password-toggle="loginPassword"
110 aria-label="Show password">
111
112 Show
113
114 </button>
115
116 </div>
117
118 <span asp-validation-for="Password"
119 class="auth-field-error">
120 </span>
121
122 </div>
123
124
125 <button type="submit"
126 class="auth-submit">
127
128 Login
129
130 </button>
131
132 </form>
133
134
135 <div class="auth-switch">
136
137 <span>
138 Don't have an account?
139 </span>
140
141 <a asp-action="Register">
142 Create account →
143 </a>
144
145 </div>
146
147 </div>
148
149 </div>
[08aefc6]150
151</div>
152
[d89d25b]153
[08aefc6]154@section Scripts
155{
[d89d25b]156 <partial name="_ValidationScriptsPartial" />
157
158 <script>
159
160 document
161 .querySelectorAll("[data-password-toggle]")
162 .forEach(function (button)
163 {
164 button.addEventListener(
165 "click",
166 function ()
167 {
168 const input =
169 document.getElementById(
170 button.dataset.passwordToggle);
171
172
173 if (input.type === "password")
174 {
175 input.type = "text";
176 button.textContent = "Hide";
177 button.setAttribute(
178 "aria-label",
179 "Hide password");
180 }
181 else
182 {
183 input.type = "password";
184 button.textContent = "Show";
185 button.setAttribute(
186 "aria-label",
187 "Show password");
188 }
189 });
190 });
191
192 </script>
[08aefc6]193}
Note: See TracBrowser for help on using the repository browser.