www.byjp.me/layouts/_default/list.html
JP Hastings-Spital a779a3908f Fix tags
2024-05-17 14:37:29 +01:00

44 lines
1.9 KiB
HTML

{{ define "main" }}
{{ $paginator := .Paginate .Pages }}
<main class="posts" {{ if eq .Kind "taxonomy" }}data-pagefind-ignore{{ end }}>
{{ partial "generic-list-header.html" . }}
<hgroup class="post-title">
<h1 class="p-name">
{{ with .Params.emoji }}<span data-emoji="{{.}}"></span>{{end}}
<a href="{{ .RelPermalink }}" class="noaccent u-url">{{ title (replace .Title "-" " ") }}</a>
</h1>
{{ partial "alternates.html" . }}
</hgroup>
{{ if .Content }}
<div class="content" data-pagefind-body data-pagefind-filter="type:{{.Type | title}}">{{ .Content }}</div>
{{ end }}
{{ range $paginator.Pages.GroupByDate "2006" }}
<div class="posts-group">
<div class="post-year">{{ .Key }}</div>
<ul class="posts-list">
{{ range .Pages }}
<li class="post-item">
<a href="{{.RelPermalink}}{{ if hasPrefix .RelPermalink "/tags/" }}#{{ end }}">
{{ if .Params.emoji }}<span class="post-emoji">{{ .Params.emoji }}</span>{{ end }}
<span class="post-title">{{ partial "page-title.txt" . }}</span>
<span class="post-day">
{{ if .Site.Params.dateformShort }}
{{ .Date.Format .Site.Params.dateformShort }}
{{ else }}
{{ .Date.Format "Jan 2"}}
{{ end }}
</span>
</a>
</li>
{{ end }}
</ul>
</div>
{{ end }}
{{ partial "pagination-list.html" . }}
</main>
{{ end }}