Improved Home Page paging control section
Some checks failed
Build, Tag, Push Docker Image / build (push) Has been cancelled
Create Release / Generate Release (push) Has been cancelled

This commit is contained in:
Mia Rose Winter 2024-02-26 14:18:49 +01:00
parent e72967aba1
commit b756391722
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E
2 changed files with 5 additions and 5 deletions

View file

@ -5,7 +5,7 @@
}
@code {
[SupplyParameterFromQuery]
[Parameter]
public int Page { get; set; } = 0;
[Parameter]

View file

@ -97,7 +97,7 @@
<p>@Localizer["NoArticles_Message"]</p>
}
<PageComponent LoadCallback="LoadArticles">
<PageComponent LoadCallback="LoadArticles" Page="@Page">
<div class="aspect-square">
<ArticleTile Article="context" />
</div>
@ -106,13 +106,13 @@
<div class="grid place-content-center my-3">
<div class="join">
<a class="join-item btn" href="@(Page < 2 ? "/" : $"/?page={Page - 1}")" disabled="@(Page < 1)" title="@Localizer["Paging_Previous"]">
<a class="join-item btn" target="_top" href="@(Page < 2 ? "/" : $"/?page={Page - 1}")" disabled="@(Page < 1)" title="@Localizer["Paging_Previous"]">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6">
<path fill-rule="evenodd" d="M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z" clip-rule="evenodd" />
</svg>
</a>
<button aria-ignore="true" class="join-item btn md:btn-wide no-animation">@Localizer["Paging_Page"] @(Page+1)</button>
<a class="join-item btn" href="/?page=@(Page + 1)" disabled="@(Page >= TotalPages - 1)" title="@Localizer["Paging_Next"]">
<button class="join-item btn md:btn-wide no-animation">@Localizer["Paging_Page"] @(Page+1)</button>
<a class="join-item btn" target="_top" href="/?page=@(Page + 1)" disabled="@(Page >= TotalPages - 1)" title="@Localizer["Paging_Next"]">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6">
<path fill-rule="evenodd" d="M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z" clip-rule="evenodd" />
</svg>