Neighbourhood.omg.lol/Components/PicList.razor

31 lines
955 B
Text

<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);
}
}