bobatheme/layouts/_default/list.html
BBaoVanC b03fc6c7b1
Improve list pages + support "series"
- 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)
2021-11-12 20:25:47 -06:00

59 lines
1.4 KiB
HTML

{{ define "main" }}
<h1>
{{ with .Params.icon }}{{ partial "icon.html" . }}{{ end }}
{{ .Title | markdownify }}
<span class="rss-link">
{{ with .OutputFormats.Get "rss" }}
<a href="{{ .Permalink }}" target="_blank" rel="noopener">{{ partial "icon.html" "rss-feed" }}</a>
{{ end }}
</span>
</h1>
{{ with .Sections }}
<div class="sections">
{{ range . }}
<a class="section-anchor" href="{{ .Permalink }}">
<div class="section">
<h2 class="section-title">
{{ with .Params.icon }}{{ partial "icon.html" . }}{{ end }}
{{ .Title | markdownify }}
</h2>
<div class="section-description">
{{ if .Description }}
<p>
{{ .Description | markdownify }}
</p>
{{ else }}
{{ .Summary }}
{{ end }}
</div>
</div>
</a>
{{ end }}
</div>
{{ end }}
<div class="page-list">
<ul>
{{ range .Paginator.Pages }}
<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 }}