summaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/templates
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-06-04 13:18:35 -0700
committerBryan Newbold <bnewbold@archive.org>2020-06-04 13:18:35 -0700
commit198db52d3a93a2b7d7cab0a4140c6402a14eca84 (patch)
treeb34d79b605c0a79e0f875f5b0bd3944e72381cd1 /fatcat_scholar/templates
parent35ff62b6383ba07f9549edbb652f04fa69fb046c (diff)
downloadfatcat-scholar-198db52d3a93a2b7d7cab0a4140c6402a14eca84.tar.gz
fatcat-scholar-198db52d3a93a2b7d7cab0a4140c6402a14eca84.zip
collapse pages by SIM issue
Diffstat (limited to 'fatcat_scholar/templates')
-rw-r--r--fatcat_scholar/templates/search.html2
-rw-r--r--fatcat_scholar/templates/search_macros.html39
2 files changed, 25 insertions, 16 deletions
diff --git a/fatcat_scholar/templates/search.html b/fatcat_scholar/templates/search.html
index 1f7a9b9..13d1aec 100644
--- a/fatcat_scholar/templates/search.html
+++ b/fatcat_scholar/templates/search.html
@@ -21,7 +21,6 @@
</details>
{% if hits %}
- {# <h2>{{ "{:,}".format(hits.count_found) }}</h2> #}
<span style="font-size: 1.5em;">{{ "{:,}".format(hits.count_found) }}</span>
Hits
<span style="color: rgba(0,0,0,0.4);">in {{ "{:0.2}".format(hits.query_time_ms/1000.0) }}sec</span>
@@ -35,7 +34,6 @@
<div class="ui tablet-hide two wide column">
{% if hits %}
<div style="width: 100%; text-align: right;">
- {# <h2>{{ "{:,}".format(hits.count_found) }}</h2> #}
<h3 style="font-size: {% if hits.count_found >= 10000000 %}1.0em{% elif hits.count_found >= 1000 %}1.5em{% else %}2.0em{% endif %};">{{ "{:,}".format(hits.count_found) }}</h3>
Hits
</div>
diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html
index 07a4510..abdb6d3 100644
--- a/fatcat_scholar/templates/search_macros.html
+++ b/fatcat_scholar/templates/search_macros.html
@@ -67,7 +67,7 @@
{{ paper.biblio.release_year }}
{% endif %}
{% if paper.biblio.release_year and paper.biblio.container_name %}
-
+
{% endif %}
{% if paper.biblio.container_name %}
<i>
@@ -130,22 +130,33 @@
{# ### TAGS #}
<div style="margin-top: 0.2em;">
- {# colors to use: olive, brown, grey, pink, red, etc #}
- {# TODO: remove doc for ES 7.x-style lack of type #}
- {# TODO: only show 'json' link if from cluster? #}
- <a target="_blank" href="{{ settings.ELASTICSEARCH_BACKEND }}/{{ settings.ELASTICSEARCH_FULLTEXT_INDEX }}/_doc/{{ paper.key }}">
- <span class="ui label small">json</span>
- </a>
- {% if paper.biblio.release_ident %}
- <a target="_blank" href="https://fatcat.wiki/release/{{ paper.biblio.release_ident }}">
- <span class="ui label small">metadata</span>
+ {# colors to use: olive, brown, grey, pink, red, etc #}
+ {# TODO: remove doc for ES 7.x-style lack of type #}
+ {# TODO: only show 'json' link if from cluster? #}
+ <a target="_blank" href="{{ settings.ELASTICSEARCH_BACKEND }}/{{ settings.ELASTICSEARCH_FULLTEXT_INDEX }}/_doc/{{ paper.key }}">
+ <span class="ui label small">json</span>
</a>
- {% endif %}
- {% for tag in paper.tags %}
- <span class="ui label small">{{ _(tag) }}</span>
- {% endfor %}
+ {% if paper.biblio.release_ident %}
+ <a target="_blank" href="https://fatcat.wiki/release/{{ paper.biblio.release_ident }}">
+ <span class="ui label small">metadata</span>
+ </a>
+ {% endif %}
+
+ {% for tag in paper.tags %}
+ <span class="ui label small">{{ _(tag) }}</span>
+ {% endfor %}
</div>
+ {# ### COLLAPSED HITS #}
+ {% if paper._collapsed_count > 0 %}
+ <div style="padding-top: 0.5em;">
+ <button class="ui compact basic blue button" form="search_form" type="submit" name="collapse_pages" value="false">
+ <i class="ui icon zoom-in"></i>
+ Show {{ paper._collapsed_count }} additional hits from this issue
+ </button>
+ </div>
+ {% endif %}
+
</div>
<div class="three wide left aligned column" style="padding-top: 0.5em; padding-right: 0.5em;">
{% if paper.fulltext.access_url %}