mirror of https://github.com/jpanther/congo.git
💄 Add styles for pagination links
parent
d8473ba7d5
commit
e293f4c509
|
@ -18,6 +18,9 @@
|
||||||
showPagination = true
|
showPagination = true
|
||||||
showReadingTime = true
|
showReadingTime = true
|
||||||
|
|
||||||
|
[list]
|
||||||
|
groupByYear = true
|
||||||
|
|
||||||
[taxonomy]
|
[taxonomy]
|
||||||
showTermCount = true
|
showTermCount = true
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<span>
|
<span>
|
||||||
{{ if .NextInSection }}
|
{{ if .NextInSection }}
|
||||||
<a class="flex" href="{{ .NextInSection.Permalink }}">
|
<a class="flex" href="{{ .NextInSection.Permalink }}">
|
||||||
<span class="mr-3">←</span>
|
<span class="mr-3">←</span>
|
||||||
<span class="flex flex-col">
|
<span class="flex flex-col">
|
||||||
<span class="button__text">{{ .NextInSection.Title }}</span>
|
<span class="button__text">{{ .NextInSection.Title }}</span>
|
||||||
{{ if .Site.Params.article.showDate | default true }}
|
{{ if .Site.Params.article.showDate | default true }}
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
</time>
|
</time>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</span>
|
</span>
|
||||||
<span class="ml-3">→</span>
|
<span class="ml-3">→</span>
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</span>
|
</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 }}
|
{{ $paginator := .Paginator }}
|
||||||
<!-- If there's more than one page. -->
|
|
||||||
{{ if gt $paginator.TotalPages 1 }}
|
{{ if gt $paginator.TotalPages 1 }}
|
||||||
<ul class="Pagination">
|
<ul class="flex flex-row mt-8">
|
||||||
<!-- Previous page. -->
|
|
||||||
{{ if $paginator.HasPrev }}
|
{{ if $paginator.HasPrev }}
|
||||||
<li class="Pagination-item Pagination-item--previous">
|
<li>
|
||||||
<a
|
<a
|
||||||
href="{{ $paginator.Prev.URL }}"
|
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"
|
rel="prev"
|
||||||
>
|
>
|
||||||
←
|
←
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
<!-- Page numbers. -->
|
|
||||||
{{ range $paginator.Pagers }}
|
{{ range $paginator.Pagers }}
|
||||||
<li
|
<li>
|
||||||
class="Pagination-item{{ if eq . $paginator }}
|
<a
|
||||||
Pagination-item--current
|
href="{{ .URL }}"
|
||||||
{{ end }}"
|
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
|
||||||
<a href="{{ .URL }}" class="Pagination-itemLink"> {{ .PageNumber }} </a>
|
{{ end }}"
|
||||||
|
>
|
||||||
|
{{ .PageNumber }}
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
<!-- Next page. -->
|
|
||||||
{{ if $paginator.HasNext }}
|
{{ if $paginator.HasNext }}
|
||||||
<li class="Pagination-item Pagination-item--next">
|
<li>
|
||||||
<a
|
<a
|
||||||
href="{{ $paginator.Next.URL }}"
|
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"
|
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>
|
<h1 class="mb-3 text-4xl font-extrabold">{{ .Title }}</h1>
|
||||||
<section>{{ .Content }}</section>
|
<section>{{ .Content }}</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue