mirror of https://github.com/jpanther/congo.git
💄 Add styles for pagination links
parent
d8473ba7d5
commit
e293f4c509
|
@ -18,6 +18,9 @@
|
|||
showPagination = true
|
||||
showReadingTime = true
|
||||
|
||||
[list]
|
||||
groupByYear = true
|
||||
|
||||
[taxonomy]
|
||||
showTermCount = true
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<span>
|
||||
{{ if .NextInSection }}
|
||||
<a class="flex" href="{{ .NextInSection.Permalink }}">
|
||||
<span class="mr-3">←</span>
|
||||
<span class="mr-3">←</span>
|
||||
<span class="flex flex-col">
|
||||
<span class="button__text">{{ .NextInSection.Title }}</span>
|
||||
{{ if .Site.Params.article.showDate | default true }}
|
||||
|
@ -35,7 +35,7 @@
|
|||
</time>
|
||||
{{ end }}
|
||||
</span>
|
||||
<span class="ml-3">→</span>
|
||||
<span class="ml-3">→</span>
|
||||
</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
|
|
|
@ -1,41 +1,34 @@
|
|||
<!-- See: https://glennmccomb.com/articles/how-to-build-custom-hugo-pagination/ -->
|
||||
<!-- Assign .Paginator object to a $paginator variable -->
|
||||
{{ $paginator := .Paginator }}
|
||||
<!-- If there's more than one page. -->
|
||||
{{ if gt $paginator.TotalPages 1 }}
|
||||
<ul class="Pagination">
|
||||
<!-- Previous page. -->
|
||||
<ul class="flex flex-row mt-8">
|
||||
{{ if $paginator.HasPrev }}
|
||||
<li class="Pagination-item Pagination-item--previous">
|
||||
<li>
|
||||
<a
|
||||
href="{{ $paginator.Prev.URL }}"
|
||||
class="Pagination-itemLink Pagination-itemLink--previous"
|
||||
class="mx-1 block min-w-[1.8rem] text-center hover:bg-primary-600 hover:text-white rounded"
|
||||
rel="prev"
|
||||
>
|
||||
←
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
|
||||
<!-- Page numbers. -->
|
||||
{{ range $paginator.Pagers }}
|
||||
<li
|
||||
class="Pagination-item{{ if eq . $paginator }}
|
||||
Pagination-item--current
|
||||
<li>
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
class="mx-1 block min-w-[1.8rem] text-center hover:bg-primary-600 hover:text-white rounded {{ if eq . $paginator }}
|
||||
bg-primary-200 dark:bg-primary-400 dark:text-gray-800
|
||||
{{ end }}"
|
||||
>
|
||||
<a href="{{ .URL }}" class="Pagination-itemLink"> {{ .PageNumber }} </a>
|
||||
{{ .PageNumber }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
|
||||
<!-- Next page. -->
|
||||
{{ if $paginator.HasNext }}
|
||||
<li class="Pagination-item Pagination-item--next">
|
||||
<li>
|
||||
<a
|
||||
href="{{ $paginator.Next.URL }}"
|
||||
class="Pagination-itemLink Pagination-itemLink--next"
|
||||
class="mx-1 block min-w-[1.8rem] text-center hover:bg-primary-600 hover:text-white rounded"
|
||||
rel="next"
|
||||
>
|
||||
→
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<section class="prose">
|
||||
<section class="prose dark:prose-light">
|
||||
<h1 class="mb-3 text-4xl font-extrabold">{{ .Title }}</h1>
|
||||
<section>{{ .Content }}</section>
|
||||
</section>
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue