16 lines
443 B
HTML
16 lines
443 B
HTML
{{ $page := .currentPage }}
|
|
{{ range .menu }}
|
|
{{ $posts := (where .Pages "File.Dir" "in" .Dir) }}
|
|
{{ $postCount := len $posts }}
|
|
|
|
<li>
|
|
<a href="{{ .URL }}" class="{{ if or (.IsAncestor $page) (eq . $page) }}active{{ end }}">{{ .Name }}</a>
|
|
{{/* if ne $postCount 0 */}}{{/* $postCount */}}{{/* end */}}
|
|
<ul>
|
|
{{ if .Sections }}
|
|
{{ partial "section-menu.html" (dict "menu" .Sections "currentPage" $page) }}
|
|
{{ end }}
|
|
</ul>
|
|
</li>
|
|
{{ end }}
|