he
This commit is contained in:
parent
70e20d65cf
commit
256abc59b3
1 changed files with 3 additions and 3 deletions
|
@ -31,18 +31,18 @@
|
||||||
{{ $current := . }}
|
{{ $current := . }}
|
||||||
{{ range .Site.Menus.main.ByWeight }}
|
{{ range .Site.Menus.main.ByWeight }}
|
||||||
{{ $active := "" }}
|
{{ $active := "" }}
|
||||||
{{ $menu_item_url := .URL | relLangURL }}
|
{{ $menu_item_url := (.URL | relLangURL) }}
|
||||||
{{ $page_url:= $current.RelPermalink | relLangURL }}
|
{{ $page_url:= $current.RelPermalink | relLangURL }}
|
||||||
|
|
||||||
{{ if eq $menu_item_url $page_url }}
|
{{ if eq $menu_item_url $page_url }}
|
||||||
{{ $active = "active" }}
|
{{ $active = "active" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if (and (hasPrefix $page_url $menu_item_url) (not (eq $menu_item_url "/"))) }}
|
{{ if (and (hasPrefix $page_url $menu_item_url) (not (eq $menu_item_url ("/" | relLangURL)))) }}
|
||||||
{{ $active = "active" }}
|
{{ $active = "active" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="header-nav-item">
|
<div class="header-nav-item">
|
||||||
<a
|
<a
|
||||||
href="{{ .URL }}"
|
href="{{ relLangUrl .URL }}"
|
||||||
class="link{{ if .Params.customClass }} {{ .Params.customClass }}{{ end }} {{ $active }}">
|
class="link{{ if .Params.customClass }} {{ .Params.customClass }}{{ end }} {{ $active }}">
|
||||||
{{ $title := .Title }}
|
{{ $title := .Title }}
|
||||||
{{ with (index site.Params .Identifier) }}
|
{{ with (index site.Params .Identifier) }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue