forked from drowl87/hextra_mirror
fix: class name in render-data
This commit is contained in:
parent
0da6f97e99
commit
2004648076
@ -5,14 +5,14 @@
|
|||||||
*/}}
|
*/}}
|
||||||
{{ $data := "" }}
|
{{ $data := "" }}
|
||||||
{{ $section := .Section | default "" }}
|
{{ $section := .Section | default "" }}
|
||||||
{{ $sidebarKey := "sidebar" }}
|
{{ $filename := "sidebar" }}
|
||||||
|
|
||||||
{{ if hugo.IsMultilingual }}
|
{{ if hugo.IsMultilingual }}
|
||||||
{{ with (index site.Data site.Language.Lang $sidebarKey $section) }}
|
{{ with (index site.Data site.Language.Lang $filename $section) }}
|
||||||
{{ $data = . }}
|
{{ $data = . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ with (index site.Data $sidebarKey $section) }}
|
{{ with (index site.Data $filename $section) }}
|
||||||
{{ $data = . }}
|
{{ $data = . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
{{- $containsPage := hasPrefix $pageLink .link -}}
|
{{- $containsPage := hasPrefix $pageLink .link -}}
|
||||||
{{- $shouldOpen := or (.open) $containsPage $active | default false -}}
|
{{- $shouldOpen := or (.open) $containsPage $active | default false -}}
|
||||||
|
|
||||||
<li class="sidebar-item-list {{ if $shouldOpen }}open{{ end }}">
|
<li class="hextra-sidebar-item {{ if $shouldOpen }}open{{ end }}">
|
||||||
{{- partial "components/sidebar/item-link" (dict "active" $active "title" .title "link" .link "items" .items) -}}
|
{{- partial "components/sidebar/item-link" (dict "active" $active "title" .title "link" .link "items" .items) -}}
|
||||||
{{- if .items -}}
|
{{- if .items -}}
|
||||||
{{- partial "components/sidebar/render-items" (dict "items" .items "link" $pageLink "cached" $cached) -}}
|
{{- partial "components/sidebar/render-items" (dict "items" .items "link" $pageLink "cached" $cached) -}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user