-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
term.html
60 lines (59 loc) · 2.36 KB
/
term.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
{{- define "title" }}
{{- $paginator := .Paginate .RegularPages .Site.Params.hb.terms.paginate }}
{{- .Store.Set "paginated" true }}
{{ partial "base/title" . }}
{{- end -}}
{{- define "main" }}
<div class="hb-blog-main-container">
<div class="hb-blog-main">
{{ partial "hugopress/functions/render-hooks" (dict "Name" "hb-blog-main-begin" "Page" .) }}
{{- if default true site.Params.hb.terms.profile }}
{{ partialCached "hb/modules/blog/term/profile" . . }}
{{- end }}
{{- $listStyle := site.Params.hb.terms.list_style }}
{{- if eq $listStyle "minimalist" }}
<div class="hb-blog-posts hb-terms-posts hb-module">
{{- range .Paginator.Pages }}
<div class="hb-blog-post hb-terms-post">
<a
class="hb-blog-post-title-link d-flex"
href="{{ .RelPermalink }}">
<span class="me-md-1">
{{ .Title }}
</span>
<span
class="hb-blog-post-meta ms-auto d-none d-md-block text-body-secondary text-nowrap">
{{ .Date | time.Format site.Params.hb.blog.post_date_format }}
</span>
</a>
</div>
{{- end }}
</div>
{{- else }}
{{- $cols := "row-cols-1 row-cols-md-2" }}
{{- if not (partialCached "hb/modules/blog/functions/has-sidebar" .) }}
{{- $cols = printf "%s row-cols-lg-3" $cols }}
{{- end }}
{{- if eq $listStyle "cascade" }}
{{ partialCached "hugomods/masonry-js/assets/js" . }}
{{- end }}
<div
{{ if eq $listStyle "cascade" }}
data-masonry="{"percentPosition": true }"
{{ end }}
class="hb-terms-posts row {{ $cols }}">
{{- range .Paginator.Pages }}
<div class="mb-3 mb-lg-4">
{{ partial "hb/modules/blog/post/card" (dict "Page" . "ListStyle" $listStyle "Caller" "list") }}
</div>
{{- end }}
</div>
{{- end }}
{{ partial "hb/modules/pagination/index" .Paginator }}
{{ partial "hugopress/functions/render-hooks" (dict "Name" "hb-blog-main-end" "Page" .) }}
</div>
<div class="hb-blog-sidebar pe-lg-1">
{{ partial "hugopress/functions/render-hooks" (dict "Name" "hb-blog-sidebar" "Page" .) }}
</div>
</div>
{{- end -}}