Improved BoardComponent, applied to Login Page

This commit is contained in:
Mia Rose Winter 2024-01-21 17:37:34 +01:00
parent 14843106e7
commit 5467fb88a3
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E
2 changed files with 10 additions and 9 deletions

View file

@ -14,9 +14,9 @@
<PageTitle>@Localizer["Title"]</PageTitle> <PageTitle>@Localizer["Title"]</PageTitle>
<StatusMessage Message="@_errorMessage" /> <StatusMessage Message="@_errorMessage" />
<div class="flex gap-y-4 gap-x-8 flex-wrap h-full place-content-center">
<section class="w-80 max-w-xs"> <BoardComponent CenterContent="true">
<h2 class="text-2xl lg:text-4xl mb-3">@Localizer["Title"]</h2> <BoardCardComponent Heading="@Localizer["Title"]">
<EditForm Model="Input" method="post" OnValidSubmit="LoginUser" FormName="login" class="w-full"> <EditForm Model="Input" method="post" OnValidSubmit="LoginUser" FormName="login" class="w-full">
<DataAnnotationsValidator /> <DataAnnotationsValidator />
@ -56,8 +56,7 @@
</a> </a>
</li> </li>
</ul> </ul>
</section> </BoardCardComponent>
<!-- <!--
<section class="w-80 max-w-xs"> <section class="w-80 max-w-xs">
<h2 class="text-2xl lg:text-4xl mb-3">Use another service to log in.</h2> <h2 class="text-2xl lg:text-4xl mb-3">Use another service to log in.</h2>
@ -65,7 +64,7 @@
<ExternalLoginPicker /> <ExternalLoginPicker />
</section> </section>
--> -->
</div> </BoardComponent>
@code { @code {
private string? _errorMessage; private string? _errorMessage;

View file

@ -1,8 +1,10 @@
<div class="flex gap-4 flex-wrap"> <div class="flex gap-y-4 gap-x-8 flex-wrap @(CenterContent ? "h-full place-content-center" : string.Empty)">
@ChildContent @ChildContent
</div> </div>
@code { @code {
[Parameter] [Parameter]
public required RenderFragment ChildContent { get; set; } public required RenderFragment ChildContent { get; set; }
[Parameter]
public bool CenterContent { get; set; }
} }