Skip to content

Commit 6701eb0

Browse files
committed
nav-list-hier.html: Optimize cascaded lists
Use just one `<ul>` element for all pages at the same level instead of multiple `<ul>` elements, one for each page.
1 parent e4c2976 commit 6701eb0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

layouts/partials/nav-list-hier.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,14 @@
4848
</a></li>
4949
{{- end }}
5050

51-
{{- range .this.Pages }}
51+
{{- if gt (len .this.Pages) 0 }}
5252
<ul>
53+
{{- range .this.Pages }}
5354
{{- partial "nav-list-hier-pages.html" (dict
5455
"currentPage" $.currentPage
5556
"this" .
5657
)}}
58+
{{- end }}
5759
</ul>
5860
{{- end }}
5961
{{- end }}

0 commit comments

Comments
 (0)