diff options
author | Yurizal Susanto <rizal.sagi@gmail.com> | 2017-07-02 06:12:38 +0300 |
---|---|---|
committer | Yurizal Susanto <rizal.sagi@gmail.com> | 2017-07-02 06:12:38 +0300 |
commit | 2c5876c46e16a92156670fb624493b68351d1a8d (patch) | |
tree | b5bab0dfc5ba860ac788300cd32571c6f1150b1a /layouts | |
parent | dd04ee4b9bf712d3a4a7c7d506bc37d37f5f69e7 (diff) |
Make navigation between post
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/single.html | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index f4367d7..abe0c7b 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -2,5 +2,19 @@ <article> <header>{{ partial "title" . }}</header> {{ .Content }} + <nav> + {{ if .PrevInSection }} + <a class="prev-post" href="{{.PrevInSection.Permalink}}"> + <img class="icon-text" src="/img/prev.svg"/> + {{- .PrevInSection.Title -}} + </a> + {{ end }} + {{ if .NextInSection }} + <a class="next-post" href="{{.NextInSection.Permalink}}"> + {{- .NextInSection.Title -}} + <img class="icon-text" src="/img/next.svg"/> + </a> + {{ end }} + </nav> </article> {{ partial "footer" . }} |