summaryrefslogtreecommitdiff
path: root/source/index.blade.php
diff options
context:
space:
mode:
Diffstat (limited to 'source/index.blade.php')
-rw-r--r--source/index.blade.php18
1 files changed, 15 insertions, 3 deletions
diff --git a/source/index.blade.php b/source/index.blade.php
index d474972..998f56a 100644
--- a/source/index.blade.php
+++ b/source/index.blade.php
@@ -1,9 +1,21 @@
+---
+pagination:
+ collection: posts
+---
@extends('_layouts.master')
@section('article')
<ol>
- @foreach ($posts as $post)
- <li><a href="{{ $post->getUrl() }}">{{$post->title }}</a></li>
- @endforeach
+ @foreach ($pagination->items as $post)
+ <li><a href="{{ $post->getUrl() }}">{{$post->title }}</a></li>
+ @endforeach
</ol>
+ <nav>
+ @if ($pagination->previous)
+ <a href="{{ $pagination->previous }}">See more recent posts</a>
+ @endif
+ @if ($pagination->next)
+ <a href="{{ $pagination->next }}">See older posts</a>
+ @endif
+ </nav>
@endsection