Delete Bootstrap complitly and adapted some Sites
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
@page "/Account/Login"
|
||||
@layout Layout.IdentityLayout
|
||||
|
||||
@using System.ComponentModel.DataAnnotations
|
||||
@using Microsoft.AspNetCore.Authentication
|
||||
@using Microsoft.AspNetCore.Identity
|
||||
@using CouchLog.Data
|
||||
@using MudBlazor
|
||||
|
||||
@inject SignInManager<ApplicationUser> SignInManager
|
||||
@inject ILogger<Login> Logger
|
||||
@@ -12,57 +14,59 @@
|
||||
|
||||
<PageTitle>Log in</PageTitle>
|
||||
|
||||
<h1>Log in</h1>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<section>
|
||||
<MudGrid Justify="Justify.Center" Class="align-center">
|
||||
@* Linke Spalte: Login-Formular *@
|
||||
<MudItem xs="12" md="7">
|
||||
<MudPaper Elevation="3" Class="pa-6">
|
||||
<StatusMessage Message="@errorMessage" />
|
||||
|
||||
<EditForm Model="Input" method="post" OnValidSubmit="LoginUser" FormName="login">
|
||||
<DataAnnotationsValidator />
|
||||
<h2>Use a local account to log in.</h2>
|
||||
<hr />
|
||||
|
||||
<MudText Typo="Typo.h5" GutterBottom="true" Align="Align.Center">Login</MudText>
|
||||
<MudDivider Class="mb-6" />
|
||||
|
||||
<ValidationSummary class="text-danger" role="alert" />
|
||||
<div class="form-floating mb-3">
|
||||
<InputText @bind-Value="Input.Username" id="Input.Username" class="form-control" autocomplete="username" aria-required="true" placeholder="Username" />
|
||||
<label for="Input.Username" class="form-label">Username</label>
|
||||
<ValidationMessage For="() => Input.Username" class="text-danger" />
|
||||
|
||||
@* MudTextFields zwingend mit Name-Attribut für SSR *@
|
||||
<MudTextField @bind-Value="Input.Username"
|
||||
For="@(() => Input.Username)"
|
||||
Name="Input.Username"
|
||||
Label="Username"
|
||||
Variant="Variant.Outlined"
|
||||
Margin="Margin.Dense"
|
||||
ShrinkLabel="true"
|
||||
Class="mb-4" />
|
||||
|
||||
<MudTextField @bind-Value="Input.Password"
|
||||
For="@(() => Input.Password)"
|
||||
Name="Input.Password"
|
||||
Label="Password"
|
||||
InputType="InputType.Password"
|
||||
Variant="Variant.Outlined"
|
||||
Margin="Margin.Dense"
|
||||
ShrinkLabel="true"
|
||||
Class="mb-4" />
|
||||
|
||||
@* Standard-Checkbox mit MudBlazor-Typografie *@
|
||||
<div class="d-flex align-center mb-6">
|
||||
<InputCheckbox @bind-Value="Input.RememberMe" id="Input.RememberMe" style="width: 1.2rem; height: 1.2rem; accent-color: var(--mud-palette-primary);" />
|
||||
<label for="Input.RememberMe" class="ml-2 mud-typography mud-typography-body1">Remember me</label>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<InputText type="password" @bind-Value="Input.Password" id="Input.Password" class="form-control" autocomplete="current-password" aria-required="true" placeholder="Password" />
|
||||
<label for="Input.Password" class="form-label">Password</label>
|
||||
<ValidationMessage For="() => Input.Password" class="text-danger" />
|
||||
</div>
|
||||
<div class="checkbox mb-3">
|
||||
<label class="form-label">
|
||||
<InputCheckbox @bind-Value="Input.RememberMe" class="darker-border-checkbox form-check-input" />
|
||||
Remember me
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<button type="submit" class="w-100 btn btn-lg btn-primary">Log in</button>
|
||||
</div>
|
||||
<div>
|
||||
<p>
|
||||
<a href="Account/ForgotPassword">Forgot your password?</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="@(NavigationManager.GetUriWithQueryParameters("Account/Register", new Dictionary<string, object?> { ["ReturnUrl"] = ReturnUrl }))">Register as a new user</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="Account/ResendEmailConfirmation">Resend email confirmation</a>
|
||||
</p>
|
||||
|
||||
<MudButton ButtonType="ButtonType.Submit" Variant="Variant.Filled" Color="Color.Primary" Size="Size.Large" FullWidth="true" Class="mb-4">
|
||||
Log in
|
||||
</MudButton>
|
||||
|
||||
<div class="d-flex flex-column gap-2 mt-4">
|
||||
<MudLink Href="Account/ForgotPassword" Typo="Typo.body2">Forgot your password?</MudLink>
|
||||
<MudLink Href="@(NavigationManager.GetUriWithQueryParameters("Account/Register", new Dictionary<string, object?> { ["ReturnUrl"] = ReturnUrl }))" Typo="Typo.body2">Register as a new user</MudLink>
|
||||
<MudLink Href="Account/ResendEmailConfirmation" Typo="Typo.body2">Resend email confirmation</MudLink>
|
||||
</div>
|
||||
</EditForm>
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-lg-4 col-lg-offset-2">
|
||||
<section>
|
||||
<h3>Use another service to log in.</h3>
|
||||
<hr />
|
||||
<ExternalLoginPicker />
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
</MudGrid>
|
||||
|
||||
@code {
|
||||
private string? errorMessage;
|
||||
|
||||
Reference in New Issue
Block a user