initial commit
This commit is contained in:
22
YatzyGame/Views/Account/AccessDenied.cshtml
Normal file
22
YatzyGame/Views/Account/AccessDenied.cshtml
Normal file
@@ -0,0 +1,22 @@
|
||||
@{
|
||||
ViewData["Title"] = "Access Denied";
|
||||
}
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2 class="text-center text-danger">🚫 Access Denied</h2>
|
||||
</div>
|
||||
<div class="card-body text-center">
|
||||
<p class="lead">You do not have permission to access this resource.</p>
|
||||
<p>Please contact an administrator if you believe this is an error.</p>
|
||||
|
||||
<div class="mt-4">
|
||||
<a asp-controller="Home" asp-action="Index" class="btn btn-primary">Go to Home</a>
|
||||
<a asp-controller="Account" asp-action="Login" class="btn btn-secondary">Login</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
50
YatzyGame/Views/Account/Login.cshtml
Normal file
50
YatzyGame/Views/Account/Login.cshtml
Normal file
@@ -0,0 +1,50 @@
|
||||
@model YatzyGame.Models.LoginViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Log in";
|
||||
}
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2 class="text-center">🎲 Login to Yatzy</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form asp-action="Login" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post">
|
||||
<div asp-validation-summary="All" class="text-danger"></div>
|
||||
|
||||
<div class="form-group mb-3">
|
||||
<label asp-for="Username" class="form-label"></label>
|
||||
<input asp-for="Username" class="form-control" placeholder="Enter your username" />
|
||||
<span asp-validation-for="Username" class="text-danger"></span>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-3">
|
||||
<label asp-for="Password" class="form-label"></label>
|
||||
<input asp-for="Password" class="form-control" placeholder="Enter your password" />
|
||||
<span asp-validation-for="Password" class="text-danger"></span>
|
||||
</div>
|
||||
|
||||
<div class="form-check mb-3">
|
||||
<input asp-for="RememberMe" class="form-check-input" />
|
||||
<label asp-for="RememberMe" class="form-check-label"></label>
|
||||
</div>
|
||||
|
||||
<div class="d-grid">
|
||||
<button type="submit" class="btn btn-primary">Log in</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="text-center">
|
||||
<p>Don't have an account? <a asp-action="Register" asp-route-returnurl="@ViewData["ReturnUrl"]">Register here</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
||||
}
|
||||
51
YatzyGame/Views/Account/Register.cshtml
Normal file
51
YatzyGame/Views/Account/Register.cshtml
Normal file
@@ -0,0 +1,51 @@
|
||||
@model YatzyGame.Models.RegisterViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Register";
|
||||
}
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2 class="text-center">🎲 Join Yatzy</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form asp-action="Register" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post">
|
||||
<div asp-validation-summary="All" class="text-danger"></div>
|
||||
|
||||
<div class="form-group mb-3">
|
||||
<label asp-for="Username" class="form-label"></label>
|
||||
<input asp-for="Username" class="form-control" placeholder="Choose a username" />
|
||||
<span asp-validation-for="Username" class="text-danger"></span>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-3">
|
||||
<label asp-for="Password" class="form-label"></label>
|
||||
<input asp-for="Password" class="form-control" placeholder="Choose a password" />
|
||||
<span asp-validation-for="Password" class="text-danger"></span>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-3">
|
||||
<label asp-for="ConfirmPassword" class="form-label"></label>
|
||||
<input asp-for="ConfirmPassword" class="form-control" placeholder="Confirm your password" />
|
||||
<span asp-validation-for="ConfirmPassword" class="text-danger"></span>
|
||||
</div>
|
||||
|
||||
<div class="d-grid">
|
||||
<button type="submit" class="btn btn-success">Register</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="text-center">
|
||||
<p>Already have an account? <a asp-action="Login" asp-route-returnurl="@ViewData["ReturnUrl"]">Login here</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
||||
}
|
||||
Reference in New Issue
Block a user