diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2016-09-23 18:46:02 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2016-09-23 18:46:02 +0200 |
commit | 78211e36114ab31e92b570279a89e6d77ca64331 (patch) | |
tree | 11e59b766a0a09aae6bfaa090e66d38f0f0d8707 /blog | |
parent | f847d407b8f2da4e235cea42b8af1b3dcf8ac667 (diff) | |
download | norsk-urskog-main-78211e36114ab31e92b570279a89e6d77ca64331.tar.gz norsk-urskog-main-78211e36114ab31e92b570279a89e6d77ca64331.tar.bz2 norsk-urskog-main-78211e36114ab31e92b570279a89e6d77ca64331.zip |
Add links to previous and next posts in post template.
Diffstat (limited to 'blog')
-rw-r--r-- | blog/_assets/stylesheets/_post.scss | 17 | ||||
-rw-r--r-- | blog/_layouts/post.html | 8 |
2 files changed, 25 insertions, 0 deletions
diff --git a/blog/_assets/stylesheets/_post.scss b/blog/_assets/stylesheets/_post.scss index bbb924e..4912046 100644 --- a/blog/_assets/stylesheets/_post.scss +++ b/blog/_assets/stylesheets/_post.scss @@ -20,6 +20,23 @@ } .post { + footer { + padding-top: 4mm; + .prev-post { + float: left; + &::before { + content: "« "; + font-size: 150%; + } + } + .next-post { + float: right; + &::after { + content: " »"; + font-size: 150%; + } + } + } } .post-body { diff --git a/blog/_layouts/post.html b/blog/_layouts/post.html index 1fb1857..17d4979 100644 --- a/blog/_layouts/post.html +++ b/blog/_layouts/post.html @@ -7,4 +7,12 @@ layout: default <section class="post-body"> {{ content }} </section> + <footer> + {% if page.previous %} + <div class="prev-post"><a href="{{ page.previous.url }}">{{ page.previous.title }}</a></div> + {% endif %} + {% if page.next %} + <div class="next-post"><a href="{{ page.next.url }}">{{ page.next.title }}</a></div> + {% endif %} + </footer> </article> |