diff options
author | Johannah Sprinz <neo@neothethird.de> | 2022-02-08 16:30:04 +0100 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2022-02-08 13:19:59 -0800 |
commit | 2fa67e275433e98556706b32d33db93e270c051c (patch) | |
tree | 958ce53cab9f19e10e885a8dc05570a59e95e55d | |
parent | f34b35d1696d93a97208e271b95285e33c539366 (diff) | |
download | fatcat-scholar-2fa67e275433e98556706b32d33db93e270c051c.tar.gz fatcat-scholar-2fa67e275433e98556706b32d33db93e270c051c.zip |
tweak abstract truncation
truncate abstracts longer than 550 chars at the 500 char mark
-rw-r--r-- | fatcat_scholar/templates/search_macros.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html index 45c3c28..1b331bc 100644 --- a/fatcat_scholar/templates/search_macros.html +++ b/fatcat_scholar/templates/search_macros.html @@ -368,11 +368,11 @@ </div> {% elif paper.abstracts %} <div class="search-highlights"> - {% if paper.abstracts[0].body|length > 500 %} + {% if paper.abstracts[0].body|length > 550 %} {{ paper.abstracts[0].body | truncate(500, False, '') }} <details style="display:inline;"> <summary>{% trans %}more »{% endtrans %}</summary> - ... {{ paper.abstracts[0].body[480:] }} + ... {{ paper.abstracts[0].body[500:] }} </details> {% else %} {{ paper.abstracts[0].body }} |