mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
36 lines
1.4 KiB
HTML
36 lines
1.4 KiB
HTML
{{- $categories := slice -}}
|
|
{{- range .GetTerms "categories" -}}
|
|
{{- $categories = $categories | append (
|
|
printf `<a href="%v" class="post-category" title="%v">%v %v</a>`
|
|
(partial "function/escapeurl.html" .RelPermalink)
|
|
(printf "%v - %v" (T "category") .LinkTitle)
|
|
(dict "Class" "fa-regular fa-folder" | partial "plugin/icon.html")
|
|
.LinkTitle
|
|
) -}}
|
|
{{- end -}}
|
|
{{- $categoriesStr := delimit $categories " " -}}
|
|
|
|
{{- $collections := slice -}}
|
|
{{- range .GetTerms "collections" -}}
|
|
{{- $collections = $collections | append (
|
|
printf `<a href="%v" class="post-collection" title="%v">%v %v</a>`
|
|
(partial "function/escapeurl.html" .RelPermalink)
|
|
(printf "%v - %v" (T "collection") .LinkTitle)
|
|
(dict "Class" "fa-solid fa-layer-group" | partial "plugin/icon.html")
|
|
.LinkTitle
|
|
) -}}
|
|
{{- end -}}
|
|
{{- $collectionStr := delimit $collections " " -}}
|
|
|
|
{{- if .Params.categories | or .Params.collections -}}
|
|
<span class="post-included-in">
|
|
{{- if not .Params.collections -}}
|
|
{{- dict "Categories" $categoriesStr | T "single.includedIn.categories" | safeHTML -}}
|
|
{{- else if not .Params.categories -}}
|
|
{{- dict "Collections" $collectionStr | T "single.includedIn.collections" | safeHTML -}}
|
|
{{- else -}}
|
|
{{- dict "Categories" $categoriesStr "Collections" $collectionStr | T "single.includedIn.both" | safeHTML -}}
|
|
{{- end -}}
|
|
</span>
|
|
{{- end -}}
|