sat-sw-website/themes/minimal-theme/layouts/partials/terms.html

25 lines
618 B
HTML
Raw Normal View History

2023-12-08 10:56:22 +01:00
{{- /*
For a given taxonomy, renders a list of terms assigned to the page.
@context {page} page The current page.
@context {string} taxonomy The taxonony.
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
*/}}
{{- $page := .page }}
{{- $taxonomy := .taxonomy }}
{{- with $page.GetTerms $taxonomy }}
{{- $label := (index . 0).Parent.LinkTitle }}
<div>
2023-12-11 10:53:38 +01:00
<div class="container text-center">
<ul>
{{- range . }}
<a class="badge px-2 py-2 text-bg-primary" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
{{- end }}
</ul>
</div>
2023-12-08 10:56:22 +01:00
</div>
{{- end }}