blob: 636ef441d27b55a212fe4603c0a0dd0011b4bf07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
{{ define "main" }}
{{ partial "list/header.html" . }}
{{ $pages := .RegularPages }}
{{ if .IsHome }}
{{ $pages = where .Site.RegularPages "Type" "in" $.Site.Params.mainSections }}
{{ else if eq .Kind "section" }}
{{ $pages = slice }}
{{ range .Site.RegularPages }}
{{ if $.IsAncestor . }}
{{ $pages = append . $pages}}
{{ end }}
{{ end }}
{{ end }}
<div class="p-strip is-wrapper posts">
<div class="row">
{{ range (.Paginate $pages).Pages }}
{{ $hasPostInfo := or .Params.Date (or .Params.Authors .Params.Author) }}
<div class="col-12">
<div class="p-card">
<!--
H3 is not in a sequentially-descending order which is not good for accessibility.
However, we still want the visual appearance of H3. Fortunately, Vanilla has a CSS class for that.
-->
<h2 class="p-heading--3"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
{{/* Check to see if it has post info. */}}
{{ if or .Params.Date (or .Params.Authors .Params.Author) }}
<p>{{ partial "list/post-info.html" . }}</p>
{{ end }}
{{ if .Summary }}
<p>{{ .Summary }}</p>
{{ end }}
{{ if .Params.tags }}
<p>{{ partial "list/tags.html" . }}</p>
{{ end }}
{{ if .Truncated }}
<p>
<a href="{{ .Permalink }}">
{{ i18n "readMore" | default "Read more" }}<span class="u-off-screen"> of {{ .Title }}</span>
</a>
</p>
{{ end }}
</div>
</div>
{{end}}
</div>
</div>
<div class="p-strip is-wrapper">
<div class="row">
{{ partial "list/pagination.html" . }}
</div>
</div>
{{ end }}
|