-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
/
Copy pathlist.html
40 lines (35 loc) · 1.19 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
{{- define "main" -}}
{{/* Author profile page. */}}
{{/* If an account has not been created for this user, just display their name as the title. */}}
{{ if not .File }}
<div class="universal-wrapper pt-3">
<h1>{{ .Title }}</h1>
</div>
{{ end }}
<section id="profile-page" class="pt-5">
<div class="container">
{{/* Show the About block if an account exists for this user. */}}
{{/* TODO: remove dependency on v1 blocks. Either migrate to v2 blocks(?) or directly implement layout here. */}}
{{ if .File }}
{{ $widget := "blocks/v1/about.html" }}
{{ $username := (path.Base .File.Dir) }}{{/* Alternatively, use `index .Params.authors 0` */}}
{{ $params := dict "wcPage" $ "wcBlock" . "author" $username }}
{{ partial $widget $params }}
{{end}}
{{ $query := where .Pages ".IsNode" false }}
{{ $count := len $query }}
{{ if $count }}
<div class="article-widget content-widget-hr">
<h3>{{ i18n "user_profile_latest" | default "Latest" }}</h3>
<ul>
{{ range $query }}
<li>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
</div>
{{ end }}
</div>
</section>
{{- end -}}