aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat_covid19/templates/entity_macros.html
diff options
context:
space:
mode:
Diffstat (limited to 'fatcat_covid19/templates/entity_macros.html')
-rw-r--r--fatcat_covid19/templates/entity_macros.html34
1 files changed, 22 insertions, 12 deletions
diff --git a/fatcat_covid19/templates/entity_macros.html b/fatcat_covid19/templates/entity_macros.html
index 66f0eb2..cc3a8a6 100644
--- a/fatcat_covid19/templates/entity_macros.html
+++ b/fatcat_covid19/templates/entity_macros.html
@@ -1,16 +1,7 @@
{% macro fulltext_search_result_row(paper) -%}
<div class="row">
-<div class="four wide right aligned column" style="padding: 1em;">
- {% if paper.fulltext.t_thumbnail_url %}
- <a href="{{ config.COVID19_FULLTEXT_HOST }}{{ paper.fulltext.pdf_url.replace('//', '/') }}">
- <img src="{{ config.COVID19_FULLTEXT_HOST }}{{ paper.fulltext.t_thumbnail_url.replace('//', '/') }}" style="border: 1px solid grey; max-height: 12em;">
- </a>
- {% else %}
- No Fulltext
- {% endif %}
-</div>
-<div class="twelve wide column">
+<div class="thirteen wide column">
{# ### TITLE ROW #}
<h4 style="margin-top: 1em; margin-bottom: 0px; font-size: 1.2em;">
@@ -41,14 +32,18 @@
<b style="text-transform: uppercase;">[{{ paper.release_type }}]</b>
{% endif %}
</h4>
+
+ {#
<div style="float: right; padding: 4px;">
&nbsp;&nbsp;<a href="{{ config.ELASTICSEARCH_BACKEND }}/{{ config.ELASTICSEARCH_FULLTEXT_INDEX }}/release/{{ paper.fatcat_ident }}" class="ui grey tag label"><i class="file icon"></i>json</a>
</div>
+
{% if paper.best_pdf_url %}
<div style="float: right; padding: 4px;">
&nbsp;&nbsp;<a href="{{ paper.best_pdf_url }}" class="ui violet tag label"><i class="file icon"></i>fulltext</a>
</div>
{% endif %}
+ #}
{# ### AUTHOR ROW #}
@@ -87,8 +82,14 @@
{% endif %}
{# ### ABSTRACT / QUERY HIGHLIGHT #}
- {% if paper.abstract %}
- <div style="padding: 1em;">
+ {% if paper._highlights %}
+ <div style="padding-top: 1em; padding-left: 0.5em;" class="search_highlights">
+ {% for highlight in paper._highlights %}
+ {{ highlight|safe }} ...
+ {% endfor %}
+ </div>
+ {% elif paper.abstract %}
+ <div style="padding-top: 1em; padding-left: 0.5em;">
{% if paper.abstract[0]|length > 500 %}
{{ paper.abstract[0][:500] }}...
{% else %}
@@ -115,6 +116,15 @@
<a href="/work/{{ paper.work_id }}"><i class="sitemap icon"></i> and 5 other versions of the same work!</a>
{% endif %}
</div>
+<div class="three wide left aligned column" style="padding: 1em;">
+ {% if paper.fulltext.thumbnail_url %}
+ <a href="{{ config.COVID19_FULLTEXT_HOST }}{{ paper.fulltext.pdf_url.replace('//', '/') }}">
+ <img src="{{ config.COVID19_FULLTEXT_HOST }}{{ paper.fulltext.thumbnail_url.replace('//', '/') }}" style="border: 1px solid grey; max-height: 12em; max-width: 100%;">
+ </a>
+ {% else %}
+ {# No Fulltext #}
+ {% endif %}
+</div>
</div>
{% endmacro %}