fixed Home page hero loading avatar lazily, even tho it is always visible on navigation
This commit is contained in:
parent
ed69c55d3b
commit
9831bbd5bf
|
@ -90,7 +90,7 @@
|
|||
</p>
|
||||
</div>
|
||||
<div class="hidden sm:block w-1/3 float-left mr-2">
|
||||
<ProfilePictureComponent ProfileId="@featured.Author.Id" Size="400" />
|
||||
<ProfilePictureComponent ProfileId="@featured.Author.Id" LoadAsync="false" Size="400" />
|
||||
</div>
|
||||
<p class="font-bold">@featured.Author.FullName</p>
|
||||
<small class="text-sm">@featured.PublishDate.ToString("g")</small>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="avatar">
|
||||
<div class="rounded">
|
||||
<img src="/api/user/pfp/@ProfileId?size=@Size" alt="" loading="lazy" width="@Size" onerror="this.remove()" />
|
||||
<img src="/api/user/pfp/@ProfileId?size=@Size" alt="" loading="@(LoadAsync ? "lazy" : "eager")" width="@Size" onerror="this.remove()" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -9,5 +9,6 @@
|
|||
public string ProfileId { get; set; } = string.Empty;
|
||||
[Parameter]
|
||||
public int Size { get; set; } = 800;
|
||||
|
||||
[Parameter]
|
||||
public bool LoadAsync { get; set; } = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue