diff options
author | Jordan <me@jordan.im> | 2021-03-04 21:48:18 -0700 |
---|---|---|
committer | Jordan <me@jordan.im> | 2021-03-04 21:48:18 -0700 |
commit | a164fd4aad6406900de2bc443e31e580b46550fc (patch) | |
tree | bd317d7daaa493de9d9c609cd2895d62c65eab68 /templates/list.html | |
parent | d70a3b022e59dfc484d350335ca25eb02998b8eb (diff) | |
download | crane-a164fd4aad6406900de2bc443e31e580b46550fc.tar.gz crane-a164fd4aad6406900de2bc443e31e580b46550fc.zip |
add category links, styling
Diffstat (limited to 'templates/list.html')
-rw-r--r-- | templates/list.html | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/templates/list.html b/templates/list.html index 1a482d1..8f6382d 100644 --- a/templates/list.html +++ b/templates/list.html @@ -1,29 +1,26 @@ {{ define "list" }} -<table summary='paper list' class='list nowrap'> +<div class='papers nowrap list'> {{ range $category, $papers := .Papers }} {{ $paperCount := len $papers }} {{ if ge $paperCount 1 }} - <tr class='nohover-highlight'> - <td colspan='4' class='papersection'>{{ $category }}</td> - </tr> + <div class="papersection"> + <span class='papersection' id='{{ $category }}'>{{ $category }}</span> + </div> {{ range $path, $paper := $papers }} - <tr> + <div class="paper"> {{ if $paper.Meta.Title }} - <td class="sublevel-paper title"><a href='/download/{{ $path }}' title='{{ $paper.Meta.Title }}'>{{ $paper.Meta.Title }}</a></td> + <span class="title"><a href='/download/{{ $path }}' title='{{ $paper.Meta.Title }}'>{{ $paper.Meta.Title }}</a></span><br> {{ else }} - <td class="sublevel-paper title"><a href='/download/{{ $path }}' title='{{ $paper.PaperName }}'>{{ $paper.PaperName }}</a></td> + <span class="title"><a href='/download/{{ $path }}' title='{{ $paper.PaperName }}'>{{ $paper.PaperName }}</a></span><br> {{ end }} - </tr> - <tr> + {{ if $paper.Meta.Title }} - <td class="sub">{{ $paper.Meta.PubYear }} - {{ $contCount := len $paper.Meta.Contributors }} {{ if gt $contCount 0 }}{{ $author := index $paper.Meta.Contributors 0 }}{{ $author.LastName }}{{ if gt $contCount 1 }} et al.{{ end }}{{ end }} - <a href="https://doi.org/{{ $paper.Meta.DOI }}">{{ $paper.Meta.DOI }}</a> - {{ $paper.Meta.Journal }}</td> - {{ else }} - <td></td> + <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 }} - </tr> + </div> {{ end }} - {{ else }} {{ end }} {{ end }} -</table> +</div> {{ end }} |