diff options
Diffstat (limited to 'fatcat_scholar/templates/search_macros.html')
-rw-r--r-- | fatcat_scholar/templates/search_macros.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html index 6346754..3c8509c 100644 --- a/fatcat_scholar/templates/search_macros.html +++ b/fatcat_scholar/templates/search_macros.html @@ -121,7 +121,11 @@ {% elif paper.abstracts %} <div style="padding-top: 0.5em; padding-bottom: 0.5em;"> {% if paper.abstracts[0].body|length > 500 %} - {{ paper.abstracts[0].body[:500] }}... + {{ paper.abstracts[0].body | truncate(500, False, '') }} + <details style="display:inline;"> + <summary>{% trans %}more »{% endtrans %}</summary> + ... {{ paper.abstracts[0].body[480:] }} + </details> {% else %} {{ paper.abstracts[0].body }} {% endif %} |