forked from drowl87/hextra_mirror
21 lines
906 B
HTML
21 lines
906 B
HTML
![]() |
{{- $items := .items -}}
|
||
|
{{- $pageLink := .link -}}
|
||
|
{{ $shouldOpen := true }}
|
||
|
|
||
|
|
||
|
<div class="ltr:hx-pr-0 hx-overflow-hidden">
|
||
|
<ul
|
||
|
class='hx-relative hx-flex hx-flex-col hx-gap-1 before:hx-absolute before:hx-inset-y-1 before:hx-w-px before:hx-bg-gray-200 before:hx-content-[""] ltr:hx-ml-3 ltr:hx-pl-3 ltr:before:hx-left-0 rtl:hx-mr-3 rtl:hx-pr-3 rtl:before:hx-right-0 dark:before:hx-bg-neutral-800'
|
||
|
>
|
||
|
{{- range $items }}
|
||
|
{{- $active := or (eq $pageLink .link) (eq (strings.TrimSuffix "/" $pageLink) .link) -}}
|
||
|
<li class="hx-flex hx-flex-col {{ if $shouldOpen }}open{{ end }}">
|
||
|
{{- partial "components/sidebar/item-link" (dict "active" $active "title" .title "link" .link "items" .items) -}}
|
||
|
{{- if .items -}}
|
||
|
{{- partial "components/sidebar/render-items" (dict "items" .items "link" .link) -}}
|
||
|
{{- end -}}
|
||
|
</li>
|
||
|
{{- end -}}
|
||
|
</ul>
|
||
|
</div>
|