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>
<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">
<h2 class="text-2xl lg:text-4xl mb-3">@Localizer["Title"]</h2>
<BoardComponent CenterContent="true">
<BoardCardComponent Heading="@Localizer["Title"]">
<EditForm Model="Input" method="post" OnValidSubmit="LoginUser" FormName="login" class="w-full">
<DataAnnotationsValidator />
@ -56,8 +56,7 @@
</a>
</li>
</ul>
</section>
</BoardCardComponent>
<!--
<section class="w-80 max-w-xs">
<h2 class="text-2xl lg:text-4xl mb-3">Use another service to log in.</h2>
@ -65,7 +64,7 @@
<ExternalLoginPicker />
</section>
-->
</div>
</BoardComponent>
@code {
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
</div>
@code {
[Parameter]
public required RenderFragment ChildContent { get; set; }
[Parameter]
public bool CenterContent { get; set; }
}