diff options
author | Jordan <me@jordan.im> | 2021-02-16 16:48:56 -0700 |
---|---|---|
committer | Jordan <me@jordan.im> | 2021-02-16 16:48:56 -0700 |
commit | baa10aeb413a5ac109e56db5fd7a8d62a4d5965f (patch) | |
tree | b063d3df79882cb454329e6469088b00d382113f /templates/list.html | |
download | crane-baa10aeb413a5ac109e56db5fd7a8d62a4d5965f.tar.gz crane-baa10aeb413a5ac109e56db5fd7a8d62a4d5965f.zip |
initial commit
Diffstat (limited to 'templates/list.html')
-rw-r--r-- | templates/list.html | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/templates/list.html b/templates/list.html new file mode 100644 index 0000000..718a732 --- /dev/null +++ b/templates/list.html @@ -0,0 +1,29 @@ +{{ define "list" }} +<table summary='paper list' class='list nowrap'> +{{ range $category, $papers := .Papers }} + {{ $paperCount := len $papers }} + {{ if ge $paperCount 1 }} + <tr class='nohover-highlight'> + <td colspan='4' class='papersection'>{{ $category }}</td> + </tr> + {{ range $path, $paper := $papers }} + <tr> + {{ if $paper.Meta.Title }} + <td class="sublevel-paper title"><a href='/download/{{ $path }}' title='{{ $paper.Meta.Title }}'>{{ $paper.Meta.Title }}</a></td> + {{ else }} + <td class="sublevel-paper title"><a href='/download/{{ $path }}' title='{{ $paper.PaperName }}'>{{ $paper.PaperName }}</a></td> + {{ end }} + </tr> + <tr> + {{ if $paper.Meta.Title }} + <td class="sub">author: {{ $contCount := len $paper.Meta.Contributors }} {{ if gt $contCount 0 }}{{ $author := index $paper.Meta.Contributors 0 }}<a href='/?a={{ $author.LastName }}'>{{ $author.LastName }}{{ if gt $contCount 1 }} et al.{{ end }}{{ end }}</a> yr: <a href="?y={{ $paper.Meta.PubYear }}">{{ $paper.Meta.PubYear }}</a> doi: <a href="https://doi.org/{{ $paper.Meta.DOI }}">{{ $paper.Meta.DOI }}</a> journal: <font color="black">{{ $paper.Meta.Journal }}</font></td> + {{ else }} + <td></td> + {{ end }} + </tr> + {{ end }} + {{ else }} + {{ end }} +{{ end }} +</table> +{{ end }} |