| 
									
										
										
										
											2023-08-14 21:56:26 +01:00
										 |  |  | {{- $context := .context -}} | 
					
						
							| 
									
										
										
										
											2023-08-24 22:29:53 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-14 21:56:26 +01:00
										 |  |  | {{- $disableSidebar := .disableSidebar | default false -}} | 
					
						
							| 
									
										
										
										
											2023-08-24 22:29:53 +01:00
										 |  |  | {{- $displayPlaceholder := .displayPlaceholder | default false -}} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | {{- $sidebarClass := cond $disableSidebar (cond $displayPlaceholder "md:hidden xl:block" "md:hidden") "md:sticky" -}} | 
					
						
							| 
									
										
										
										
											2023-08-07 23:48:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-14 21:56:26 +01:00
										 |  |  | {{- $navRoot := cond (eq site.Home.Type "docs") site.Home $context.FirstSection -}} | 
					
						
							|  |  |  | {{- $navPages := union $navRoot.RegularPages $navRoot.Sections -}} | 
					
						
							|  |  |  | {{- $pageURL := $context.RelPermalink -}} | 
					
						
							| 
									
										
										
										
											2023-08-07 23:48:07 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-09 22:57:43 +01:00
										 |  |  | <aside class="sidebar-container flex flex-col print:hidden md:top-16 md:shrink-0 md:w-64 md:self-start max-md:[transform:translate3d(0,-100%,0)] {{ $sidebarClass }}"> | 
					
						
							| 
									
										
										
										
											2023-08-06 15:23:37 +01:00
										 |  |  |   <!-- Search bar on small screen --> | 
					
						
							|  |  |  |   <div class="px-4 pt-4 md:hidden"> | 
					
						
							|  |  |  |     {{ partial "search.html" }} | 
					
						
							|  |  |  |   </div> | 
					
						
							| 
									
										
										
										
											2023-09-13 19:01:38 -04:00
										 |  |  |   <div class="hextra-scrollbar overflow-y-auto overflow-x-hidden p-4 grow md:h-[calc(100vh-var(--navbar-height)-var(--menu-height))]"> | 
					
						
							| 
									
										
										
										
											2023-08-06 15:23:37 +01:00
										 |  |  |     <ul class="flex flex-col gap-1 md:hidden"> | 
					
						
							| 
									
										
										
										
											2023-08-07 23:48:07 +01:00
										 |  |  |       <!-- Nav --> | 
					
						
							| 
									
										
										
										
											2023-08-23 01:00:36 +01:00
										 |  |  |       {{ template "sidebar-main" (dict "context" site.Home "pageURL" $pageURL "page" $context "toc" true) -}} | 
					
						
							|  |  |  |       {{ template "sidebar-footer" }} | 
					
						
							| 
									
										
										
										
											2023-08-06 15:23:37 +01:00
										 |  |  |     </ul> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <!-- Sidebar on large screen --> | 
					
						
							| 
									
										
										
										
											2023-08-24 22:29:53 +01:00
										 |  |  |     {{- if $disableSidebar -}} | 
					
						
							|  |  |  |       {{- if $displayPlaceholder }}<div class="max-xl:hidden h-0 w-64 shrink-0"></div>{{ end -}} | 
					
						
							| 
									
										
										
										
											2023-08-07 23:48:07 +01:00
										 |  |  |       {{ .context.Scratch.Set "enableFooterSwitches" true }} | 
					
						
							| 
									
										
										
										
											2023-08-14 21:56:26 +01:00
										 |  |  |     {{- else -}} | 
					
						
							| 
									
										
										
										
											2023-08-07 23:48:07 +01:00
										 |  |  |       <ul class="flex flex-col gap-1 max-md:hidden"> | 
					
						
							| 
									
										
										
										
											2023-08-20 00:42:46 +01:00
										 |  |  |         {{ template "sidebar-main" (dict "context" $navRoot "page" $context  "pageURL" $pageURL) }} | 
					
						
							| 
									
										
										
										
											2023-08-07 23:48:07 +01:00
										 |  |  |         {{ template "sidebar-footer" }} | 
					
						
							|  |  |  |       </ul> | 
					
						
							| 
									
										
										
										
											2023-08-14 21:56:26 +01:00
										 |  |  |     {{ end -}} | 
					
						
							| 
									
										
										
										
											2023-07-27 00:05:47 +01:00
										 |  |  |   </div> | 
					
						
							| 
									
										
										
										
											2023-08-07 23:48:07 +01:00
										 |  |  |   {{/* Hide theme switch when sidebar is disabled */}} | 
					
						
							| 
									
										
										
										
											2023-10-21 17:18:04 -04:00
										 |  |  |   {{ $switchesClass := cond $disableSidebar "md:hidden" "" -}} | 
					
						
							|  |  |  |   {{ $displayThemeToggle := (site.Params.theme.displayToggle | default true) -}} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   {{ if or site.IsMultiLingual $displayThemeToggle }} | 
					
						
							|  |  |  |     <div class="{{ $switchesClass }} {{ with site.IsMultiLingual }}justify-end{{ end }} sticky bottom-0 bg-white dark:bg-dark mx-4 py-4 shadow-[0_-12px_16px_#fff] flex items-center gap-2 dark:border-neutral-800 dark:shadow-[0_-12px_16px_#111] contrast-more:border-neutral-400 contrast-more:shadow-none contrast-more:dark:shadow-none border-t" data-toggle-animation="show"> | 
					
						
							|  |  |  |       {{- with site.IsMultiLingual -}} | 
					
						
							|  |  |  |         {{- partial "language-switch" (dict "context" $context "grow" true) -}} | 
					
						
							|  |  |  |         {{- with $displayThemeToggle }}{{ partial "theme-toggle" (dict "hideLabel" true) }}{{ end -}} | 
					
						
							|  |  |  |       {{- else -}} | 
					
						
							|  |  |  |         {{- with $displayThemeToggle -}} | 
					
						
							|  |  |  |           <div class="flex grow flex-col">{{ partial "theme-toggle" }}</div> | 
					
						
							|  |  |  |         {{- end -}} | 
					
						
							|  |  |  |       {{- end -}} | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  |   {{- end -}} | 
					
						
							| 
									
										
										
										
											2023-08-06 15:23:37 +01:00
										 |  |  | </aside> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-07 23:48:07 +01:00
										 |  |  | {{- define "sidebar-main" -}} | 
					
						
							| 
									
										
										
										
											2023-08-20 00:42:46 +01:00
										 |  |  |   {{ template "sidebar-tree" (dict "context" .context "level" 0 "page" .page "pageURL" .pageURL "toc" (.toc | default false)) }} | 
					
						
							| 
									
										
										
										
											2023-08-06 15:23:37 +01:00
										 |  |  | {{- end -}} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | {{- define "sidebar-tree" -}} | 
					
						
							| 
									
										
										
										
											2023-08-14 21:56:26 +01:00
										 |  |  |   {{- if ge .level 4 -}} | 
					
						
							|  |  |  |     {{- return -}} | 
					
						
							|  |  |  |   {{- end -}} | 
					
						
							| 
									
										
										
										
											2023-08-06 15:23:37 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-14 21:56:26 +01:00
										 |  |  |   {{- $context := .context -}} | 
					
						
							| 
									
										
										
										
											2023-08-20 00:42:46 +01:00
										 |  |  |   {{- $page := .page }} | 
					
						
							|  |  |  |   {{- $pageURL := .page.RelPermalink -}} | 
					
						
							| 
									
										
										
										
											2023-08-14 21:56:26 +01:00
										 |  |  |   {{- $level := .level -}} | 
					
						
							|  |  |  |   {{- $toc := .toc | default false -}} | 
					
						
							| 
									
										
										
										
											2023-08-06 15:23:37 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-20 00:42:46 +01:00
										 |  |  |   {{- with $items := union .context.RegularPages .context.Sections -}} | 
					
						
							| 
									
										
										
										
											2023-08-14 21:56:26 +01:00
										 |  |  |     {{- if eq $level 0 -}} | 
					
						
							|  |  |  |       {{- range $items.ByWeight }} | 
					
						
							|  |  |  |         {{- $active := eq $pageURL .RelPermalink -}} | 
					
						
							| 
									
										
										
										
											2023-08-20 00:42:46 +01:00
										 |  |  |         {{- $shouldOpen := or (.Params.sidebar.open) (.IsAncestor $page) $active | default true }} | 
					
						
							|  |  |  |         <li class="{{ if $shouldOpen }}open{{ end }}"> | 
					
						
							| 
									
										
										
										
											2023-08-14 21:56:26 +01:00
										 |  |  |           {{- template "sidebar-item-link" dict "context" . "active" $active "title" .LinkTitle "link" .RelPermalink -}} | 
					
						
							|  |  |  |           {{- if and $toc $active -}} | 
					
						
							|  |  |  |             {{- template "sidebar-toc" dict "page" . -}} | 
					
						
							|  |  |  |           {{- end -}} | 
					
						
							| 
									
										
										
										
											2023-08-20 00:42:46 +01:00
										 |  |  |           {{- template "sidebar-tree" dict "context" . "page" $page "pageURL" $pageURL "level" (add $level 1) "toc" $toc -}} | 
					
						
							| 
									
										
										
										
											2023-08-14 21:56:26 +01:00
										 |  |  |         </li> | 
					
						
							|  |  |  |       {{- end -}} | 
					
						
							|  |  |  |     {{- else -}} | 
					
						
							| 
									
										
										
										
											2023-10-27 09:57:48 -04:00
										 |  |  |       <div class="ltr:pr-0 overflow-hidden"> | 
					
						
							| 
									
										
										
										
											2023-08-14 21:56:26 +01:00
										 |  |  |         <ul class='relative flex flex-col gap-1 before:absolute before:inset-y-1 before:w-px before:bg-gray-200 before:content-[""] ltr:ml-3 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 -}} | 
					
						
							| 
									
										
										
										
											2023-08-20 00:42:46 +01:00
										 |  |  |             {{- $shouldOpen := or (.Params.sidebar.open) (.IsAncestor $page) $active | default true }} | 
					
						
							| 
									
										
										
										
											2023-08-14 21:56:26 +01:00
										 |  |  |             {{- $title := .LinkTitle | default .File.BaseFileName -}} | 
					
						
							| 
									
										
										
										
											2023-10-27 09:57:48 -04:00
										 |  |  |             <li class="flex flex-col {{ if $shouldOpen }}open{{ end }}"> | 
					
						
							| 
									
										
										
										
											2023-08-14 21:56:26 +01:00
										 |  |  |               {{- template "sidebar-item-link" dict "context" . "active" $active "title" $title "link" .RelPermalink -}} | 
					
						
							|  |  |  |               {{- if and $toc $active -}} | 
					
						
							|  |  |  |                 {{ template "sidebar-toc" dict "page" . }} | 
					
						
							|  |  |  |               {{- end }} | 
					
						
							| 
									
										
										
										
											2023-08-20 00:42:46 +01:00
										 |  |  |               {{ template "sidebar-tree" dict "context" . "page" $page "pageURL" $pageURL "level" (add $level 1) "toc" $toc }} | 
					
						
							| 
									
										
										
										
											2023-08-14 21:56:26 +01:00
										 |  |  |             </li> | 
					
						
							|  |  |  |           {{- end -}} | 
					
						
							|  |  |  |         </ul> | 
					
						
							|  |  |  |       </div> | 
					
						
							|  |  |  |     {{- end -}} | 
					
						
							|  |  |  |   {{- end }} | 
					
						
							| 
									
										
										
										
											2023-08-06 15:23:37 +01:00
										 |  |  | {{- end -}} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | {{- define "sidebar-toc" -}} | 
					
						
							|  |  |  |   {{ $page := .page }} | 
					
						
							|  |  |  |   {{ with $page.Fragments.Headings }} | 
					
						
							|  |  |  |     <ul class='flex flex-col gap-1 relative before:absolute before:inset-y-1 before:w-px before:bg-gray-200 before:content-[""] dark:before:bg-neutral-800 ltr:pl-3 ltr:before:left-0 rtl:pr-3 rtl:before:right-0 ltr:ml-3 rtl:mr-3'> | 
					
						
							| 
									
										
										
										
											2023-08-15 21:55:14 +01:00
										 |  |  |       {{- range . }} | 
					
						
							|  |  |  |         {{- with .Headings }} | 
					
						
							|  |  |  |           {{- range . -}} | 
					
						
							| 
									
										
										
										
											2023-08-06 15:23:37 +01:00
										 |  |  |             <li> | 
					
						
							|  |  |  |               <a | 
					
						
							|  |  |  |                 href="#{{ anchorize .ID }}" | 
					
						
							|  |  |  |                 class="flex rounded px-2 py-1.5 text-sm transition-colors [word-break:break-word] cursor-pointer [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] contrast-more:border flex gap-2 before:opacity-25 before:content-['#'] text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-neutral-400 dark:hover:bg-primary-100/5 dark:hover:text-gray-50 contrast-more:text-gray-900 contrast-more:dark:text-gray-50 contrast-more:border-transparent contrast-more:hover:border-gray-900 contrast-more:dark:hover:border-gray-50" | 
					
						
							|  |  |  |               > | 
					
						
							|  |  |  |                 {{- .Title -}} | 
					
						
							|  |  |  |               </a> | 
					
						
							|  |  |  |             </li> | 
					
						
							| 
									
										
										
										
											2023-08-15 21:55:14 +01:00
										 |  |  |           {{ end -}} | 
					
						
							|  |  |  |         {{ end -}} | 
					
						
							|  |  |  |       {{ end -}} | 
					
						
							| 
									
										
										
										
											2023-08-06 15:23:37 +01:00
										 |  |  |     </ul> | 
					
						
							|  |  |  |   {{ end }} | 
					
						
							|  |  |  | {{- end -}} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-14 21:56:26 +01:00
										 |  |  | {{- define "sidebar-footer" -}} | 
					
						
							|  |  |  |   {{- range site.Menus.sidebar -}} | 
					
						
							| 
									
										
										
										
											2023-08-27 17:32:44 +01:00
										 |  |  |     {{- $name := or (T .Identifier) .Name -}} | 
					
						
							| 
									
										
										
										
											2023-08-14 21:56:26 +01:00
										 |  |  |     {{ if eq .Params.type "separator" }} | 
					
						
							|  |  |  |       <li class="[word-break:break-word] mt-5 mb-2 px-2 py-1.5 text-sm font-semibold text-gray-900 first:mt-0 dark:text-gray-100"> | 
					
						
							| 
									
										
										
										
											2023-08-27 17:32:44 +01:00
										 |  |  |         <span class="cursor-default">{{ $name }}</span> | 
					
						
							| 
									
										
										
										
											2023-08-14 21:56:26 +01:00
										 |  |  |       </li> | 
					
						
							|  |  |  |     {{ else }} | 
					
						
							| 
									
										
										
										
											2023-08-27 17:32:44 +01:00
										 |  |  |       <li>{{ template "sidebar-item-link" dict "active" false "title" $name "link" (.URL | relLangURL) }}</li> | 
					
						
							| 
									
										
										
										
											2023-08-14 21:56:26 +01:00
										 |  |  |     {{ end }} | 
					
						
							|  |  |  |   {{- end -}} | 
					
						
							|  |  |  | {{- end -}} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-06 15:23:37 +01:00
										 |  |  | {{- define "sidebar-item-link" -}} | 
					
						
							| 
									
										
										
										
											2023-08-20 00:42:46 +01:00
										 |  |  |   {{- $external := strings.HasPrefix .link "http" -}} | 
					
						
							|  |  |  |   {{- $open := .open | default true -}} | 
					
						
							| 
									
										
										
										
											2023-08-06 15:23:37 +01:00
										 |  |  |   <a | 
					
						
							| 
									
										
										
										
											2023-08-14 21:56:26 +01:00
										 |  |  |     class="flex items-center justify-between gap-2 cursor-pointer rounded px-2 py-1.5 text-sm transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] [word-break:break-word] | 
					
						
							| 
									
										
										
										
											2023-08-06 15:23:37 +01:00
										 |  |  |     {{- if .active }} | 
					
						
							| 
									
										
										
										
											2023-08-22 00:48:44 +01:00
										 |  |  |       sidebar-active-item bg-primary-100 font-semibold text-primary-800 contrast-more:border contrast-more:border-primary-500 dark:bg-primary-400/10 dark:text-primary-600 contrast-more:dark:border-primary-500 | 
					
						
							| 
									
										
										
										
											2023-08-06 15:23:37 +01:00
										 |  |  |     {{- else }} | 
					
						
							|  |  |  |       text-gray-500 hover:bg-gray-100 hover:text-gray-900 contrast-more:border contrast-more:border-transparent contrast-more:text-gray-900 contrast-more:hover:border-gray-900 dark:text-neutral-400 dark:hover:bg-primary-100/5 dark:hover:text-gray-50 contrast-more:dark:text-gray-50 contrast-more:dark:hover:border-gray-50 | 
					
						
							|  |  |  |     {{- end -}}" | 
					
						
							|  |  |  |     href="{{ .link }}" | 
					
						
							|  |  |  |     {{ if $external }}target="_blank" rel="noreferer"{{ end }} | 
					
						
							|  |  |  |   > | 
					
						
							|  |  |  |     {{- .title -}} | 
					
						
							| 
									
										
										
										
											2023-08-20 00:42:46 +01:00
										 |  |  |     {{- with .context }} | 
					
						
							|  |  |  |       {{- if or .RegularPages .Sections }} | 
					
						
							|  |  |  |         <span class="hextra-sidebar-collapsible-button"> | 
					
						
							|  |  |  |           {{- template "sidebear-collapsible-button" -}} | 
					
						
							|  |  |  |         </span> | 
					
						
							|  |  |  |       {{- end }} | 
					
						
							|  |  |  |     {{ end -}} | 
					
						
							| 
									
										
										
										
											2023-08-06 15:23:37 +01:00
										 |  |  |   </a> | 
					
						
							|  |  |  | {{- end -}} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-07 23:48:07 +01:00
										 |  |  | {{- define "sidebar-separator" -}} | 
					
						
							|  |  |  |   <div class="mt-4 border-t py-4 dark:border-neutral-800 contrast-more:border-neutral-400 dark:contrast-more:border-neutral-400" /> | 
					
						
							|  |  |  | {{- end -}} | 
					
						
							| 
									
										
										
										
											2023-08-20 00:42:46 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | {{- define "sidebear-collapsible-button" -}} | 
					
						
							|  |  |  |   <svg fill="none" viewBox="0 0 24 24" stroke="currentColor" class="h-[18px] min-w-[18px] rounded-sm p-0.5 hover:bg-gray-800/5 dark:hover:bg-gray-100/5"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" class="origin-center transition-transform rtl:-rotate-180"></path></svg> | 
					
						
							|  |  |  | {{- end -}} |