Neighbourhood.omg.lol/Components/PicList.razor

32 lines
955 B
Text
Raw Normal View History

2024-06-05 12:41:08 +00:00
<Virtualize ItemsProvider="GetPics" Context="pic" ItemSize="180">
<ItemContent>
<article class="no-padding center">
<img class="responsive" src="@pic.Url">
<div class="padding">
<nav>
<a class="author" href="/person/@pic.Address">
<i class="fa-solid fa-fw fa-at"></i>@pic.Address
</a>
<span class="max"></span>
<a class="chip transparent-border right">
<i class="fa fa-clock"></i> @pic.RelativeTime
</a>
</nav>
<p>@pic.Description</p>
</div>
</article>
</ItemContent>
<Placeholder>
<article class="no-padding center"></article>
</Placeholder>
</Virtualize>
@code {
[Parameter]
public Func<ItemsProviderRequest, ValueTask<ItemsProviderResult<Pic>>> PicsFunc { get; set; }
private async ValueTask<ItemsProviderResult<Pic>> GetPics(ItemsProviderRequest request) {
return await this.PicsFunc(request);
}
}