forked from MattSLangford/Tiny-Theme-for-Micro.blog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
list.html
48 lines (46 loc) · 1.57 KB
/
list.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
{{ define "main" }}
<div class="home h-feed">
<ul class="post-list">
{{ $paginator := .Paginate (where .Pages.ByDate.Reverse "Type" "post") (index .Site.Params "archive-paginate" | default 25) }}
{{ range $paginator.Pages }}
{{ $categories := .Params.categories }}
{{ if not (in $categories "RSSOnly") }}
<div class="post-preview h-entry {{ range $categories }}{{ . | urlize | lower }}{{ end }}">
<a href="{{ .Permalink }}" class="post-date u-url"><time class="dt-published" datetime="{{ .Date.Format "2006-01-02 15:04:05 -0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time> ∞</a>
{{ if .Title }}
<h2 class="post-title p-name"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
{{ if templates.Exists "partials/summary.html" }}
<div class="p-summary">
{{ .Summary | safeHTML }}
{{ if .Truncated }}
<p><a class="read-more" href="{{ .Permalink }}">Read More</a></p>
{{ end }}
</div>
{{ else }}
<div class="e-content">
{{ .Content }}
</div>
{{ end }}
{{ else }}
<div class="e-content">
{{ .Content }}
</div>
{{ end }}
</div>
{{ end }}
{{ end }}
</ul>
</div>
<div class="post-nav">
{{ if $paginator.HasPrev }}
<span class="prev">
<a href="{{ $paginator.Prev.URL }}" title="Previous Page"><span class="arrow">← Newer Posts</span></a>
</span>
{{ end }}
{{ if $paginator.HasNext }}
<span class="next">
<a href="{{ $paginator.Next.URL }}"><span class="arrow">Older Posts →</span></a>
</span>
{{ end }}
</div>
{{ end }}