congo/layouts/partials/article-pagination.html

46 lines
1.9 KiB
HTML
Raw Permalink Normal View History

{{ if .Params.showPagination | default (.Site.Params.article.showPagination | default true) }}
{{ if or .NextInSection .PrevInSection }}
<div class="pt-8 article-pagination">
<hr class="border-gray-300 border-dotted dark:border-gray-600" />
<div class="flex justify-between pt-3">
<span>
{{ if .NextInSection }}
<a class="flex" href="{{ .NextInSection.Permalink }}">
<span class="mr-3 article-pagination-direction">&larr;</span>
<span class="flex flex-col">
<span class="article-pagination-title">{{ .NextInSection.Title }}</span>
{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }}
<time
class="-mt-1 text-xs text-gray-400 dark:text-gray-500"
datetime="{{ .Date }}"
>
{{ .Date.Format .Site.Params.article.dateFormat | default "2 January 2006" }}
</time>
{{ end }}
</span>
</a>
{{ end }}
</span>
<span>
{{ if .PrevInSection }}
<a class="flex text-right" href="{{ .PrevInSection.Permalink }}">
<span class="flex flex-col">
<span class="article-pagination-title">{{ .PrevInSection.Title }}</span>
{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }}
<time
class="-mt-1 text-xs text-gray-400 dark:text-gray-500"
datetime="{{ .Date }}"
>
{{ .Date.Format .Site.Params.article.dateFormat | default "2 January 2006" }}
</time>
{{ end }}
</span>
<span class="ml-3 article-pagination-direction">&rarr;</span>
</a>
{{ end }}
</span>
</div>
</div>
{{ end }}
{{ end }}