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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="hidden sm:block w-1/3 float-left mr-2">
|
<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>
|
</div>
|
||||||
<p class="font-bold">@featured.Author.FullName</p>
|
<p class="font-bold">@featured.Author.FullName</p>
|
||||||
<small class="text-sm">@featured.PublishDate.ToString("g")</small>
|
<small class="text-sm">@featured.PublishDate.ToString("g")</small>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="avatar">
|
<div class="avatar">
|
||||||
<div class="rounded">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -9,5 +9,6 @@
|
||||||
public string ProfileId { get; set; } = string.Empty;
|
public string ProfileId { get; set; } = string.Empty;
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public int Size { get; set; } = 800;
|
public int Size { get; set; } = 800;
|
||||||
|
[Parameter]
|
||||||
|
public bool LoadAsync { get; set; } = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue