fixed home page nested links (messed with tab order too)

This commit is contained in:
Mia Rose Winter 2024-02-07 20:25:34 +01:00
parent 6be8c74837
commit 2acc2916e4
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E
2 changed files with 20 additions and 13 deletions

View file

@ -60,7 +60,7 @@
@featured.Body[..Math.Min(1000, featured.Body.Length)]
</p>
<div class="flex">
<ProfilePill Profile="featured.Author" />
<ProfilePill Profile="featured.Author" DisableProfileLink="true" />
</div>
</div>
</div>

View file

@ -1,23 +1,30 @@
@using Wave.Data
@if (!DisableProfileLink) {
<a href="/profile/@Profile.Id">
<div class="rounded bg-base-200 text-base-content flex content-center w-full sm:w-56">
<div class="w-16 h-16">
<ProfilePictureComponent Size="200" ProfileId="@Profile.Id" />
</div>
<div class="w-16 h-16"><ProfilePictureComponent Size="200" ProfileId="@Profile.Id" /></div>
<div class="flex flex-col p-2">
<span class="truncate">@Profile.Name</span>
@if (RoleTag is not null) {
<span class="badge badge-sm badge-primary">@RoleTag</span>
}
@if (RoleTag is not null) { <span class="badge badge-sm badge-primary">@RoleTag</span> }
</div>
</div>
</a>
} else {
<div class="rounded bg-base-200 text-base-content flex content-center w-full sm:w-56">
<div class="w-16 h-16"><ProfilePictureComponent Size="200" ProfileId="@Profile.Id" /></div>
<div class="flex flex-col p-2">
<span class="truncate">@Profile.Name</span>
@if (RoleTag is not null) { <span class="badge badge-sm badge-primary">@RoleTag</span> }
</div>
</div>
}
@code {
[Parameter]
public required ApplicationUser Profile { get; set; }
[Parameter]
public string? RoleTag { get; set; }
[Parameter]
public bool DisableProfileLink { get; set; }
}