blob: c3790a0d294788500f3da400d5b8294ac21fe5a9 (
plain)
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
|
{{ define "list" }}
<div>
{{ range $category, $papers := .Papers.List }}
{{ $paperCount := len $papers }}
{{ if ge $paperCount 1 }}
<h2 id="{{ $category }}">
<a class="category-title" href="#{{ $category }}">{{ $category }}</a>
</h2>
{{ range $path, $paper := $papers }}
<div class="paper">
{{ if $paper.Meta.Title }}
<a class="paper-title" href='/download/{{ $path }}' title='{{ normalizeStr $paper.Meta.Title }}'>{{- normalizeStr $paper.Meta.Title }}</a>
<br />
{{ else }}
<a class="paper-title" href='/download/{{ $path }}' title='{{ $paper.PaperName }}'> {{- $paper.PaperName }}</a>
<br />
{{ end }}
<div class="paper-meta">
{{ $contCount := len $paper.Meta.Contributors }}
{{ if ge $contCount 1 }}
{{- range $index, $contributor := $paper.Meta.Contributors -}}
{{- if $index }}, {{ end -}}
{{- $contributor.FirstName }} {{ $contributor.LastName -}}
{{- end -}}
<br />
{{ end }}
{{ $hasVal := false }}
{{ if $paper.Meta.PubYear }}
{{ $hasVal = true }}
<span class="paper-year">{{ $paper.Meta.PubYear }}</span>
{{ end }}
{{ if $paper.Meta.DOI }}
{{ if $hasVal }}- {{end}}
<a href="https://doi.org/{{ $paper.Meta.DOI }}">{{ $paper.Meta.DOI }}</a>
{{ else if $paper.Meta.ArxivID }}
{{ if $hasVal }}- {{ end }}
<a href="https://arxiv.org/abs/{{ $paper.Meta.ArxivID }}"> {{- $paper.Meta.ArxivID }}</a>
{{ else if $paper.Meta.Resource }}
{{ if $hasVal }}- {{ end }}
<a href="{{ $paper.Meta.Resource }}">{{ $paper.Meta.Resource }}</a>
{{ end }}
{{ if $paper.Meta.Journal }}
{{ if $hasVal }}- {{ end }}
{{ $paper.Meta.Journal }}
{{ end }}
</div>
</div>
{{ end }}
{{ end }}
{{ end }}
</div>
{{ end }}
|