diff options
| author | 2026-02-14 13:06:23 +0300 | |
|---|---|---|
| committer | 2026-02-14 13:06:23 +0300 | |
| commit | d8b5023d7269fd67374cf65a1372e374b41964e0 (patch) | |
| tree | 661c2901040fa3200e379d9ecfdd5ee941a867d6 /themes/neonxp/layouts/_partials/menu.html | |
| parent | Пост про stplr (diff) | |
| download | blog-d8b5023d7269fd67374cf65a1372e374b41964e0.tar.gz blog-d8b5023d7269fd67374cf65a1372e374b41964e0.tar.bz2 blog-d8b5023d7269fd67374cf65a1372e374b41964e0.tar.xz blog-d8b5023d7269fd67374cf65a1372e374b41964e0.zip | |
New post, didaceted theme
Diffstat (limited to '')
| -rw-r--r-- | themes/neonxp/layouts/_partials/menu.html | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/themes/neonxp/layouts/_partials/menu.html b/themes/neonxp/layouts/_partials/menu.html deleted file mode 100644 index ebad53f..0000000 --- a/themes/neonxp/layouts/_partials/menu.html +++ /dev/null @@ -1,50 +0,0 @@ -{{- /* -Renders a menu for the given menu ID. - -@context {page} page The current page. -@context {string} menuID The menu ID. - -@example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }} -*/}} - -{{- $page := .page }} -{{- $menuID := .menuID }} - -{{- with index site.Menus $menuID }} -<nav> - <ul> - {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }} - </ul> -</nav> -{{- end }} - -{{- 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 }} -<li> - <a {{- range $k, $v :=$attrs }} {{- with $v }} {{- printf " %s=%q" $k $v | safeHTMLAttr }} {{- end }} {{- end -}}> - {{if .Pre}} - {{.Pre}} - {{end}} - {{ $name }} - </a> - {{- with .Children }} - <ul> - {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }} - </ul> - {{- end }} -</li> -{{- end }} -{{- end }}
\ No newline at end of file |
