-
Notifications
You must be signed in to change notification settings - Fork 0
/
category.tmpl
51 lines (40 loc) · 1.01 KB
/
category.tmpl
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
{{- define "sonic_theme_paper_mod/category" -}}
<!DOCTYPE html>
<html lang="zh" dir="auto">
<head>
<title>{{.category.Name}} - {{ .blog_title }}</title>
{{ template "sonic_theme_paper_mod/module/head" .}}
</head>
<body class="list" id="top">
{{template "sonic_theme_paper_mod/module/header" .}}
<main class="main">
<header class="page-header">
<h1>
{{.category.Name}}
</h1>
</header>
{{ template "sonic_theme_paper_mod/module/post-entry" . }}
<footer class="page-footer">
{{if (gt .posts.Pages 1)}}
{{$pagination:=(categoryPostsPagination .posts.PageNum .posts.Pages 3)}}
{{if $pagination.HasPrev}}
<nav class="pagination">
<a class="prev" href="{{$pagination.PrevPageFullPath}}">
« Prev
</a>
</nav>
{{end}}
{{if $pagination.HasNext}}
<nav class="pagination">
<a class="next" href="{{$pagination.NextPageFullPath}}">
Next »
</a>
</nav>
{{end}}
{{end}}
</footer>
</main>
{{template "sonic_theme_paper_mod/module/footer" .}}
</body>
</html>
{{end}}