From d76eb85f1dca3e6f0593d26d859447ca982c1c8e Mon Sep 17 00:00:00 2001 From: Jan-Lukas Else Date: Sun, 2 Feb 2020 11:11:07 +0100 Subject: [PATCH] Improve post navigation --- assets/css/style.scss | 29 ++++++++++++----------------- layouts/partials/post_nav.html | 20 ++++++++++---------- 2 files changed, 22 insertions(+), 27 deletions(-) diff --git a/assets/css/style.scss b/assets/css/style.scss index a9a717f..a80d054 100644 --- a/assets/css/style.scss +++ b/assets/css/style.scss @@ -727,25 +727,20 @@ select { } .item { flex: 1 1 50%; - max-width: 48%; + max-width: 100%; + text-align: center; @media screen and (max-width: $break1) { - max-width: 100%; - } - &--prev { - margin-right: auto; - text-align: left; - @media screen and (max-width: $break1) { - padding-bottom: 10px; - min-width: 100%; - text-align: center; + &:last-of-type:not(:first-of-type) { + padding-top: 10px; } } - &--next { - margin-left: auto; - text-align: right; - @media screen and (max-width: $break1) { - min-width: 100%; - text-align: center; + @media screen and (min-width: $break1) { + max-width: 48%; + &--prev { + text-align: left; + } + &--next { + text-align: right; } } .link { @@ -754,10 +749,10 @@ select { margin-bottom: 0; overflow: hidden; font-size: .8125rem; + margin-top: 5px; } .caption { display: block; - margin-bottom: 5px; font-weight: 700; line-height: 1; text-transform: uppercase; diff --git a/layouts/partials/post_nav.html b/layouts/partials/post_nav.html index c9bc20f..b990b7d 100644 --- a/layouts/partials/post_nav.html +++ b/layouts/partials/post_nav.html @@ -1,17 +1,17 @@ -{{- if .Param "post_navigation" }} -{{- if or (.PrevInSection) (.NextInSection) }} +{{ if .Param "post_navigation" }} +{{ if or (.PrevInSection) (.NextInSection) }} -{{- end }} +{{ end }} {{ partial "related.html" . }} -{{- end }} \ No newline at end of file +{{ end }} \ No newline at end of file