1
0
mirror of https://github.com/danbee/danbarber.me.hugo.git synced 2025-03-04 08:59:18 +00:00

Improve pagination links alignment

This commit is contained in:
Daniel Barber 2019-10-15 22:06:27 -04:00
parent 13637ad3dc
commit 88ced11348
3 changed files with 16 additions and 15 deletions

View File

@ -1,8 +1,9 @@
.posts__pagination { .posts__pagination {
@include container; padding: 1em $pad-min;
}
.posts__pagination-container {
display: flex; display: flex;
margin-top: 1em;
margin-bottom: 1em;
} }
.posts__next-link, .posts__next-link,

View File

@ -20,6 +20,7 @@
</section> </section>
<section class="posts__pagination"> <section class="posts__pagination">
<div class="container posts__pagination-container">
{{ if .Paginator.HasNext }} {{ if .Paginator.HasNext }}
<a class="posts__next-link" href="{{.Paginator.Next.URL}}">← Older</a> <a class="posts__next-link" href="{{.Paginator.Next.URL}}">← Older</a>
{{ end }} {{ end }}
@ -27,5 +28,6 @@
{{ if .Paginator.HasPrev }} {{ if .Paginator.HasPrev }}
<a class="posts__prev-link" href="{{.Paginator.Prev.URL}}">Newer →</a> <a class="posts__prev-link" href="{{.Paginator.Prev.URL}}">Newer →</a>
{{ end }} {{ end }}
</div>
</section> </section>
{{ end }} {{ end }}

View File

@ -377,12 +377,10 @@ pre {
border-bottom: 1px dashed #ddd; } } border-bottom: 1px dashed #ddd; } }
.posts__pagination { .posts__pagination {
margin-left: auto; padding: 1em 6.5%; }
margin-right: auto;
max-width: 40rem; .posts__pagination-container {
display: flex; display: flex; }
margin-top: 1em;
margin-bottom: 1em; }
.posts__next-link, .posts__next-link,
.posts__prev-link { .posts__prev-link {