37 lines
1.1 KiB
Text
37 lines
1.1 KiB
Text
@page "/now"
|
|
@inject IJSRuntime JS
|
|
@inject State State
|
|
<PageHeading title="Now.garden" icon="fa-duotone fa-seedling">
|
|
<Description>Feel free to stroll through the <a href="now.garden">now.garden</a> and take a look at what people are up to.</Description>
|
|
</PageHeading>
|
|
|
|
<div id="now-garden" class="responsive card-grid">
|
|
|
|
@if (garden != null) {
|
|
foreach (NowData now in garden) {
|
|
<article class="now">
|
|
<nav>
|
|
<a class="author" href="/person/@now.Address#now">
|
|
<h6><i class="fa-duotone fa-seedling"></i> @now.Address</h6>
|
|
</a>
|
|
</nav>
|
|
<nav>
|
|
<small>@now.UpdatedRelative</small>
|
|
</nav>
|
|
</article>
|
|
}
|
|
}
|
|
<LoadingCard id="now-loading" icon="fa-duotone fa-seedling" class="now"></LoadingCard>
|
|
|
|
</div>
|
|
|
|
@code {
|
|
private List<NowData>? garden;
|
|
|
|
protected override async Task OnInitializedAsync() {
|
|
await base.OnInitializedAsync();
|
|
if (garden == null || garden.Count == 0) garden = await State.GetNowGarden();
|
|
await InvokeAsync(StateHasChanged);
|
|
await JS.InvokeVoidAsync("removeElementById", "now-loading");
|
|
}
|
|
}
|