diff --git a/themes/starless/layouts/partials/explorer-tree.html b/themes/starless/layouts/partials/explorer-tree.html index 078bf12..fc4f2f7 100644 --- a/themes/starless/layouts/partials/explorer-tree.html +++ b/themes/starless/layouts/partials/explorer-tree.html @@ -1,14 +1,15 @@ {{- range .nodes.ByWeight -}} + {{- $isCurrent := eq .RelPermalink $.currentPage.RelPermalink -}} {{- if eq $.level 0 -}}
- + {{ if .IsSection }}expand_more{{ else }}chevron_right{{ end }} {{ .LinkTitle }} {{- if .IsSection -}} {{- with .Pages.ByWeight -}}
- {{ partial "explorer-tree.html" (dict "nodes" . "level" (add $.level 1)) }} + {{ partial "explorer-tree.html" (dict "nodes" . "level" (add $.level 1) "currentPage" $.currentPage) }}
{{- end -}} {{- end -}} @@ -16,18 +17,18 @@ {{- else -}} {{- if .IsSection -}}
- + expand_more {{ .LinkTitle }} {{- with .Pages.ByWeight -}}
- {{ partial "explorer-tree.html" (dict "nodes" . "level" (add $.level 1)) }} + {{ partial "explorer-tree.html" (dict "nodes" . "level" (add $.level 1) "currentPage" $.currentPage) }}
{{- end -}}
{{- else -}} - {{ .LinkTitle }} + {{ .LinkTitle }} {{- end -}} {{- end -}} {{- end -}} diff --git a/themes/starless/layouts/partials/sidebar.html b/themes/starless/layouts/partials/sidebar.html index 8eacfc8..ca27d4f 100644 --- a/themes/starless/layouts/partials/sidebar.html +++ b/themes/starless/layouts/partials/sidebar.html @@ -10,7 +10,7 @@