{{- $showvisitedlinks := .Site.Params.showVisitedLinks }} {{- define "partials/inline/menu-walker" }} {{- $currentNode := .currentnode }} {{- $showvisitedlinks := .showvisitedlinks }} {{- $alwaysopen := .alwaysopen }} {{- $currentFileRelPermalink := .currentnode.RelPermalink }} {{- $isSelf := .isSelf }} {{- $isAncestor := .isAncestor }} {{- $isHidden := .isHidden }} {{- with .sect }} {{- $isActive := $isSelf }} {{- $pages := partialCached "_relearn/pages.gotmpl" (dict "page" .) .Path }} {{- $hasVisibleChildren := false }} {{- range $pages }} {{- $isSubSelf := eq . $currentNode }} {{- $isSubAncestor := and (not $isSubSelf) (.IsAncestor $currentNode) }} {{- $isSubHidden := or (.Params.hidden) (eq .Title "") }} {{- if or $isSubAncestor $isSubSelf (not $isSubHidden) }} {{- $hasVisibleChildren = true }} {{- break }} {{- end }} {{- end }} {{- $title := partial "title.gotmpl" (dict "page" . "linkTitle" true) }} {{- $url := partial "permalink.gotmpl" (dict "to" .) }} {{- if $hasVisibleChildren }} {{- $isCollapsible := or .Params.collapsibleMenu .Site.Params.collapsibleMenu }} {{- $currentAlwaysopen := .Params.alwaysopen | default $alwaysopen }} {{- $pageId := md5 .Page }} {{- $isOpen := or $currentAlwaysopen $isSelf $isAncestor }}
  • {{- if $isCollapsible }}{{ end }} {{- if $url }}{{ else }}{{ end }} {{- partial "menu-pre.html" . }}{{ $title }}{{ partial "menu-post.html" . }} {{- if $url }}{{ if $showvisitedlinks }}{{ end }}{{ else }}{{ end }}
  • {{- else }}
  • {{- if $url }}{{ else }}{{ end }} {{- partial "menu-pre.html" . }}{{ $title }}{{ partial "menu-post.html" . }} {{- if $url }}{{ if $showvisitedlinks }}{{ end }}{{ else }}{{ end }}
  • {{- end }} {{- end }} {{- end }}