summaryrefslogtreecommitdiffstats
path: root/_build/themes/ninenines/layouts
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-09-14 13:46:37 +0200
committerLoïc Hoguin <[email protected]>2016-09-14 13:46:37 +0200
commit62f5d70836fe9a211ebfe9551bf02f67049cf86c (patch)
tree40ee9d5acc42d4953ca5d04212d364728ad91ce5 /_build/themes/ninenines/layouts
parentd354fdf0fa439d9e403cec498c1318ffc9f61a41 (diff)
downloadninenines.eu-62f5d70836fe9a211ebfe9551bf02f67049cf86c.tar.gz
ninenines.eu-62f5d70836fe9a211ebfe9551bf02f67049cf86c.tar.bz2
ninenines.eu-62f5d70836fe9a211ebfe9551bf02f67049cf86c.zip
Add prev/next links at the bottom of user guide pages
Diffstat (limited to '_build/themes/ninenines/layouts')
-rw-r--r--_build/themes/ninenines/layouts/docs/single.html21
1 files changed, 21 insertions, 0 deletions
diff --git a/_build/themes/ninenines/layouts/docs/single.html b/_build/themes/ninenines/layouts/docs/single.html
index b3eeefcd..4bef64ca 100644
--- a/_build/themes/ninenines/layouts/docs/single.html
+++ b/_build/themes/ninenines/layouts/docs/single.html
@@ -10,6 +10,27 @@
{{ .Content }}
+{{ if .Weight }}
+ {{ if eq .Params.doctype "guide" }}
+ {{ $.Scratch.Set "prev" ((where (where (where $.Site.Pages ".Params.project" .Params.project) ".Params.doctype" .Params.doctype) ".Params.version" .Params.version).Prev .) }}
+ {{ $.Scratch.Set "next" ((where (where (where $.Site.Pages ".Params.project" .Params.project) ".Params.doctype" .Params.doctype) ".Params.version" .Params.version).Next .) }}
+
+ <nav style="margin:1em 0">
+ {{ if ($.Scratch.Get "prev").Weight }}
+ <a style="float:left" href="{{ ($.Scratch.Get "prev").Permalink }}">
+ {{ ($.Scratch.Get "prev").Title }}
+ </a>
+ {{ end }}
+
+ {{ if ($.Scratch.Get "next").Weight }}
+ <a style="float:right" href="{{ ($.Scratch.Get "next").Permalink }}">
+ {{ ($.Scratch.Get "next").Title }}
+ </a>
+ {{ end }}
+ </nav>
+ {{ end }}
+{{ end }}
+
<!-- a.code -->
</div>