From 21bcd9e15ac7e8431d5025a57b6e5e5931a1a297 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 13 Dec 2025 17:27:44 +0100 Subject: [PATCH] WIP:layout:menu --- layouts/_partials/menu.html | 55 ++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/layouts/_partials/menu.html b/layouts/_partials/menu.html index 300fae9c..396c3404 100644 --- a/layouts/_partials/menu.html +++ b/layouts/_partials/menu.html @@ -20,7 +20,7 @@ {{- with index site.Menus $menuID }} {{- end }} @@ -82,34 +82,33 @@
-{{- 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 }} - +{{- define "_partials/inline/menu/tree.html" }} +{{- $current := .current -}} +{{- $pages := .pages -}} + + {{- end }} -- 2.39.5