2022-05-22 07:15:41 +01:00
|
|
|
---
|
|
|
|
pagination:
|
|
|
|
collection: posts
|
|
|
|
perPage: 5
|
|
|
|
---
|
|
|
|
|
2022-05-15 09:08:25 +01:00
|
|
|
@extends('_layouts.main')
|
|
|
|
|
|
|
|
@section('body')
|
2022-05-22 07:15:41 +01:00
|
|
|
@foreach($pagination->items as $post)
|
|
|
|
<article>
|
|
|
|
<section>
|
|
|
|
<h2><a href="{{ $post->getUrl() }}">{{ $post->title }}</a></h2><small>{{ $page->dateTranslated($post->date) }}</small>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<p>
|
|
|
|
{{ $post->excerpt() }}
|
|
|
|
</p>
|
|
|
|
</section>
|
|
|
|
</article>
|
|
|
|
<hr>
|
|
|
|
@endforeach
|
|
|
|
<section class="paginationNavigation">
|
|
|
|
@if ($previous = $pagination->previous)
|
|
|
|
<a href="{{ $page->baseUrl }}{{ $pagination->first }}"><<</a>
|
|
|
|
<a href="{{ $page->baseUrl }}{{ $previous }}"><</a>
|
|
|
|
@else
|
|
|
|
<< <
|
|
|
|
@endif
|
|
|
|
|
|
|
|
@foreach ($pagination->pages as $pageNumber => $path)
|
|
|
|
@if($pageNumber !== 1) @endif
|
|
|
|
<a href="{{ $page->baseUrl }}{{ $path }}"
|
|
|
|
class="{{ $pagination->currentPage == $pageNumber ? 'selected' : '' }}">{{ $pageNumber }}</a>
|
|
|
|
@endforeach
|
|
|
|
|
|
|
|
@if ($next = $pagination->next)
|
|
|
|
<a href="{{ $page->baseUrl }}{{ $next }}">></a>
|
|
|
|
<a href="{{ $page->baseUrl }}{{ $pagination->last }}">>></a>
|
|
|
|
@else
|
|
|
|
> >>
|
|
|
|
@endif
|
|
|
|
</section>
|
|
|
|
|
2022-05-15 09:08:25 +01:00
|
|
|
@endsection
|