diff options
Diffstat (limited to 'layouts/partials/navigation.html')
-rw-r--r-- | layouts/partials/navigation.html | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/layouts/partials/navigation.html b/layouts/partials/navigation.html new file mode 100644 index 0000000..829893f --- /dev/null +++ b/layouts/partials/navigation.html @@ -0,0 +1,6 @@ +{{ $type := .Type }} +{{ $kind := .Kind }} +{{ $currentPage := . }} +{{ range .Site.Menus.main }} + <li class="sidebar-item {{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} is-active{{ end }}{{ if and (eq .Identifier "home") (eq $type "post") }} is-active{{ end }}{{ if and (eq .Identifier "home") (and (eq $type "page") (eq $kind "taxonomy"))}} is-active{{ end }}"><a class="sidebar-link" href="{{ .URL }}">{{ .Name }}</a></li> +{{ end }} |