2018-07-09 17:41:34 +00:00
|
|
|
{{- define "title" }}{{ T .Data.Plural }} - {{ .Site.Title }}{{ end -}}
|
2017-08-27 14:38:42 +00:00
|
|
|
|
2018-07-09 17:41:34 +00:00
|
|
|
{{- define "content" -}}
|
2017-08-27 14:38:42 +00:00
|
|
|
{{ $name := .Data.Plural -}}
|
|
|
|
{{ $terms := .Data.Terms.ByCount -}}
|
|
|
|
{{ $length := len $terms -}}
|
2018-07-09 17:41:34 +00:00
|
|
|
{{ if eq $name "categories" -}}
|
2018-11-06 08:07:46 +00:00
|
|
|
<div class="terms">
|
|
|
|
<div class="terms-title">
|
2018-07-09 17:41:34 +00:00
|
|
|
{{ if eq $length 0 -}}
|
2018-01-31 14:07:50 +00:00
|
|
|
{{ T "zeroCategoryCounter" }}
|
2018-07-09 17:41:34 +00:00
|
|
|
{{- else -}}
|
2018-01-31 14:07:50 +00:00
|
|
|
{{ T "categoryCounter" $length }}
|
2018-07-09 17:41:34 +00:00
|
|
|
{{- end }}
|
2017-08-27 14:38:42 +00:00
|
|
|
</div>
|
2018-11-06 08:07:46 +00:00
|
|
|
<div class="terms-tags">
|
2018-07-09 17:41:34 +00:00
|
|
|
{{ range $key, $value := $terms -}}
|
2019-03-31 07:21:17 +00:00
|
|
|
<a class="terms-link" href="{{ $name | relLangURL }}/{{ $value.Term | urlize }}{{ if $.Site.Params.uglyURLs }}.html{{else}}/{{ end }}">
|
2017-08-27 14:38:42 +00:00
|
|
|
{{ $value.Term }}
|
2018-11-06 08:07:46 +00:00
|
|
|
<span class="terms-count">{{ len $value.Pages }}</span>
|
2017-08-27 14:38:42 +00:00
|
|
|
</a>
|
2018-07-09 17:41:34 +00:00
|
|
|
{{ end -}}
|
2017-08-27 14:38:42 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-07-09 17:41:34 +00:00
|
|
|
{{- else if eq $name "tags" -}}
|
2018-11-06 08:07:46 +00:00
|
|
|
<div class="terms">
|
|
|
|
<div class="terms-title">
|
2018-07-09 17:41:34 +00:00
|
|
|
{{ if eq $length 0 -}}
|
2018-01-31 14:07:50 +00:00
|
|
|
{{ T "zeroTagCounter" }}
|
2018-07-09 17:41:34 +00:00
|
|
|
{{- else -}}
|
2018-01-31 14:07:50 +00:00
|
|
|
{{ T "tagCounter" $length }}
|
2018-07-09 17:41:34 +00:00
|
|
|
{{- end }}
|
2017-08-27 14:38:42 +00:00
|
|
|
</div>
|
2018-11-06 08:07:46 +00:00
|
|
|
<div class="terms-tags">
|
2018-07-09 17:41:34 +00:00
|
|
|
{{- range $key, $value := $terms }}
|
2019-03-31 07:21:17 +00:00
|
|
|
<a class="terms-link" href="{{ $name | relLangURL }}/{{ $value.Term | urlize }}{{ if $.Site.Params.uglyURLs }}.html{{else}}/{{ end }}">
|
2017-08-27 14:38:42 +00:00
|
|
|
{{ $value.Term }}
|
2018-11-06 08:07:46 +00:00
|
|
|
<span class="terms-count">{{ len $value.Pages }}</span>
|
2017-08-27 14:38:42 +00:00
|
|
|
</a>
|
2018-07-09 17:41:34 +00:00
|
|
|
{{ end -}}
|
2017-08-27 14:38:42 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-07-09 17:41:34 +00:00
|
|
|
{{- end }}
|
2019-03-31 07:21:17 +00:00
|
|
|
{{- end }}
|