ltr:pl-3 ltr:before:left-0 rtl:mr-3 rtl:pr-3 rtl:before:right-0 dark:before:bg-neutral-800'>
          {{- range $items.ByWeight }}
            {{- $active := eq $pageURL .RelPermalink -}}
            {{- $shouldOpen := or (.Params.sidebar.open) (.IsAncestor $page) $active | default true }}
            {{- $title := .LinkTitle | default .File.BaseFileName -}}
            <li class="flex flex-col {{ if $shouldOpen }}open{{ end }}">
              {{- template "sidebar-item-link" dict "context" . "active" $act