Files
FixIt/layouts/taxonomy/terms.html
T
Cell 142e933fa2 🐛 Fix: change template lookup order to fit Hugo 0.146.0 (#579)
fixed found no layout file for "html" kind "section" and "term"
2025-04-11 11:52:30 +08:00

29 lines
1.1 KiB
HTML

{{- define "title" -}}
{{- .Params.Title | default (T .Data.Plural) | default .Data.Plural | dict "Some" | T "allSome" -}}
{{- if .Site.Params.withSiteTitle }} {{ .Site.Params.titleDelimiter }} {{ .Site.Title }}{{- end -}}
{{- end -}}
{{- define "content" -}}
{{- $taxonomies := .Data.Plural -}}
<div class="page archive">
{{- $termsIcon := "" -}}
{{- if eq $taxonomies "categories" -}}
{{- $termsIcon = "fa-solid fa-folder-tree" -}}
{{- else if eq $taxonomies "tags" -}}
{{- $termsIcon = "fa-solid fa-tags" -}}
{{- else if eq $taxonomies "collections" -}}
{{- $termsIcon = "fa-solid fa-layer-group" -}}
{{- end -}}
{{- /* Title */ -}}
<h1 class="single-title animate__animated animate__pulse animate__faster">
{{- with $termsIcon -}}
{{- dict "Class" (add . " fa-fw me-1") | partial "plugin/icon.html" -}}
{{- end -}}
{{- .Params.Title | default (T $taxonomies) | default $taxonomies | dict "Some" | T "allSome" }} <sup>{{ len .Data.Terms.ByCount }}</sup>
</h1>
{{- /* Render miscellaneous terms */ -}}
{{- .Render $taxonomies -}}
</div>
{{- end -}}