diff options
author | Jordan <me@jordan.im> | 2021-03-09 11:03:01 -0700 |
---|---|---|
committer | Jordan <me@jordan.im> | 2021-03-09 11:03:01 -0700 |
commit | 93685ba170c63c6509314a72d83e3d2096ed5ab7 (patch) | |
tree | 762e23938659066d9d3058c8232c63f8659c149c /templates/list.html | |
parent | 4995d7225bde030e4dc61f2f3bd2e66945cc464d (diff) | |
download | crane-93685ba170c63c6509314a72d83e3d2096ed5ab7.tar.gz crane-93685ba170c63c6509314a72d83e3d2096ed5ab7.zip |
support arxiv, parsing improvements
Diffstat (limited to 'templates/list.html')
-rw-r--r-- | templates/list.html | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/templates/list.html b/templates/list.html index 8f6382d..9e139b9 100644 --- a/templates/list.html +++ b/templates/list.html @@ -14,10 +14,20 @@ <span class="title"><a href='/download/{{ $path }}' title='{{ $paper.PaperName }}'>{{ $paper.PaperName }}</a></span><br> {{ end }} - {{ if $paper.Meta.Title }} + {{ $contCount := len $paper.Meta.Contributors }}{{ if ge $contCount 1 }} <span class="authors">{{ range $index, $contributor := $paper.Meta.Contributors }}{{if $index}}, {{end}}{{ $contributor.FirstName }} {{ $contributor.LastName }}{{end}}</span><br> - <span class="year">{{ $paper.Meta.PubYear }}</span> - <span class="doi"><a href="https://doi.org/{{ $paper.Meta.DOI }}">{{ $paper.Meta.DOI }}</a></span> - <span class="journal">{{ $paper.Meta.Journal }}</span> {{ end }} + + {{ $hasVal := false }} + {{ if $paper.Meta.PubYear }}{{ $hasVal = true }}<span class="year">{{ $paper.Meta.PubYear }}</span>{{ end }} + + {{ if $paper.Meta.DOI }}{{ if $hasVal }}- {{end}}<span class="doi"><a href="https://doi.org/{{ $paper.Meta.DOI }}">{{ $paper.Meta.DOI }}</a></span> + + {{ else if $paper.Meta.ArxivID }}{{ if $hasVal }}- {{ end }}<span class="doi"><a href="https://arxiv.org/abs/{{ $paper.Meta.ArxivID }}">{{ $paper.Meta.ArxivID }}</span> + {{ else if $paper.Meta.Resource }}{{ if $hasVal }}- {{ end }}<span class="doi"><a href="{{ $paper.Meta.Resource }}">{{ $paper.Meta.Resource }}</a></span>{{ end }} + + {{ if $paper.Meta.Journal }}{{ if $hasVal }}- {{ end }}<span class="journal">{{ $paper.Meta.Journal }}</span>{{ end }} + </div> {{ end }} {{ end }} |