mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
♻️ Refactor: move all files in layouts/_default up to the layouts/ root (#607)
The `_default` folder is removed.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
{{- 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 -}}
|
||||
{{- $iconMap := dict
|
||||
"categories" "fa-solid fa-folder-tree"
|
||||
"collections" "fa-solid fa-layer-group"
|
||||
"tags" "fa-solid fa-tags"
|
||||
-}}
|
||||
{{- $icon := index $iconMap $taxonomies | default $iconMap.categories -}}
|
||||
|
||||
<div class="page archive">
|
||||
{{- /* Title */ -}}
|
||||
<h1 class="single-title animate__animated animate__pulse animate__faster">
|
||||
{{- dict "Class" (add $icon " fa-fw me-1") | partial "plugin/icon.html" -}}
|
||||
{{- .Params.Title | default (T $taxonomies) | default $taxonomies | dict "Some" | T "allSome" }} <sup>{{ len .Data.Terms.ByCount }}</sup>
|
||||
</h1>
|
||||
{{- /* Render different taxonomies */ -}}
|
||||
{{- $template := cond ( eq $taxonomies "tags") "tags" "taxonomies" -}}
|
||||
{{- .Render $template -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user