Add next/previous post

This commit is contained in:
Damillora 2019-11-09 04:12:26 +07:00
parent c1c5bc8065
commit 20c1c4f89f
1 changed files with 25 additions and 1 deletions

View File

@ -44,9 +44,33 @@
<div>
{{content}}
</div>
</main>
<div class="container md:w-4/5 lg:w-4/6 md:mx-auto px-6 my-6">
<div class="my-4" id="comments">
</div>
</main>
<div class="my-4 flex flex-row justify-between">
{{#prev_post}}
<div class="w-1/3">
<a href="{{url}}">
<div class="flex flex-col items-end">
<p class="text-xl text-blue-500">Previous post</p>
<p>{{title}}</p>
</div>
</a>
</div>
{{/prev_post}}
{{#next_post}}
<div class="w-1/3">
<a href="{{url}}">
<div class="flex flex-col items-begin">
<p class="text-xl text-blue-500">Next post</p>
<p>{{title}}</p>
</div>
</a>
</div>
{{/next_post}}
</div>
</div>
{{/post}}
</article>