From a9168e6f04f766f7d88bc1b24aaa81336098b2fc Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Sun, 15 Dec 2024 03:56:47 +0300 Subject: Auto-commit 2024-12-15 --- layouts/partials/hmenu.html | 47 ++------------------------------------------- 1 file changed, 2 insertions(+), 45 deletions(-) (limited to 'layouts/partials/hmenu.html') diff --git a/layouts/partials/hmenu.html b/layouts/partials/hmenu.html index 7183180..89e70db 100644 --- a/layouts/partials/hmenu.html +++ b/layouts/partials/hmenu.html @@ -1,51 +1,8 @@ -{{- /* -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 }} - -{{- end }} - -{{- define "partials/inline/menu/walk.html" }} - {{- $page := .page }} - {{- range .menuEntries }} - {{- $attrs := dict "href" .URL }} - {{- if $page.IsMenuCurrent .Menu . }} - {{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }} - {{- else if $page.HasMenuCurrent .Menu .}} - {{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }} - {{- end }} - {{- $name := .Name }} - {{- with .Identifier }} - {{- with T . }} - {{- $name = . }} - {{- end }} - {{- end }} -
  • - {{ $name }} - {{- with .Children }} - - {{- end }} -
  • - {{- end }} {{- end }} -- cgit v1.2.3