Initial Commit
This commit is contained in:
27
themes/hugo-coder/layouts/partials/terms.html
Normal file
27
themes/hugo-coder/layouts/partials/terms.html
Normal file
@ -0,0 +1,27 @@
|
||||
<section class="container taxonomy">
|
||||
<h1 class="title">
|
||||
<a class="title-link" href="{{ .Permalink | safeURL }}">
|
||||
{{- if eq .Kind "term" -}}
|
||||
{{- i18n .Data.Plural | title -}}
|
||||
{{- print ": " -}}
|
||||
{{- end -}}
|
||||
{{- i18n (lower .Title) | default .Title | title -}}
|
||||
</a>
|
||||
</h1>
|
||||
{{ .Content }}
|
||||
<ul>
|
||||
{{ $type := .Type }}
|
||||
{{ range $key, $value := .Data.Terms.Alphabetical }}
|
||||
{{ $name := .Name }}
|
||||
{{ $count := .Count }}
|
||||
{{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
|
||||
<li>
|
||||
<span class="taxonomy-element">
|
||||
<a href="{{ .Permalink }}">{{ .Name }}</a>
|
||||
<sup>{{ $count }}</sup>
|
||||
</span>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</section>
|
Reference in New Issue
Block a user