-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmp.txt
64 lines (64 loc) · 2.95 KB
/
tmp.txt
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
<!-- Start Posts -->
{{ if .Site.Params.showPosts }}
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
{{ $PageContext := . }}
{{ if .IsHome }}
{{ $PageContext = .Site }}
{{ end }}
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) 3 }}
{{ if .Content }}
<div class="content">{{ .Content }}</div>
{{ end }}
<div class="posts">
{{ range $paginator.Pages }}
<div class="post on-list">
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
<div class="post-meta">
{{ if .Date }}
<span class="post-date">
{{ .Date.Format ($.Site.Params.DateFormatList | default "2006-01-02") }}
</span>
{{ if $.Site.Params.LastModDisplay }}
{{ partial "lastmod.html" . }}
{{ end }}
{{ end }}
<br>
{{ if $.Site.Params.ShowReadingTime }}
<i class="fa-solid fa-clock"></i>
{{ i18n "readingTime" .Page.ReadingTime }}
{{ end }}
</div>
{{ if .Site.Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
<a href="{{ (urlize (printf "tags/%s" . )) | absLangURL }}/">#{{ . }}</a>
{{ end }}
</span>
{{ end }}
<div class="post-content">
{{ with .Description }}
{{ . | markdownify }}
{{ else }}
{{ if .Truncated }}
{{ .Summary }}
{{ end }}
{{ end }}
</div>
{{ if not .Site.Params.hideReadMore }}
{{ if .Site.Params.ReadMoreText }}
<div>
<a class="read-more" href="{{.RelPermalink}}">
{{ i18n "readMore"}}
</a>
</div>
{{ else }}
<div>
<a class="read-more button" href="{{.RelPermalink}}">{{ i18n "readMore"}} →</a>
</div>
{{ end }}
{{ end }}
</div>
{{ end }}
{{ end }}
<!-- End Posts -->