taxonomies - added taxonmies support (#396)
* taxonomies - added taxonmies support * taxonomies - add active class * Update CSS Signed-off-by: hossainemruz <hossainemruz@gmail.com> * Fix tag link for multilingual mode + add translations Signed-off-by: hossainemruz <hossainemruz@gmail.com> Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
This commit is contained in:
parent
6d98c15136
commit
7b92452e2b
20 changed files with 252 additions and 1 deletions
15
layouts/partials/navigators/taxonomies.html
Normal file
15
layouts/partials/navigators/taxonomies.html
Normal file
|
@ -0,0 +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 }}
|
||||
{{if eq $context.Title .Page.Title}}
|
||||
{{ $class = "active" }}
|
||||
{{end}}
|
||||
<li><a class="taxonomy-term {{ $class }}" href="{{ .Page.Permalink }}" data-taxonomy-term="{{ urlize .Page.Title }}"><span class="taxonomy-label">{{ .Page.Title }}</span></a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue