bobatheme/layouts/taxonomy/list.html
2021-11-09 17:27:36 -06:00

50 lines
987 B
HTML

{{ define "main" }}
<h1>
{{ if eq .Data.Singular "tag" }}
{{ partial "icon.html" "tag" }}
{{ else if eq .Data.Singular "author" }}
{{ partial "icon.html" "user-circle" }}
{{ else }}
{{ partial "icon.html" "filter" }}
{{ end }}
{{ .Title }}
{{ if eq .Kind "term" }}
<span class="rss-link">
{{ with .OutputFormats.Get "rss" }}
<a href="{{ .Permalink }}" target="_blank" rel="noopener">{{ partial "icon.html" "rss-feed" }}</a>
{{ end }}
</span>
{{ end }}
</h1>
{{ if eq .Kind "taxonomy" }}
<ul>
{{ range .Pages }}
<li>
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</li>
{{ end }}
</ul>
{{ else }}
{{ range .Paginator.Pages }}
{{ .Render "summary" }}
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
{{ if gt .Paginator.TotalPages 1 }}
<div class="pagination">
{{ template "_internal/pagination.html" . }}
</div>
{{ end }}
{{ end }}
{{ end }}