-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathli_list.html
60 lines (54 loc) · 1.58 KB
/
li_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
49
50
51
52
53
54
55
56
57
58
59
60
{{ $item := . }}
{{/* Dynamic view adjusts to content type. */}}
{{ $icon_pack := "far" }}
{{ $icon := "fa-file-alt" }}
{{ $show_authors := false }}
{{ $show_buttons := false }}
{{ $link := $item.RelPermalink }}
{{ $target := "" }}
{{ if $item.Params.external_link }}
{{ $link = $item.Params.external_link }}
{{ $target = "target=\"_blank\" rel=\"noopener\"" }}
{{ end }}
{{ if eq $item.Type "post" }}
{{ $icon = "fa-newspaper" }}
{{ else if eq $item.Type "talk" }}
{{ $icon = "fa-calendar-alt" }}
{{ else if eq $item.Type "publication" }}
{{ $show_authors = true }}
{{ $show_buttons = true }}
{{ else if eq $item.Type "project" }}
{{ $icon_pack = "fas" }}
{{ $icon = "fa-project-diagram" }}
{{ $show_authors = true }}
{{ $show_buttons = true }}
{{ end }}
<div class="view-list-item">
<i class="{{$icon_pack}} {{$icon}} pub-icon" aria-hidden="true"></i>
{{ if eq $item.Type "talk" }}
{{ $item.Title | markdownify }}
{{ else }}
<a href="{{$link}}" {{ $target | safeHTMLAttr }}>{{ $item.Title }}</a>
{{end}}
{{ if eq $item.Type "talk" }}
<div class="article-metadata">
<span>
{{ partial "functions/get_event_dates" $item }}
</span>
{{ with $item.Params.location }}
<span class="middot-divider"></span>
<span>{{ . }}</span>
{{ end }}
</div>
{{ end }}
{{ if and $show_authors $item.Params.authors }}
<div class="article-metadata">
{{ partial "page_metadata_authors" $item }}
</div>
{{ end }}
{{ if $show_buttons }}
<div class="btn-links">
{{ partial "page_links" (dict "page" $item "is_list" 1) }}
</div>
{{ end }}
</div>