{{- $context := .context -}} {{- $disableSidebar := .disableSidebar | default false -}} {{- $displayPlaceholder := .displayPlaceholder | default false -}} {{- $sidebarClass := cond $disableSidebar (cond $displayPlaceholder "md:hx-hidden xl:hx-block" "md:hx-hidden") "md:hx-sticky" -}} {{- $navRoot := cond (eq site.Home.Type "docs") site.Home $context.FirstSection -}} {{- $pageURL := $context.RelPermalink -}} {{/* {{ $data := partialCached "components/sidebar/get-section-data" $context $context.Section }} */}} {{- $data := partial "components/sidebar/generate-section-data" $navRoot | unmarshal -}} {{- $dataMobile := partial "components/sidebar/generate-section-data" site.Home | unmarshal -}}
{{- define "partials/components/sidebar/mobile-search" -}}
{{- partialCached "search.html" . -}}
{{- end -}} {{- define "partials/components/sidebar/switches" -}} {{- $context := .context -}} {{- $disableSidebar := .disableSidebar -}} {{/* Hide theme switch when sidebar is disabled */}} {{ $switchesClass := cond $disableSidebar "md:hx-hidden" "" -}} {{ $displayThemeToggle := (site.Params.theme.displayToggle | default true) -}} {{ if or site.IsMultiLingual $displayThemeToggle }}
{{- with site.IsMultiLingual -}} {{- partial "language-switch" (dict "context" $context "grow" true) -}} {{- with $displayThemeToggle }}{{ partial "theme-toggle" (dict "hideLabel" true) }}{{ end -}} {{- else -}} {{- with $displayThemeToggle -}}
{{ partial "theme-toggle" }}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}