diff options
-rw-r--r-- | assets/css/site.css | 17 | ||||
-rw-r--r-- | layouts/_default/list.html | 16 |
2 files changed, 28 insertions, 5 deletions
diff --git a/assets/css/site.css b/assets/css/site.css index 25cd48f..c24bb8d 100644 --- a/assets/css/site.css +++ b/assets/css/site.css @@ -305,9 +305,24 @@ @apply text-white; } -.comments { +.comments, +.pagination { @apply my-5; @apply py-5; @apply border-t; @apply border-gray-400; } + +.pagination { + @apply flex; + @apply justify-center; +} + +.pagination .disabled { + @apply opacity-25; +} + +.pagination a { + @apply p-2; + @apply m-2; +} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 1258642..f60df17 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,8 +1,16 @@ {{ define "main" }} - {{ range .Pages }} - <article> - <h1 class="font-bold font-thin text-3xl text-gray-700"><a href="{{ .Permalink }}">{{ .Title }}</a></h1> - {{ .Content }} +<div id="reading-progress-bar" role="presentation" class="fixed z-10 top-0 left-0 h-1 bg-gray-700"></div> + + {{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }} + {{ range $paginator.Pages }} + <article class="article border-b border-gray-400"> + <h1 class="artitle__title"><a href="{{.Permalink}}">{{ .Title }}</a></h1> + + {{ .Summary }} </article> {{ end }} + + {{ if gt $paginator.TotalPages 1 }} + {{ template "_internal/pagination.html" . }} + {{ end }} {{ end }} |