2019-11-04 13:09:44 +00:00
|
|
|
<nav class="navbar" role="navigation" aria-label="main navigation">
|
|
|
|
<div class="navbar__brand">
|
|
|
|
{{ if $.Param "logo" | default true }}
|
2020-01-10 06:49:07 +00:00
|
|
|
<a href="{{ "/" | relLangURL }}" title="{{ i18n "tooltip-home" }}" rel="home" class="{{ if eq ($.Param "logoType") "long" }}navbar__long-link{{ else }}navbar__logo-link{{ end }}">
|
2020-01-11 16:40:02 +00:00
|
|
|
<img src="{{ "/logo.png" | relURL }}" alt="Home" class="navbar__logo">
|
2019-11-04 13:09:44 +00:00
|
|
|
</a>
|
2020-01-13 01:08:14 +00:00
|
|
|
{{ else }}
|
|
|
|
|
2019-11-04 13:09:44 +00:00
|
|
|
{{ end }}
|
2020-01-10 06:49:07 +00:00
|
|
|
{{ if ne .Site.Params.logoType "long" }}
|
2020-01-10 06:13:21 +00:00
|
|
|
<a href="{{ "/" | relLangURL }}" title="{{ i18n "tooltip-home" }}" rel="home" class="navbar__title-link">
|
|
|
|
<h6 class="navbar__title">{{ .Site.Params.logoText }}</h6>
|
|
|
|
</a>
|
|
|
|
{{ end }}
|
2019-11-04 13:09:44 +00:00
|
|
|
</div>
|
2019-11-22 11:12:02 +00:00
|
|
|
|
|
|
|
{{ partial "navbar/select-theme-mobile" . }}
|
2019-11-24 14:31:28 +00:00
|
|
|
{{ partial "search/site-search-mobile" . }}
|
2019-11-22 11:12:02 +00:00
|
|
|
|
2019-11-04 13:09:44 +00:00
|
|
|
<a role="button" class="navbar__burger" aria-label="menu" aria-expanded="false">
|
|
|
|
<span aria-hidden="true"></span>
|
|
|
|
<span aria-hidden="true"></span>
|
|
|
|
<span aria-hidden="true"></span>
|
2019-11-22 11:12:02 +00:00
|
|
|
</a>
|
|
|
|
|
|
|
|
<div class="navbar__menu">
|
|
|
|
{{ partial "navbar/select-theme" . }}
|
2020-01-01 16:35:53 +00:00
|
|
|
{{ $current := . }}
|
|
|
|
{{ range .Site.Menus.main }}
|
|
|
|
{{ $active := or ($current.IsMenuCurrent "main" .) ($current.HasMenuCurrent "main" .) }}
|
|
|
|
{{ $active = or $active (eq .Name $current.Title) }}
|
|
|
|
{{ $active = or $active (eq (lower .URL) (lower $current.Title)) }}
|
2020-01-02 07:28:37 +00:00
|
|
|
{{ $active = or $active (eq (lower .URL) (lower $current.Type)) }}
|
2020-01-01 16:35:53 +00:00
|
|
|
{{ if .HasChildren }}
|
|
|
|
<div class="navbar__dropdown navbar__slide-down">
|
|
|
|
<a href="{{ .URL | relLangURL }}" class="navbar__menu-item {{ if $active }}active{{ end }}">
|
|
|
|
{{ safeHTML .Name }}
|
|
|
|
<span class="navbar__menu-icon">
|
|
|
|
{{ partial "svgs/arrow/keyboard-arrow-down.svg" (dict "width" 18 "height" 18) }}
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
<div class="navbar__dropdown--content">
|
|
|
|
{{ range .Children }}
|
|
|
|
<a href="{{ .URL | relLangURL }}" class="navbar__dropdown--item">{{ safeHTML .Name }}</a>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ else }}
|
|
|
|
<a href="{{ .URL | relLangURL }}" class="navbar__menu-item navbar__slide-down {{ if $active }}active{{ end }}">{{ safeHTML .Name }}</a>
|
|
|
|
{{ end }}
|
2019-11-04 13:09:44 +00:00
|
|
|
{{ end }}
|
|
|
|
</div>
|
2019-11-24 14:31:28 +00:00
|
|
|
</nav>
|