aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--themes/default/layouts/_default/single.html33
1 files changed, 33 insertions, 0 deletions
diff --git a/themes/default/layouts/_default/single.html b/themes/default/layouts/_default/single.html
index bf077f9..4d5e172 100644
--- a/themes/default/layouts/_default/single.html
+++ b/themes/default/layouts/_default/single.html
@@ -21,6 +21,39 @@
<micro-thread>
{{ .Render "summary" }}
+ {{- $nextHref := "" -}}
+ {{- $prevHref := "" -}}
+ {{- $nextTitle := "" -}}
+ {{- $prevTitle := "" -}}
+ {{- $nextInvisible := "data-invisible" -}}
+ {{- $prevInvisible := "data-invisible" -}}
+
+ {{- with .Next -}}
+ {{- $nextHref = $.Next.Permalink -}}
+ {{- $nextTitle = $.Next.Summary -}}
+ {{- $nextInvisible = "" -}}
+ {{- end -}}
+
+ {{- with .Prev -}}
+ {{- $prevHref = $.Prev.Permalink -}}
+ {{- $prevTitle = $.Prev.Summary -}}
+ {{- $prevInvisible = "" -}}
+ {{- end -}}
+
+ {{- with or .Next .Prev -}}
+ <paginator-navigation>
+ <a {{ $nextInvisible | safeHTMLAttr }} href="{{ $nextHref }}" title="{{ $nextTitle }}">
+ {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/arrow-left.svg")) }}
+ Newer
+ </a>
+
+ <a {{ $prevInvisible | safeHTMLAttr }} href="{{ $prevHref }}" title="{{ $prevTitle }}">
+ Older
+ {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/arrow-right.svg")) }}
+ </a>
+ </paginator-navigation>
+ {{- end -}}
+
{{- $filteredPages := partial "function-filters-content.html" (.Site.RegularPages.Related .) -}}
{{- $related := $filteredPages | first 3 -}}