Added Board components for layouting

This commit is contained in:
Mia Rose Winter 2024-01-20 18:29:32 +01:00
parent 8371f131b9
commit fb51b4b360
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E
3 changed files with 86 additions and 68 deletions

View file

@ -12,9 +12,8 @@
<StatusMessage Message="@Message" /> <StatusMessage Message="@Message" />
<div class="flex gap-4 flex-wrap"> <BoardComponent>
<section class="w-80 max-w-xs"> <BoardCardComponent Heading="@Localizer["Title"]">
<h2 class="text-2xl lg:text-4xl mb-3">@Localizer["Title"]</h2>
<label class="form-control w-full"> <label class="form-control w-full">
<div class="label"> <div class="label">
<span class="label-text">@Localizer["UserName_Label"]</span> <span class="label-text">@Localizer["UserName_Label"]</span>
@ -25,15 +24,13 @@
@if (User is not null) { @if (User is not null) {
<ProfileFormPartial User="@User" /> <ProfileFormPartial User="@User" />
} }
</section> </BoardCardComponent>
<section class="w-80 max-w-xs"> <BoardCardComponent Heading="@Localizer["AboutMe"]">
<h2 class="text-2xl lg:text-4xl mb-3">@Localizer["AboutMe"]</h2>
@if (User is not null) { @if (User is not null) {
<AboutMeFormPartial User="@User" /> <AboutMeFormPartial User="@User" />
} }
</section> </BoardCardComponent>
<section class="w-80 max-w-xs"> <BoardCardComponent Heading="@Localizer["Permissions"]">
<h2 class="text-2xl lg:text-4xl mb-3">@Localizer["Permissions"]</h2>
<ul> <ul>
<li class="flex gap-2 content-center"> <li class="flex gap-2 content-center">
<AuthorizeView Policy="ArticleEditPermissions"> <AuthorizeView Policy="ArticleEditPermissions">
@ -96,8 +93,8 @@
@Localizer["Permission_RoleAssign"] @Localizer["Permission_RoleAssign"]
</li> </li>
</ul> </ul>
</section> </BoardCardComponent>
</div> </BoardComponent>
@code { @code {
private string? Message { get; set; } private string? Message { get; set; }

View file

@ -0,0 +1,13 @@
<section class="w-80 max-w-xs">
@if (!string.IsNullOrWhiteSpace(Heading)) {
<h2 class="text-2xl lg:text-4xl mb-3">@Heading</h2>
}
@ChildContent
</section>
@code {
[Parameter]
public string? Heading { get; set; }
[Parameter]
public required RenderFragment ChildContent { get; set; }
}

View file

@ -0,0 +1,8 @@
<div class="flex gap-4 flex-wrap">
@ChildContent
</div>
@code {
[Parameter]
public required RenderFragment ChildContent { get; set; }
}