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 {
@include container;
padding: 1em $pad-min;
}
.posts__pagination-container {
display: flex;
margin-top: 1em;
margin-bottom: 1em;
}
.posts__next-link,

View File

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

View File

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