2020-11-04 08:26:58 +01:00
|
|
|
<div class="header-bar fixed-top"></div>
|
2020-04-16 11:41:54 +02:00
|
|
|
<header class="navbar fixed-top navbar-expand-md navbar-light">
|
2020-04-15 15:48:16 +02:00
|
|
|
<div class="container">
|
2020-04-16 14:42:09 +02:00
|
|
|
<input class="menu-btn order-0" type="checkbox" id="menu-btn">
|
2020-04-16 11:41:54 +02:00
|
|
|
<label class="menu-icon d-md-none" for="menu-btn"><span class="navicon"></span></label>
|
2021-03-04 17:53:25 +01:00
|
|
|
<a class="navbar-brand order-1 order-md-0 me-auto" href="{{ .Site.BaseURL | absURL }}">{{ .Site.Params.Title }}</a>
|
2021-03-01 16:34:43 +01:00
|
|
|
{{ if .Site.Params.options.darkMode -}}
|
2020-04-16 14:42:09 +02:00
|
|
|
<button id="mode" class="btn btn-link order-2 order-md-4" type="button" aria-label="Toggle mode">
|
2020-04-15 15:48:16 +02:00
|
|
|
<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>
|
2021-03-01 16:34:43 +01:00
|
|
|
{{ end -}}
|
2020-04-16 14:42:09 +02:00
|
|
|
<ul class="navbar-nav social-nav order-3 order-md-5">
|
2020-04-15 15:48:16 +02:00
|
|
|
{{ range .Site.Menus.social -}}
|
|
|
|
<li class="nav-item">
|
2021-03-04 17:53:25 +01:00
|
|
|
<a class="nav-link" href="{{ .URL | absURL }}">{{ .Pre | safeHTML }}<span class="ms-2 visually-hidden">{{ .Name | safeHTML }}</span></a>
|
2020-04-15 15:48:16 +02:00
|
|
|
</li>
|
|
|
|
{{ end -}}
|
|
|
|
</ul>
|
2020-04-16 11:41:54 +02:00
|
|
|
<div class="collapse navbar-collapse order-4 order-md-1">
|
2021-03-04 17:53:25 +01:00
|
|
|
<ul class="navbar-nav main-nav me-auto order-5 order-md-2">
|
2020-04-15 15:48:16 +02:00
|
|
|
{{- $current := . -}}
|
|
|
|
{{ range .Site.Menus.main -}}
|
|
|
|
{{- $active := or ($current.IsMenuCurrent "main" .) ($current.HasMenuCurrent "main" .) -}}
|
|
|
|
{{- $active = or $active (eq .Name $current.Title) -}}
|
|
|
|
{{- $active = or $active (and (eq .Name "Docs") (eq $current.Section "docs")) -}}
|
|
|
|
{{- $active = or $active (and (eq .Name "Guides") (eq $current.Section "guides")) -}}
|
|
|
|
{{- $active = or $active (and (eq .Name "Blog") (eq $current.Section "blog" "authors")) -}}
|
|
|
|
<li class="nav-item{{ if $active }} active{{ end }}">
|
2020-11-04 08:26:58 +01:00
|
|
|
<a class="nav-link" href="{{ .URL | absURL }}">{{ .Name }}</a>
|
2020-04-15 15:48:16 +02:00
|
|
|
</li>
|
|
|
|
{{ end -}}
|
|
|
|
</ul>
|
|
|
|
<div class="break order-6 d-md-none"></div>
|
2021-03-01 16:34:43 +01:00
|
|
|
{{ if .Site.Params.options.flexSearch -}}
|
2020-04-15 15:48:16 +02:00
|
|
|
<form class="navbar-form flex-grow-1 order-7 order-md-3">
|
2020-11-04 08:26:58 +01:00
|
|
|
<input id="userinput" class="form-control is-search" type="search" placeholder="Search docs..." aria-label="Search docs..." autocomplete="off">
|
|
|
|
<div id="suggestions" class="shadow bg-white rounded"></div>
|
2020-04-15 15:48:16 +02:00
|
|
|
</form>
|
2021-03-01 16:34:43 +01:00
|
|
|
{{ end -}}
|
2020-04-15 15:48:16 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</header>
|