Back to Shardingsphere Elasticjob

Menu

docs/themes/hugo-theme-learn/layouts/partials/menu.html

3.0.51.3 KB
Original Source

{{ define "section-tree-nav" }} {{ $showvisitedlinks := .showvisitedlinks }} {{ $currentNode := .currentnode }} {{with .sect}} {{if .IsSection}} {{safeHTML .Params.head}} - {{ $numberOfPages := (add (len .Pages) (len .Sections)) }} {{ if ne $numberOfPages 0 }} {{else}} {{end}} {{safeHTML .Params.Pre}}{{or .Params.menuTitle .LinkTitle .Title}}{{safeHTML .Params.Post}} {{ if $showvisitedlinks}} {{ end }} {{ if ne $numberOfPages 0 }} {{ $currentNode.Scratch.Set "pages" .Pages }} {{ if .Sections}} {{ $currentNode.Scratch.Set "pages" (.Pages | union .Sections) }} {{end}} {{ $pages := ($currentNode.Scratch.Get "pages") }} {{if eq .Site.Params.ordersectionsby "title"}} {{ range $pages.ByTitle }} {{ if and .Params.hidden (not $.showhidden) }} {{else}} {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }} {{end}} {{ end }} {{else}} {{ range $pages.ByWeight }} {{ if and .Params.hidden (not $.showhidden) }} {{else}} {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }} {{end}} {{ end }} {{end}} {{ end }} {{else}} {{ if not .Params.Hidden }} - {{safeHTML .Params.Pre}}{{or .Params.menuTitle .LinkTitle .Title}}{{safeHTML .Params.Post}} {{ if $showvisitedlinks}}{{end}} {{ end }} {{end}} {{ end }} {{ end }}