Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/tosi29/inkblotty.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortosi29 <tosi16@gmail.com>2019-06-08 19:21:34 +0300
committertosi29 <tosi16@gmail.com>2019-06-08 19:21:34 +0300
commitc493b61850b2b74a822dea64c3b70e02adcdcd8c (patch)
treeb1abd628600afeaf115124575310c5b3d7ebffb8
parentc6cb6ece2001349c41145ae1eb16fbab318d3f88 (diff)
Fix url matching in nav
-rw-r--r--layouts/partials/header.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index eba930c..881627a 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -12,7 +12,7 @@
{{- $currentNode := . }}
{{- range sort .Site.Menus.main }}
{{- if .Name}}
- <li class="menu-item {{if eq $currentNode.Params.url .URL }} current-menu-item current_page_item {{end}}"><a class="menu__link" href="{{ .URL }}">{{ .Name | upper }}</a></li>
+ <li class="menu-item {{if eq ($.Permalink|absURL) (.URL|absURL) }} current-menu-item current_page_item {{end}}"><a class="menu__link" href="{{ .URL }}">{{ .Name | upper }}</a></li>
{{- end }}
{{- end }}
</ul>
@@ -20,7 +20,7 @@
{{- $currentNode := . }}
{{- range sort .Site.Menus.main }}
{{- if .Name}}
- <option value="{{ .URL }}" class="menu-item menu-item-type-custom menu-item-object-custom" {{if eq $currentNode.Params.url .URL }} selected="selected" {{end}}>{{ .Name | upper }}</option>
+ <option value="{{ .URL }}" class="menu-item menu-item-type-custom menu-item-object-custom" {{if eq ($.Permalink|absURL) (.URL|absURL) }} selected="selected" {{end}}>{{ .Name | upper }}</option>
{{- end }}
{{- end }}
</select>