diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 8de8e490dd..7805db93e0 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -8,6 +8,9 @@ {{ with .Title }}

{{ . }}

{{ end }} + {{ if eq .CurrentSection.Layout "series" }} + {{ partial "guides-stepper.html" . }} + {{ end }}
{{ partial "pagemeta.html" . }}
diff --git a/layouts/partials/guides-stepper.html b/layouts/partials/guides-stepper.html new file mode 100644 index 0000000000..b81b70ddd4 --- /dev/null +++ b/layouts/partials/guides-stepper.html @@ -0,0 +1,30 @@ +{{ if or .NextInSection .PrevInSection }} + + SERIES + {{ .CurrentSection.Title }} + +
+ {{ page.Store.Set "stepper_seen" false }} + {{ range $i, $e := .CurrentSection.Pages }} + {{ if $i }} + {{ if (page.Store.Get "stepper_seen") }} +
+ {{ else }} +
+ {{ end }} + {{ end }} + + {{ add $i 1 }} + {{ end }} +
+{{ end }}