summaryrefslogtreecommitdiff
path: root/layouts/partials/menu.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/menu.html')
-rw-r--r--layouts/partials/menu.html34
1 files changed, 22 insertions, 12 deletions
diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html
index 0773944..b88272b 100644
--- a/layouts/partials/menu.html
+++ b/layouts/partials/menu.html
@@ -14,21 +14,31 @@
{{- range .menuEntries }}
- {{ if .Params.nonpage }}
- <li>{{.Name }}
- {{else if .Params.placeholder }}
- <li class="placeholder">{{.Name }}
- {{else}}
- <li><b><a href="{{ .URL }}">{{ .Name }}</b></a>
- {{end}}
+ {{- if .Params.nonpage }}
+ <li>{{.Name }}
+ {{- else if .Params.placeholder }}
+ <li class="placeholder">{{.Name }}
+ {{- else}}
+ <li><b><a href="{{ .URL }}">{{ .Name }}</a></b>
+ {{- end}}
+ {{- if .Params.inlineChildren}}
+ {{- with .Children }}
+ - {{- partial "inline/menu/inline.html" (dict "page" $page "menuEntries" .) }}
+ {{- end}}
- {{- with .Children }}
- <ul>
- {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
- </ul>
- {{- end }}
+ {{- else}}
+ {{- with .Children }}
+ <ul>{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}</ul>
+ {{- end }}
</li>
+ {{- end}}
{{- end }}
{{- end }}
+{{- define "partials/inline/menu/inline.html" }}
+ {{- $page := .page }}
+ {{- range .menuEntries }}
+ <a href="{{ .URL }}"> {{ .Name }}</a>,
+ {{- end }}
+{{- end }}