mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-05 16:35:59 -06:00
BBaoVanC
b03fc6c7b1
- Use a <ul>: better accessibility - Background for individual pages in the list, giving a better feeling of separation - Support "series" taxonomy (displayed oldest to newest)
63 lines
1.3 KiB
HTML
63 lines
1.3 KiB
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 if eq .Data.Singular "series" }}
|
|
{{ partial "icon.html" "files" }}
|
|
{{ 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 }}
|
|
|
|
|
|
{{ $items := .Paginator.Pages }}
|
|
{{ if eq .Data.Singular "series" }}
|
|
{{ $items = .Paginator.Pages.Reverse }}
|
|
{{ end }}
|
|
<div class="page-list">
|
|
<ul>
|
|
{{ range $items }}
|
|
<li>{{ .Render "summary" }}</li>
|
|
{{ else }}
|
|
<div>
|
|
{{ i18n "no_posts" }}
|
|
</div>
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
{{ if gt .Paginator.TotalPages 1 }}
|
|
<div class="pagination">
|
|
{{ template "_internal/pagination.html" . }}
|
|
</div>
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|