diff options
author | Jordan <me@jordan.im> | 2022-01-15 10:56:09 -0700 |
---|---|---|
committer | Jordan <me@jordan.im> | 2022-01-15 10:56:09 -0700 |
commit | 35339a2918240c7948d2748b2e8d484ea5cd9a76 (patch) | |
tree | 544064385b20ac74fb879db7a632de4dae4d0e9d /templates | |
parent | ce063274e2711e615dc2eea1a44ff1f1867d9d0f (diff) | |
download | crane-35339a2918240c7948d2748b2e8d484ea5cd9a76.tar.gz crane-35339a2918240c7948d2748b2e8d484ea5cd9a76.zip |
http, templates: normalize paper metadata
Diffstat (limited to 'templates')
-rw-r--r-- | templates/admin-edit.html | 3 | ||||
-rw-r--r-- | templates/list.html | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/templates/admin-edit.html b/templates/admin-edit.html index d8805f9..d4c9196 100644 --- a/templates/admin-edit.html +++ b/templates/admin-edit.html @@ -65,7 +65,8 @@ {{ if $paper.Meta.Title }} <span class="title"> <input type="checkbox" id="{{ $path }}" name="paper" value="{{ $path }}"/> - <a href='/download/{{ $path }}' title='{{ $paper.Meta.Title }}'>{{ $paper.Meta.Title }}</a> + <a href='/download/{{ $path }}' title='{{ normalizeStr $paper.Meta.Title }}'> + {{- normalizeStr $paper.Meta.Title }}</a> </span> <br /> {{ else }} diff --git a/templates/list.html b/templates/list.html index b9f7fd2..6d6cdaf 100644 --- a/templates/list.html +++ b/templates/list.html @@ -10,12 +10,14 @@ <div class="paper"> {{ if $paper.Meta.Title }} <span class="title"> - <a href='/download/{{ $path }}' title='{{ $paper.Meta.Title }}'>{{ $paper.Meta.Title }}</a> + <a href='/download/{{ $path }}' title='{{ normalizeStr $paper.Meta.Title }}'> + {{- normalizeStr $paper.Meta.Title }}</a> </span> <br /> {{ else }} <span class="title"> - <a href='/download/{{ $path }}' title='{{ $paper.PaperName }}'>{{ $paper.PaperName }}</a> + <a href='/download/{{ $path }}' title='{{ $paper.PaperName }}'> + {{- $paper.PaperName }}</a> </span> <br /> {{ end }} @@ -46,7 +48,8 @@ {{ else if $paper.Meta.ArxivID }} {{ if $hasVal }}- {{ end }} <span class="doi"> - <a href="https://arxiv.org/abs/{{ $paper.Meta.ArxivID }}">{{ $paper.Meta.ArxivID }}</a> + <a href="https://arxiv.org/abs/{{ $paper.Meta.ArxivID }}"> + {{- $paper.Meta.ArxivID }}</a> </span> {{ else if $paper.Meta.Resource }} {{ if $hasVal }}- {{ end }} |