diff options
Diffstat (limited to 'themes/aoidh/layouts/_partials/menu.html')
| -rw-r--r-- | themes/aoidh/layouts/_partials/menu.html | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/themes/aoidh/layouts/_partials/menu.html b/themes/aoidh/layouts/_partials/menu.html deleted file mode 100644 index ba80749..0000000 --- a/themes/aoidh/layouts/_partials/menu.html +++ /dev/null @@ -1,40 +0,0 @@ -{{- /* -Renders a menu for the given menu ID. - -@context {page} page The current page. -@context {string} menuID The menu ID. - -@example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }} -*/}} - -{{- $page := .page }} -{{- $menuID := .menuID }} - -{{- with index site.Menus $menuID }} - <nav> - <ul> - {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }} - </ul> - </nav> -{{- end }} - -{{- define "_partials/inline/menu/walk.html" }} - {{- $page := .page }} - {{- range .menuEntries }} - <li - {{- if $page.IsMenuCurrent .Menu . -}} - {{- printf " class=%q" "nav-active" | safeHTMLAttr -}} - {{- else if $page.HasMenuCurrent .Menu . -}} - {{- printf " class=%q" "nav-ancestor" | safeHTMLAttr -}} - {{- end -}}> - <a - {{ printf "href=%q" .URL | safeHTMLAttr }} - >{{ .Name }}</a> - {{- with .Children }} - <ul> - {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }} - </ul> - {{- end }} - </li> - {{- end }} -{{- end }} |