Replace the loose page-count label with a SaBlog-style 6 / 316 chip, wire inject/stylevar HTML into list and post views, and flush page cache when ads are saved. Co-authored-by: Cursor <cursoragent@cursor.com>
33 lines
1.2 KiB
PHP
33 lines
1.2 KiB
PHP
@if ($paginator->hasPages())
|
|
<nav class="pagination-links" role="navigation" aria-label="分页">
|
|
<span class="pagination-info">{{ $paginator->currentPage() }} / {{ $paginator->lastPage() }}</span>
|
|
|
|
@if ($paginator->onFirstPage())
|
|
<span class="disabled">«</span>
|
|
@else
|
|
<a href="{{ $paginator->previousPageUrl() }}" rel="prev">«</a>
|
|
@endif
|
|
|
|
@foreach ($elements as $element)
|
|
@if (is_string($element))
|
|
<span class="disabled">{{ $element }}</span>
|
|
@endif
|
|
@if (is_array($element))
|
|
@foreach ($element as $page => $url)
|
|
@if ($page == $paginator->currentPage())
|
|
<span class="current">{{ $page }}</span>
|
|
@else
|
|
<a href="{{ $url }}">{{ $page }}</a>
|
|
@endif
|
|
@endforeach
|
|
@endif
|
|
@endforeach
|
|
|
|
@if ($paginator->hasMorePages())
|
|
<a href="{{ $paginator->nextPageUrl() }}" rel="next">»</a>
|
|
@else
|
|
<span class="disabled">»</span>
|
|
@endif
|
|
</nav>
|
|
@endif
|