2021-09-07 12:08:46 +02:00
{{ if .Site.Params.alert -}}
{{ partial "header/alert.html" . }}
{{ end -}}
2022-06-10 16:33:08 +02:00
{{ if eq .Site.Params.options.navbarSticky true -}}
2022-06-20 19:46:02 +02:00
< div class = "sticky-top" >
2021-09-07 12:08:46 +02:00
{{ end -}}
< div class = "header-bar" > < / div >
2022-06-10 16:33:08 +02:00
< header class = "navbar navbar-expand-lg navbar-light doks-navbar" >
< nav class = "container-{{ if .Site.Params.options.fullWidth }}fluid{{ else }}xxl{{ end }} flex-wrap flex-lg-nowrap" aria-label = "Main navigation" >
2022-09-09 22:08:30 +02:00
< a class = "navbar-brand order-0" href = "{{ .Site.BaseURL | relLangURL }}" aria-label = "{{ .Site.Params.Title }}" >
2021-09-07 12:08:46 +02:00
{{ .Site.Params.Title }}
< / a >
2022-06-21 12:09:51 +02:00
{{ if (in .Site.Params.sections.sectionNav .Section) -}}
2022-06-20 19:46:02 +02:00
< button class = "btn btn-link order-0 ms-auto d-lg-none" type = "button" data-bs-toggle = "offcanvas" data-bs-target = "#offcanvasExample" aria-controls = "offcanvasExample" >
< svg xmlns = "http://www.w3.org/2000/svg" width = "24" height = "24" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" stroke-linecap = "round" stroke-linejoin = "round" class = "feather feather-more-horizontal" > < circle cx = "12" cy = "12" r = "1" > < / circle > < circle cx = "19" cy = "12" r = "1" > < / circle > < circle cx = "5" cy = "12" r = "1" > < / circle > < / svg >
2022-06-10 16:33:08 +02:00
< / button >
2022-06-20 19:46:02 +02:00
< div class = "offcanvas offcanvas-start d-lg-none" tabindex = "-1" id = "offcanvasExample" aria-labelledby = "offcanvasExampleLabel" >
< div class = "header-bar" > < / div >
< div class = "offcanvas-header" >
2022-07-07 12:47:20 +02:00
< h5 class = "offcanvas-title" id = "offcanvasExampleLabel" > {{ i18n "browse" }} {{ .Section }}< / h5 >
2022-06-20 19:46:02 +02:00
< button type = "button" class = "btn-close" data-bs-dismiss = "offcanvas" aria-label = "Close" > < / button >
< / div >
< div class = "offcanvas-body" >
< aside class = "doks-sidebar mt-n3" >
< nav id = "doks-docs-nav" aria-label = "Tertiary navigation" >
{{ partial "sidebar/docs-menu.html" . }}
< / nav >
< / aside >
< / div >
< / div >
2022-06-10 16:33:08 +02:00
{{ end -}}
2022-06-20 19:46:02 +02:00
2022-06-10 16:33:08 +02:00
< button class = "btn btn-menu order-2 d-block d-lg-none" type = "button" data-bs-toggle = "offcanvas" data-bs-target = "#offcanvasDoks" aria-controls = "offcanvasDoks" aria-label = "Open main menu" >
2021-09-07 12:08:46 +02:00
< svg xmlns = "http://www.w3.org/2000/svg" width = "24" height = "24" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" stroke-linecap = "round" stroke-linejoin = "round" class = "feather feather-menu" > < line x1 = "3" y1 = "12" x2 = "21" y2 = "12" > < / line > < line x1 = "3" y1 = "6" x2 = "21" y2 = "6" > < / line > < line x1 = "3" y1 = "18" x2 = "21" y2 = "18" > < / line > < / svg >
< / button >
2022-06-10 16:33:08 +02:00
< div class = "offcanvas offcanvas-end border-0 py-lg-1" tabindex = "-1" id = "offcanvasDoks" data-bs-backdrop = "true" aria-labelledby = "offcanvasDoksLabel" >
< div class = "header-bar d-lg-none" > < / div >
< div class = "offcanvas-header d-lg-none" >
2021-09-10 16:38:32 +02:00
< h2 class = "h5 offcanvas-title ps-2" id = "offcanvasDoksLabel" > < a class = "text-dark" href = "{{ " / " | relLangURL } } " > {{ .Site.Params.Title }}< / a > < / h2 >
2021-09-07 12:08:46 +02:00
< button type = "button" class = "btn-close text-reset me-2" data-bs-dismiss = "offcanvas" aria-label = "Close main menu" > < / button >
< / div >
2022-06-10 16:33:08 +02:00
< div class = "offcanvas-body p-4 p-lg-0" >
2022-06-20 19:46:02 +02:00
< ul class = "nav flex-column flex-lg-row align-items-lg-center mt-2 mt-lg-0 ms-lg-2 me-lg-auto" >
2021-09-07 12:08:46 +02:00
{{- $current := . -}}
2022-01-28 13:52:51 +01:00
{{- $section := $current.Section -}}
2021-09-07 12:08:46 +02:00
{{ range .Site.Menus.main -}}
{{- $active := or ($current.IsMenuCurrent "main" .) ($current.HasMenuCurrent "main" .) -}}
{{- $active = or $active (eq .Name $current.Title) -}}
2022-01-28 13:52:51 +01:00
{{- $active = or $active (and (eq .Name ($section | humanize)) (eq $current.Section $section)) -}}
2022-06-27 14:41:00 +02:00
{{- $active = or $active (and (eq .Name "Blog") (eq $current.Section "blog" "contributors" "categories" "tags")) -}}
2022-02-01 09:57:11 +01:00
{{ if .HasChildren }}
< li class = "nav-item dropdown" >
< a class = "nav-link dropdown-toggle ps-0 py-1" href = "#" id = "navbarDropdownMenuLink" role = "button" data-bs-toggle = "dropdown" aria-expanded = "false" >
{{ .Name }}
< span class = "dropdown-caret" > < svg xmlns = "http://www.w3.org/2000/svg" width = "20" height = "20" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" stroke-linecap = "round" stroke-linejoin = "round" class = "feather feather-chevron-down" > < polyline points = "6 9 12 15 18 9" > < / polyline > < / svg > < / span >
< / a >
< ul class = "dropdown-menu dropdown-menu-main shadow rounded border-0" aria-labelledby = "navbarDropdownMenuLink" >
{{ range .Children -}}
{{- $active = eq .Name $current.Title -}}
< li >
< a class = "dropdown-item{{ if $active }} active{{ end }}" href = "{{ .URL | relLangURL }}" { { if $ active } } aria-current = "true" { { end } } > {{ .Name }}< / a >
< / li >
{{ end -}}
< / ul >
< / li >
{{ else }}
< li class = "nav-item" >
< a class = "nav-link ps-0 py-1{{ if $active }} active{{ end }}" href = "{{ .URL | relLangURL }}" > {{ .Name }}< / a >
< / li >
{{ end }}
2021-09-07 12:08:46 +02:00
{{ end -}}
< / ul >
2022-06-10 16:33:08 +02:00
2022-06-25 04:20:57 +02:00
{{- $showFlexSearch := .Site.Params.options.flexSearch }}
{{- if $showFlexSearch }}
2022-06-25 05:36:32 +02:00
{{- if and (isset .Site.Params.options "searchsectionsshow") (not (eq .Site.Params.options.searchSectionsShow "ALL")) }}
2022-06-25 13:54:54 +02:00
{{- $showFlexSearch = or (eq (len .Site.Params.options.searchSectionsShow) 0) (in .Site.Params.options.searchSectionsShow .Section) (and .IsHome (in .Site.Params.options.searchSectionsShow "HomePage")) }}
2022-06-25 04:20:57 +02:00
{{- end }}
{{- end }}
{{ if $showFlexSearch -}}
2022-06-10 16:33:08 +02:00
< hr class = "text-black-50 my-4 d-lg-none" >
< form class = "doks-search position-relative flex-grow-1 ms-lg-auto me-lg-2" >
2022-07-07 12:47:20 +02:00
< input id = "search" class = "form-control is-search" type = "search" placeholder = "{{ i18n " search-text " } } " aria-label = "{{ i18n " search-text " } } " autocomplete = "off" >
2022-06-10 16:33:08 +02:00
< div id = "suggestions" class = "shadow bg-white rounded d-none" > < / div >
< / form >
{{ end -}}
< hr class = "text-black-50 my-4 d-lg-none" >
< ul class = "nav flex-column flex-lg-row" >
2021-09-07 12:08:46 +02:00
{{ range .Site.Menus.social -}}
< li class = "nav-item" >
2022-06-10 16:33:08 +02:00
< a class = "nav-link social-link" href = "{{ .URL | relURL }}" > {{ .Pre | safeHTML }}< small class = "ms-2 d-lg-none" > {{ .Name | safeHTML }}< / small > < / a >
2021-09-07 12:08:46 +02:00
< / li >
{{ end -}}
< / ul >
2021-09-10 16:38:32 +02:00
2022-06-10 16:33:08 +02:00
{{ if .Site.Params.options.darkMode -}}
< hr class = "text-black-50 my-4 d-lg-none" >
< button id = "mode" class = "btn btn-link" type = "button" aria-label = "Toggle user interface mode" >
< span class = "toggle-dark" > < svg xmlns = "http://www.w3.org/2000/svg" width = "20" height = "20" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" stroke-linecap = "round" stroke-linejoin = "round" class = "feather feather-moon" > < path d = "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" > < / path > < / svg > < / span >
< span class = "toggle-light" > < svg xmlns = "http://www.w3.org/2000/svg" width = "20" height = "20" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" stroke-linecap = "round" stroke-linejoin = "round" class = "feather feather-sun" > < circle cx = "12" cy = "12" r = "5" > < / circle > < line x1 = "12" y1 = "1" x2 = "12" y2 = "3" > < / line > < line x1 = "12" y1 = "21" x2 = "12" y2 = "23" > < / line > < line x1 = "4.22" y1 = "4.22" x2 = "5.64" y2 = "5.64" > < / line > < line x1 = "18.36" y1 = "18.36" x2 = "19.78" y2 = "19.78" > < / line > < line x1 = "1" y1 = "12" x2 = "3" y2 = "12" > < / line > < line x1 = "21" y1 = "12" x2 = "23" y2 = "12" > < / line > < line x1 = "4.22" y1 = "19.78" x2 = "5.64" y2 = "18.36" > < / line > < line x1 = "18.36" y1 = "5.64" x2 = "19.78" y2 = "4.22" > < / line > < / svg > < / span >
< / button >
{{ end -}}
2021-09-10 16:38:32 +02:00
2022-06-10 16:33:08 +02:00
{{ if eq .Site.Params.options.multilingualMode true -}}
< hr class = "text-black-50 my-4 d-lg-none" >
< div class = "dropdown" >
< button class = "btn btn-doks-light dropdown-toggle" id = "doks-languages" data-bs-toggle = "dropdown" aria-expanded = "false" data-bs-display = "static" >
{{ .Site.Params.languageName }}
< span class = "dropdown-caret" > < svg xmlns = "http://www.w3.org/2000/svg" width = "20" height = "20" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" stroke-linecap = "round" stroke-linejoin = "round" class = "feather feather-chevron-down" > < polyline points = "6 9 12 15 18 9" > < / polyline > < / svg > < / span >
< / button >
< ul class = "dropdown-menu dropdown-menu-lg-end me-lg-2 shadow rounded border-0" aria-labelledby = "doks-languages" >
< li > < a class = "dropdown-item current" aria-current = "true" href = "{{ .RelPermalink }}" > {{ .Site.Language.LanguageName }}< / a > < / li >
< li > < hr class = "dropdown-divider" > < / li >
{{ if .IsTranslated -}}
{{ range .Translations }}
< li > < a class = "dropdown-item" rel = "alternate" href = "{{ .RelPermalink }}" hreflang = "{{ .Lang }}" lang = "{{ .Lang }}" > {{ .Language.LanguageName }}< / a > < / li >
{{ end -}}
{{ else -}}
{{ range .Site.Languages -}}
{{ if ne $.Site.Language.Lang .Lang }}
< li > < a class = "dropdown-item" rel = "alternate" href = "{{ .Lang | relLangURL }}" hreflang = "{{ .Lang }}" lang = "{{ .Lang }}" > {{ .LanguageName }}< / a > < / li >
{{ end -}}
{{ end -}}
{{ end -}}
<!--
< li > < hr class = "dropdown-divider" > < / li >
< li > < a class = "dropdown-item" href = "/docs/contributing/how-to-contribute/" > Help Translate< / a > < / li >
-->
< / ul >
< / div >
2021-09-10 16:38:32 +02:00
{{ end -}}
2022-06-10 16:33:08 +02:00
{{ if eq .Site.Params.options.docsVersioning true -}}
< hr class = "text-black-50 my-4 d-lg-none" >
< div class = "dropdown" >
< button class = "btn btn-doks-light dropdown-toggle" id = "doks-versions" data-bs-toggle = "dropdown" aria-expanded = "false" data-bs-display = "static" aria-label = "Toggle version menu" >
< span class = "d-none" > Doks< / span > v{{ .Site.Params.docsVersion }}
< span class = "dropdown-caret" > < svg xmlns = "http://www.w3.org/2000/svg" width = "20" height = "20" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" stroke-linecap = "round" stroke-linejoin = "round" class = "feather feather-chevron-down" > < polyline points = "6 9 12 15 18 9" > < / polyline > < / svg > < / span >
< / button >
< ul class = "dropdown-menu dropdown-menu-lg-end me-lg-2 shadow rounded border-0" aria-labelledby = "doks-versions" >
< li > < a class = "dropdown-item current" aria-current = "true" href = "/docs/{{ .Site.Params.docsVersion }}/prologue/introduction/" > Latest ({{ .Site.Params.docsVersion }}.x)< / a > < / li >
< li > < hr class = "dropdown-divider" > < / li >
< li > < a class = "dropdown-item" href = "/docs/0.2/prologue/introduction/" > v0.2.x< / a > < / li >
< li > < a class = "dropdown-item" href = "/docs/0.1/prologue/introduction/" > v0.1.x< / a > < / li >
< li > < hr class = "dropdown-divider" > < / li >
< li > < a class = "dropdown-item" href = "/docs/versions/" > All versions< / a > < / li >
< / ul >
< / div >
2021-09-10 16:38:32 +02:00
{{ end -}}
2022-06-10 16:33:08 +02:00
< / div >
2021-09-10 16:38:32 +02:00
< / div >
2021-09-07 12:08:46 +02:00
< / nav >
< / header >
2022-06-10 16:33:08 +02:00
{{ if eq .Site.Params.options.navbarSticky true }}
2021-09-07 12:08:46 +02:00
< / div >
{{ end -}}
{{ if eq .Section "docs" -}}
2022-01-28 16:09:01 +01:00
< div class = "container-{{ if .Site.Params.options.fullWidth }}fluid{{ else }}xxl{{ end }}" >
< aside class = "doks-sidebar" >
< nav id = "doks-docs-nav" class = "collapse d-lg-none" aria-label = "Tertiary navigation" >
{{ partial "sidebar/docs-menu.html" . }}
< / nav >
< / aside >
< / div >
2022-01-28 17:16:21 +01:00
{{ else if ne .CurrentSection .FirstSection -}}
2022-06-10 16:33:08 +02:00
<!--
2022-01-28 16:09:01 +01:00
< nav class = "doks-subnavbar py-2 sticky-lg-top d-lg-none" aria-label = "Secondary navigation" >
2022-06-10 16:33:08 +02:00
< div class = "container-{{ if .Site.Params.options.fullWidth }}fluid{{ else }}xxl{{ end }} d-flex align-items-lg-center" >
2022-01-28 16:09:01 +01:00
< span class = "navbar-text ms-0" > {{ .Section | humanize }}< / span >
< button class = "btn doks-sidebar-toggle d-lg-none ms-auto order-3 collapsed" type = "button" data-bs-toggle = "collapse" data-bs-target = "#doks-docs-nav" aria-controls = "doks-docs-nav" aria-expanded = "false" aria-label = "Toggle documentation navigation" >
< svg xmlns = "http://www.w3.org/2000/svg" width = "24" height = "24" viewBox = "0 0 24 24" class = "doks doks-expand" fill = "none" stroke = "currentColor" stroke-width = "2" stroke-linecap = "round" stroke-linejoin = "round" > < title > Expand< / title > < polyline points = "7 13 12 18 17 13" > < / polyline > < polyline points = "7 6 12 11 17 6" > < / polyline > < / svg >
< svg xmlns = "http://www.w3.org/2000/svg" width = "24" height = "24" viewBox = "0 0 24 24" class = "doks doks-collapse" fill = "none" stroke = "currentColor" stroke-width = "2" stroke-linecap = "round" stroke-linejoin = "round" > < title > Collapse< / title > < polyline points = "17 11 12 6 7 11" > < / polyline > < polyline points = "17 18 12 13 7 18" > < / polyline > < / svg >
< / button >
< / div >
< / nav >
2022-06-10 16:33:08 +02:00
-->
2022-01-28 16:09:01 +01:00
2022-01-28 08:48:57 +01:00
< div class = "container-{{ if .Site.Params.options.fullWidth }}fluid{{ else }}xxl{{ end }}" >
2021-09-07 12:08:46 +02:00
< aside class = "doks-sidebar" >
< nav id = "doks-docs-nav" class = "collapse d-lg-none" aria-label = "Tertiary navigation" >
{{ partial "sidebar/docs-menu.html" . }}
< / nav >
< / aside >
< / div >
{{ end -}}