♻️ Refactor: move all files in layouts/_default up to the layouts/ root (#607)

The `_default` folder is removed.
This commit is contained in:
Cell
2025-06-19 11:51:52 +08:00
committed by GitHub
parent ad092e7f72
commit 6123eaac2c
29 changed files with 9 additions and 5 deletions
+25
View File
@@ -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 -}}