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 1758ab87e6
commit 051121f16d
2 changed files with 12 additions and 9 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,12 +20,14 @@
</section> </section>
<section class="posts__pagination"> <section class="posts__pagination">
{{ if .Paginator.HasNext }} <div class="container posts__pagination-container">
<a class="posts__next-link" href="{{.Paginator.Next.URL}}">← Older</a> {{ if .Paginator.HasNext }}
{{ end }} <a class="posts__next-link" href="{{.Paginator.Next.URL}}">← Older</a>
{{ end }}
{{ 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 }}