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/walk.html | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 layouts/partials/walk.html (limited to 'layouts/partials/walk.html') diff --git a/layouts/partials/walk.html b/layouts/partials/walk.html new file mode 100644 index 0000000..e115d6f --- /dev/null +++ b/layouts/partials/walk.html @@ -0,0 +1,29 @@ +{{- $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 }} + +{{- end }} \ No newline at end of file -- cgit v1.2.3