|
@@ -1,4 +1,6 @@
|
|
|
{{ $current_page := . }}
|
|
|
+{{ $highlight_active_link := site.Params.main_menu.highlight_active_link | default true }}
|
|
|
+{{ $show_current_language := site.Params.main_menu.show_language | default false }}
|
|
|
|
|
|
{{/* Get site logo. */}}
|
|
|
{{ $show_logo := site.Params.main_menu.show_logo | default true }}
|
|
@@ -90,7 +92,7 @@
|
|
|
{{ end }}
|
|
|
|
|
|
<li class="nav-item">
|
|
|
- <a class="nav-link {{if $is_link_in_current_path }} active{{end}}" href="{{.URL | relLangURL}}"{{ if and $is_widget_page $is_same_page }} data-target="{{$hash}}"{{ end }}{{ ($.Scratch.Get "target") | safeHTMLAttr }}>
|
|
|
+ <a class="nav-link {{if and $highlight_active_link $is_link_in_current_path }} active{{end}}" href="{{.URL | relLangURL}}"{{ if and $is_widget_page $is_same_page }} data-target="{{$hash}}"{{ end }}{{ ($.Scratch.Get "target") | safeHTMLAttr }}>
|
|
|
{{- .Pre -}}<span>{{ .Name | safeHTML }}</span>{{- .Post -}}
|
|
|
</a>
|
|
|
</li>
|
|
@@ -151,8 +153,11 @@
|
|
|
|
|
|
{{ if .IsTranslated }}
|
|
|
<li class="nav-item dropdown i18n-dropdown">
|
|
|
- <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown" aria-haspopup="true">
|
|
|
- <i class="fas fa-globe mr-1" aria-hidden="true"></i><span class="d-none d-lg-inline">{{ index site.Data.i18n.languages .Lang }}</span>
|
|
|
+ <a href="#" class="nav-link {{ if $show_current_language }}dropdown-toggle{{end}}" data-toggle="dropdown" aria-haspopup="true">
|
|
|
+ <i class="fas fa-globe mr-1" aria-hidden="true"></i>
|
|
|
+ {{- if $show_current_language -}}
|
|
|
+ <span class="d-none d-lg-inline">{{ index site.Data.i18n.languages .Lang }}</span>
|
|
|
+ {{- end -}}
|
|
|
</a>
|
|
|
<div class="dropdown-menu">
|
|
|
<div class="dropdown-item dropdown-item-active">
|