blob: a645cbe49590ace830c0431ae382bb294f19ebd5 (
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
{{ define "main" }}
{{- $showBreadcrumbs := $.Params.showBreadcrumbs | default $.Site.Params.showBreadcrumbs | default true }}
{{- $showGeneratedList := $.Params.showGeneratedList | default $.Site.Params.showGeneratedList | default true }}
{{- $showItemMeta := $.Params.showItemMeta | default $.Site.Params.showItemMeta | default true }}
<div class="container" role="main">
<div class="row justify-content-center">
<div class="col-md-8">
{{ if eq $showBreadcrumbs true -}}
{{ partial "breadcrumbs.html" ( dict "ctx" . "output_type" "list" ) }}
{{- end }}
</div>
</div>
{{- with .Content }}
<article>
<div class="row justify-content-center">
<div class="col-md-8">
{{- . -}}
</div>
</div>
</article>
{{- end }}
{{ if eq $showGeneratedList true -}}
{{ with .Sections }}
<div class="row justify-content-center">
<div class="col-md-8">
<ul class="list-group">
{{ range . }}
<li class="list-group-item d-flex justify-content-between align-items-center">
<a href="{{.Permalink}}">{{ .Title }}</a>
<span class="badge badge-pill badge-primary">{{ len .Pages }}</span>
</li>
{{ end }}
</ul>
</div>
</div>
{{ end }}
<div class="row justify-content-center mt-3">
<div class="col-md-8 posts-list">
{{ range .Paginator.Pages }}
<article class="list-preview mt-3">
<a href="{{ .Permalink }}">
<h2 class="item-title">{{ .Title }}</h2>
{{ if .Params.subtitle }}
<h3 class="item-subtitle">
{{- .Params.subtitle -}}
</h3>
{{ end }}
</a>
{{- if eq $showItemMeta true }}
<p class="item-meta">
{{ partial "item_meta.html" . }}
</p>
{{- end }}
<div class="item-entry">
{{ if .Truncated }}
{{ .Summary }}
<a href="{{ .Permalink }}" class="post-read-more">[Read more]</a>
{{ else }}
{{ .Content }}
{{ end }}
</div>
{{ if .Params.tags }}
<div class="blog-tags">
{{ range .Params.tags }}
<a href="{{ $.Site.LanguagePrefix | absURL }}tags/{{ . | urlize }}/">{{ . }}</a>
{{ end }}
</div>
{{ end }}
</article>
{{ end }}
</div>
</div>
<div class="row justify-content-center mt-3">
<div class="col-md-8 posts-list">
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
<ul class="pagination">
{{ if .Paginator.HasPrev }}
<li class="page-item">
<a class="page-link" href="{{ .Permalink }}page/{{ .Paginator.Prev.PageNumber }}/">← Newer posts</a>
</li>
{{ end }}
{{ if .Paginator.HasNext }}
<li class="page-item">
<a class="page-link" href="{{ .Permalink }}page/{{ .Paginator.Next.PageNumber }}/">Older posts →</a>
</li>
{{ end }}
</ul>
{{ end }}
</div>
</div>
{{- end }}
</div>
{{ end }}
|