File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
layouts/partials/hb/modules/docs Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ <h1 class="hb-docs-doc-title mb-0">{{ .Title }}</h1>
99 {{ .Content }}
1010 {{- if .Pages }}
1111 < h2 class ="mb-3 "> {{ i18n "in_this_section" }}</ h2 >
12- < ul class ="list-unstyled mb-5 border-top pt-3 ">
12+ < ul class ="list-unstyled border-top pt-3 ">
1313 {{ template "walk-docs-section-tree" . }}
1414 </ ul >
1515 {{- end }}
@@ -20,9 +20,11 @@ <h2 class="mb-3">{{ i18n "in_this_section" }}</h2>
2020{{- define "walk-docs-section-tree" }}
2121 {{- $weighted := sort (where .Pages "Params.nav_weight" "> " 0) "Params.nav_weight" }}
2222 {{- $pages := union $weighted (sort .Pages "Title") }}
23- {{- range $pages }}
23+ {{- range $i, $page := $pages }}
24+ {{- $last := eq (add $i 1) (len $pages) }}
2425 {{- if .IsSection }}
25- < li class ="mb-4 ">
26+ < li
27+ {{ if not $last }}class ="mb-4 "{{ end }} >
2628 < a class ="fs-6 text-decoration-none " href ="{{ .RelPermalink }} ">
2729 {{- .Title -}}
2830 </ a >
@@ -32,7 +34,8 @@ <h2 class="mb-3">{{ i18n "in_this_section" }}</h2>
3234 </ ul >
3335 </ li >
3436 {{- else }}
35- < li class ="mb-4 ">
37+ < li
38+ {{ if not $last }}class ="mb-4 "{{ end }} >
3639 < a class ="fs-6 text-decoration-none " href ="{{ .RelPermalink }} ">
3740 {{- .Title -}}
3841 </ a >
You can’t perform that action at this time.
0 commit comments