website

Personal website
git clone https://github.com/michaelneuper/website.git
README | Files | Log | Refs

commit 3b7ce832d3c3dc77dba1519bfebdd9fb29d35551
parent 0a7f833d6943b31abf3f5880df6b8f56961d8a19
Author: Michael Neuper <73108749+michaelneuper@users.noreply.github.com>
Date:   Thu, 15 Dec 2022 12:18:53 +0200

Right align next button

Diffstat:
Mlayouts/_default/single.html | 23++++++++++-------------
Mstatic/css/theme-override.css | 15++++++++++++++-
2 files changed, 24 insertions(+), 14 deletions(-)

diff --git a/layouts/_default/single.html b/layouts/_default/single.html @@ -18,19 +18,16 @@ <div class="content-wrapper"> <main> {{ .Content }} + {{ if or .Next .Prev -}} + <div class="navbuttons"> + {{- with .Prev }} + <a href="{{ .RelPermalink }}"><div class="prev">Previous:<br>{{ .Title }}</div></a> + {{ end -}} + {{- with .Next -}} + <a href="{{ .RelPermalink }}"><div class="next">Next:<br>{{ .Title }}</div></a> + {{ end -}} + </div> + {{ end -}} </main> </div> -<div class="post-navigation"> - {{ if .Prev }} - <a href="{{ .Prev.Permalink }}" class="previous-post"> - Previous post: {{ .Prev.Title }} - </a> - {{ end }} - {{ if .Next }} - <a href="{{ .Next.Permalink }}" class="next-post"> - Next post: {{ .Next.Title }} - </a> - {{ end }} -</div> - {{ partial "footer.html" . }} diff --git a/static/css/theme-override.css b/static/css/theme-override.css @@ -263,7 +263,6 @@ blockquote { padding: 3px 1em 3px; } - .content-wrapper { padding: 0px 12px 0px 12px; width: 95%; @@ -276,3 +275,17 @@ blockquote { padding: 10px; display: block; } + +/* Next and previous buttons */ +.navbuttons { + font-weight: bold; +} + +.prev { + text-align: left; +} + +.next { + text-align: right; + margin-top: -60px; +}