From 47906d8f84551042434ee6dd00524bad65876329 Mon Sep 17 00:00:00 2001 From: James Ray Date: Sun, 15 Aug 2021 11:33:55 -0400 Subject: [PATCH] taxonomies - add active class --- layouts/partials/navigators/taxonomies.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/layouts/partials/navigators/taxonomies.html b/layouts/partials/navigators/taxonomies.html index 53663a8..857646c 100644 --- a/layouts/partials/navigators/taxonomies.html +++ b/layouts/partials/navigators/taxonomies.html @@ -1,11 +1,15 @@ {{ $context := .context }} {{ $taxo := .taxo }} {{ $title := .title }} +{{ $class:= "" }} {{ if isset $context.Site.Taxonomies ( lower $taxo ) }} {{ $taxonomy := index $context.Site.Taxonomies ( lower $taxo ) }} {{ if (gt (len $taxonomy) 0)}} {{ range $taxonomy }} -
  • {{ .Page.Title }}
  • + {{if eq $context.Title .Page.Title}} + {{ $class = "active" }} + {{end}} +
  • {{ .Page.Title }}
  • {{ end }} {{ end }} {{ end }}