congo/layouts/partials/article-pagination.html

60 lines
2.7 KiB
HTML
Raw Permalink Normal View History

{{ if .Params.showPagination | default (.Site.Params.article.showPagination | default true) }}
{{ if or .NextInSection .PrevInSection }}
{{ $next := .NextInSection }}
{{ $prev := .PrevInSection }}
{{ if .Params.invertPagination | default (.Site.Params.article.invertPagination | default false) }}
{{ $next = .PrevInSection }}
{{ $prev = .NextInSection }}
{{ end }}
<div class="pt-8">
2021-08-20 07:02:08 +00:00
<hr class="border-dotted border-neutral-300 dark:border-neutral-600" />
<div class="flex justify-between pt-3">
<span>
{{ if $prev }}
<a class="group flex" href="{{ $prev.RelPermalink }}">
<span
class="me-2 text-neutral-700 transition-transform group-hover:-translate-x-[2px] group-hover:text-primary-600 dark:text-neutral dark:group-hover:text-primary-400"
><span class="ltr:inline rtl:hidden">&larr;</span
><span class="ltr:hidden rtl:inline">&rarr;</span></span
>
<span class="flex flex-col">
<span
class="mt-[0.1rem] leading-6 group-hover:underline group-hover:decoration-primary-500"
>{{ $prev.Title | emojify }}</span
>
<span class="mt-[0.1rem] text-xs text-neutral-500 dark:text-neutral-400">
2021-08-21 01:42:40 +00:00
{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }}
{{ partial "meta/date.html" $prev.Date }}
2021-08-21 01:42:40 +00:00
{{ end }}
</span>
</span>
</a>
{{ end }}
</span>
<span>
{{ if $next }}
<a class="group flex text-right" href="{{ $next.RelPermalink }}">
<span class="flex flex-col">
<span
class="mt-[0.1rem] leading-6 group-hover:underline group-hover:decoration-primary-500"
>{{ $next.Title | emojify }}</span
>
<span class="mt-[0.1rem] text-xs text-neutral-500 dark:text-neutral-400">
2021-08-21 01:42:40 +00:00
{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }}
{{ partial "meta/date.html" $next.Date }}
2021-08-21 01:42:40 +00:00
{{ end }}
</span>
</span>
<span
class="ms-2 text-neutral-700 transition-transform group-hover:-translate-x-[2px] group-hover:text-primary-600 dark:text-neutral dark:group-hover:text-primary-400"
><span class="ltr:inline rtl:hidden">&rarr;</span
><span class="ltr:hidden rtl:inline">&larr;</span></span
>
</a>
{{ end }}
</span>
</div>
</div>
{{ end }}
{{ end }}