mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
53 lines
2.1 KiB
HTML
53 lines
2.1 KiB
HTML
{{- define "title" -}}
|
|
{{- .Title }} - {{ T .Data.Singular | default .Data.Singular -}}
|
|
{{- if .Site.Params.withSiteTitle }} {{ .Site.Params.titleDelimiter }} {{ .Site.Title }}{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{- define "content" -}}
|
|
<div class="page archive">
|
|
{{- /* Title */ -}}
|
|
{{- $taxonomy := .Data.Singular -}}
|
|
{{- $pageCount := len .Pages -}}
|
|
{{- $termIcon := .Params.titleIcon | default (dict "Taxonomy" $taxonomy "Slot" "term" | partial "function/get-taxonomy-icon.html") -}}
|
|
{{- $termTitle := .Title -}}
|
|
<h1 class="single-title animate__animated animate__pulse animate__faster">
|
|
{{- with $termIcon -}}
|
|
{{- dict "Class" (add . " me-1") | partial "plugin/icon.html" -}}
|
|
{{- end -}}
|
|
{{- $termTitle }} <sup>{{ $pageCount }}</sup>
|
|
</h1>
|
|
|
|
{{- /* Paginate */ -}}
|
|
{{- if .Pages -}}
|
|
{{- $pages := .Pages.GroupByDate "2006" -}}
|
|
{{- with .Site.Params.list.paginate | default .Site.Params.paginate -}}
|
|
{{- $pages = $.Paginate $pages . -}}
|
|
{{- else -}}
|
|
{{- $pages = .Paginate $pages -}}
|
|
{{- end -}}
|
|
{{- partial "section/recently-updated.html" . -}}
|
|
{{- range $pages.PageGroups -}}
|
|
<h2 class="group-title">
|
|
{{- dict "Class" "fa-regular fa-calendar me-1" | partial "plugin/icon.html" -}}
|
|
{{- .Key -}}
|
|
</h2>
|
|
{{- range .Pages -}}
|
|
<article class="archive-item">
|
|
<a href="{{ .RelPermalink }}" class="archive-item-link">
|
|
{{- $repost := .Params.repost | default dict -}}
|
|
{{- if eq $repost.enable true -}}
|
|
{{- dict "Class" "fa-solid fa-share text-success me-1" | partial "plugin/icon.html" -}}
|
|
{{- end -}}
|
|
{{- cond (.Param "capitalizeTitles") (title .LinkTitle) .LinkTitle -}}
|
|
</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 "base/paginator.html" . -}}
|
|
{{- end -}}
|
|
</div>
|
|
{{- end -}}
|