-
-
Notifications
You must be signed in to change notification settings - Fork 370
/
Copy pathindex.html
97 lines (89 loc) · 2.76 KB
/
index.html
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
{{ define "main" }}
<div
class="post {{ with .Site.Params.doNotLoadAnimations }}
.
{{ else }}
animated fadeInDown
{{ end }}"
>
<div class="post__content">
{{ .Content }}
</div>
<!-- (Optional) Home
-- on top of `mainSections` content (aka posts) ;
-- as declared in content/_index.md
One can set `mainSections = [""]` and have the content/_index.md specified here
-->
</div>
{{ if .Params.mainSectionsTitle }}
<div
class="post {{ with .Site.Params.doNotLoadAnimations }}
.
{{ else }}
animated fadeInDown
{{ end }}"
>
<div class="post__content">
<h2>{{ .Params.mainSectionsTitle }}</h2>
</div>
</div>
{{ end }}
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
{{ range $paginator.Pages }}
<div
class="post {{ with .Site.Params.doNotLoadAnimations }}
.
{{ else }}
animated fadeInDown
{{ end }}"
>
{{ if .Params.thumbnail }}
<div class="post__thumbnail-wrapper">
<a href="{{ .RelPermalink }}">
<img class="post__thumbnail" src="{{ .Params.thumbnail | relURL }}" alt="Thumbnail image" loading="lazy" />
</a>
</div>
{{ end }}
<div class="post__content">
<h3><a href="{{ .RelPermalink }}">{{ upper .Title }}</a></h3>
{{ if .Site.Params.fullPostContent }}
<p>{{ .Content | markdownify }}</p>
{{ else }}
<p>{{ .Summary | markdownify }}</p>
{{ end }}
<!-- add read more -->
{{- if and (.Truncated) (.Site.Params.readMore) -}}
<a href="{{ .RelPermalink }}">{{ i18n "read_more" }}</a>
{{- end -}}
</div>
<!-- -->
<div class="post__footer">
<em class="fas fa-calendar-day"></em>
<span class="post__footer-date"
>{{ if isset .Site.Params "indexdateformat" }}
{{ if .Site.Params.localizedDates }}
{{ time.Format .Site.Params.indexDateFormat .Date }}
{{ else }}
{{ .Date.Format .Site.Params.indexDateFormat }}
{{ end }}
{{ else }}
{{ if .Site.Params.localizedDates }}
{{ time.Format "Mon, Jan 2, 2006" .Date }}
{{ else }}
{{ .Date.Format "Mon, Jan 2, 2006" }}
{{ end }}
{{ end }}</span
>
{{ with .Page.Params.Categories }}
{{ partial "taxonomy/categories.html" . }}
{{ end }}
{{ with .Page.Params.Tags }}
{{ partial "taxonomy/tags.html" . }}
{{ end }}
</div>
</div>
{{ end }}
<div class="pagination">
{{ template "partials/pagination.html" . }}
</div>
{{ end }}