blob: d6367a844324bf3ade3086992bdab12bbbd3e524 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
{% import "entity_macros.html" as entity_macros %}
{% extends "base.html" %}
{% block title %}
{% if query %}
{{ _("Search") }}: {{ query }}
{% else %}
{{ _("Fulltext Search") }}
{% endif %}
{% endblock %}
{% block fullmain %}
<div class="ui vertical stripe segment" style="background-color: #EEE; padding-top: 2.5em;">
<div class="ui container text">
<h1>Search all COVID-19 Resources</h1>
<form class="" role="search" action="/fulltext/search" method="get">
<div class="ui form">
<div class="ui action input huge fluid">
<input type="text" placeholder="Query..." name="q" value="{% if query %}{{ query }}{% endif %}" aria-label="search metadata">
<button class="ui primary button">{{ _("Search") }}</button>
</div>
{#
<div class="ui checkbox" style="float: right; margin: 1em;">
<input type="checkbox" name="fulltext_only" value="true" {% if fulltext_only %}checked{% endif %}>
<label>Fulltext Available Only</label>
</div>
<br>Can also lookup by <b><a href="/release/lookup">identifier</a></b> or search for <b><a href="/container/search?q={{ query or "" }}">containers</a></b> (eg, journals).
#}
</div>
</form>
</div>
</div>
{% if found %}
{% if found.results %}
<div class="ui container text" style="padding: 1em;">
{{ entity_macros.top_results(found) }}
</div>
<div class="ui container" style="max-width: 950px !important;">
<div class="ui centered stackable grid">
{% for paper in found.results %}
{{ entity_macros.fulltext_search_result_row(paper) }}
{% endfor %}
</div>
</div>
{% if found.results|length > 8 %}
<div class="ui container text">
<div class="ui divider"></div>
<div style="text-align: center">
{{ entity_macros.bottom_results(found)}}
</div>
</div>
{% endif %}
{% else %}
{# "did a query, but no results" #}
<div class="ui container text">
<br>
{{ _("Raw query was:") }} <i>{{ found.query.q }}</i>
<div class="ui centered stackable grid" style="padding-top: 15%;">
<div class="row">
<h2>{{ _("No results found!") }}</h2>
</div>
<div class="row">
<div class="four wide column">
<img src="/static/paper_man_confused.gif" alt="confused paper man">
</div>
<div class="six wide column">
<br>
<p>{{ _("Try searching elsewhere") }}:</p>
<ul>
<li><a href="https://www.ncbi.nlm.nih.gov/research/coronavirus/docsum?text={{ found.query.q | urlencode }}">NIH LitCovid</a></li>
<li><a href="https://cord-19.apps.allenai.org/?q={{ found.query.q | urlencode }}">Allen AI CORD-19 Explorer</a></li>
<li><a href="https://scholar.google.com/scholar?q={{ found.query.q | urlencode }}">Google Scholar</a></li>
</ul>
</div>
</div>
</div>
</div>
{% endif %}
{% else %}
{# "no query submitted" #}
{% endif %}
{% endblock %}
|