Wrap tags list in a .taxonomies <div>
Put two <ul.tags> elements inside so there's not an <li> with a triangle in it.
This commit is contained in:
parent
ea9fb02aaa
commit
8aed72a94d
2 changed files with 40 additions and 33 deletions
|
@ -1,24 +1,28 @@
|
|||
{{- if or .Params.categories .Params.tags -}}
|
||||
<ul class="tags">
|
||||
{{- if .Params.categories -}}
|
||||
{{- $categories := .GetTerms "categories" -}}
|
||||
{{- if gt (len $categories) 1 -}}
|
||||
{{- errorf "More than one category for %q" .Path -}}
|
||||
<div class="taxonomies">
|
||||
{{- if or .Params.categories .Params.tags -}}
|
||||
<ul class="tags">
|
||||
{{- if .Params.categories -}}
|
||||
{{- $categories := .GetTerms "categories" -}}
|
||||
{{- if gt (len $categories) 1 -}}
|
||||
{{- errorf "More than one category for %q" .Path -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with index (.GetTerms "categories") 0 -}}
|
||||
<li class="category"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
|
||||
{{- if and .Params.categories .Params.tags -}}
|
||||
<div class="chevron noselect">⏵</div>
|
||||
{{- end -}}
|
||||
|
||||
{{- with index (.GetTerms "categories") 0 -}}
|
||||
<li class="category"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
||||
<ul class="tags">
|
||||
{{- if .Params.tags -}}
|
||||
{{- range .GetTerms "tags" -}}
|
||||
<li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
{{- end -}}
|
||||
|
||||
{{- if and .Params.categories .Params.tags -}}
|
||||
<li class="chevron noselect">⏵</li>
|
||||
{{- end -}}
|
||||
|
||||
{{- if .Params.tags -}}
|
||||
{{- range .GetTerms "tags" -}}
|
||||
<li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue