mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
51 lines
1.8 KiB
HTML
51 lines
1.8 KiB
HTML
{{- define "title" -}}
|
|
{{- .Title }} - {{ T .Data.Singular | default .Data.Singular }} - {{ .Site.Title -}}
|
|
{{- end -}}
|
|
|
|
{{- define "content" -}}
|
|
<div class="page archive">
|
|
{{- /* Title */ -}}
|
|
{{- $taxonomy := .Data.Singular -}}
|
|
{{- $pageCount := len .Pages -}}
|
|
{{- $termIcon := "" -}}
|
|
{{- $termTitle := .Title -}}
|
|
{{- if eq $taxonomy "category" -}}
|
|
{{- $termIcon = "fa-regular fa-folder-open fa-fw" -}}
|
|
{{- else if eq $taxonomy "tag" -}}
|
|
{{- $termIcon = "fa-solid fa-tag fa-fw" -}}
|
|
{{- else if eq $taxonomy "collections" -}}
|
|
{{- $termIcon = "fa-solid fa-layer-group fa-fw" -}}
|
|
{{- else -}}
|
|
{{- $termTitle = printf "%v - %v" (T $taxonomy | default $taxonomy) .Title -}}
|
|
{{- end -}}
|
|
<h2 class="single-title animate__animated animate__pulse animate__faster">
|
|
{{- with $termIcon -}}
|
|
{{- dict "Class" . | partial "plugin/icon.html" }}
|
|
{{ end -}}
|
|
{{ $termTitle }} <sup>{{- $pageCount -}}</sup>
|
|
</h2>
|
|
|
|
{{- /* Paginate */ -}}
|
|
{{- if .Pages -}}
|
|
{{- $pages := .Pages.GroupByDate "2006" -}}
|
|
{{- with .Site.Params.list.paginate | default .Site.Params.paginate -}}
|
|
{{- $pages = $.Paginate $pages . -}}
|
|
{{- else -}}
|
|
{{- $pages = .Paginate $pages -}}
|
|
{{- end -}}
|
|
{{- range $pages.PageGroups -}}
|
|
<h3 class="group-title">{{ .Key }}</h3>
|
|
{{- range .Pages -}}
|
|
<article class="archive-item">
|
|
<a href="{{ .RelPermalink }}" class="archive-item-link">{{- .Title -}}</a>
|
|
<span class="archive-item-date" title='{{ "2006-01-02 15:04:05" | .Date.Format }}'>
|
|
{{- .Date | dateFormat ($.Site.Params.list.dateFormat | default "01-02") -}}
|
|
</span>
|
|
</article>
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- partial "paginator.html" . -}}
|
|
{{- end -}}
|
|
</div>
|
|
{{- end -}}
|