From 6228cfd18ecb1f32b58b9db5f6200dbb80d7f39c Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Sun, 12 Apr 2020 14:30:28 -0400 Subject: [PATCH] Add forward/backward navigation --- _includes/footer.html | 23 +++++++++++++++++++++++ _posts/2018-05-28-hello.md | 2 +- assets/css/style.scss | 19 ++++++++++++++++++- 3 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 _includes/footer.html diff --git a/_includes/footer.html b/_includes/footer.html new file mode 100644 index 0000000..257ac5d --- /dev/null +++ b/_includes/footer.html @@ -0,0 +1,23 @@ +{% if page.layout == 'post' %} +{# Thanks to https://www.bytedude.com/jekyll-previous-and-next-posts/ #} +
+
+
+
+ {% if page.previous.url %} + « {{page.previous.title}} + {% endif %} +
+
+ {% if page.next.url %} + {{page.next.title}} » + {% endif %} +
+
+
+ + + +{% endif %} \ No newline at end of file diff --git a/_posts/2018-05-28-hello.md b/_posts/2018-05-28-hello.md index 6640061..484bbde 100644 --- a/_posts/2018-05-28-hello.md +++ b/_posts/2018-05-28-hello.md @@ -2,7 +2,7 @@ layout: post title: "Hello!" description: "" -category: not-nerdy +category: tags: [] --- diff --git a/assets/css/style.scss b/assets/css/style.scss index 6b1f8e2..77f7337 100644 --- a/assets/css/style.scss +++ b/assets/css/style.scss @@ -94,4 +94,21 @@ blockquote { margin-left: 0; padding-left: 1.8rem; border-left: 5px solid $gray; -} \ No newline at end of file +} + +.post-nav { + /* Insert your custom styling here. Example: + + font-size: 14px; + */ + display: flex; + margin-top: 1em; + margin-bottom: 1em; +} +.post-nav div { + /* flex-grow, flex-shrink, flex-basis */ + flex: 1 1 0; +} +.post-nav-next { + text-align: right; +}