{{- $page := .page }} {{- $menuID := .menuID }} {{- $open := .open }} {{- $main := eq $menuID "main" }} {{- $n := .n }} {{- $n = add $n 1 }} {{- $l := printf "l%d" $n }} {{- $deck := and $main (eq $n 2) }} {{ range .menuEntries -}} {{- $name := .Name }} {{- $attrs := dict "href" .URL }} {{- if $page.IsMenuCurrent .Menu . }} {{- $attrs = merge $attrs (dict "aria-current" "page") }} {{- else if $page.HasMenuCurrent .Menu . }} {{- $attrs = merge $attrs (dict "aria-current" "true") }} {{- end }} {{- $desc := .Post }} {{- if $deck }} {{- $attrs = merge $attrs (dict "class" "on-deck") }} {{- else if $desc }} {{- $attrs = merge $attrs (dict "class" "has-desc") }} {{- end }} {{- $icon := .Pre }} {{- with $icon }} {{- if not $name }} {{- $attrs = merge $attrs (dict "title" . "aria-label" .) }} {{- end }} {{- end }} {{- $identifier := .Identifier }}