aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/templates
diff options
context:
space:
mode:
Diffstat (limited to 'fatcat_scholar/templates')
-rw-r--r--fatcat_scholar/templates/base.html212
-rw-r--r--fatcat_scholar/templates/home.html104
-rw-r--r--fatcat_scholar/templates/search.html74
-rw-r--r--fatcat_scholar/templates/search_macros.html203
4 files changed, 580 insertions, 13 deletions
diff --git a/fatcat_scholar/templates/base.html b/fatcat_scholar/templates/base.html
new file mode 100644
index 0000000..d47003b
--- /dev/null
+++ b/fatcat_scholar/templates/base.html
@@ -0,0 +1,212 @@
+<!DOCTYPE html>
+<html lang="en" style="position: relative; min-height: 100%; height: auto;">
+<head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="referrer" content="origin-when-cross-origin">
+ <script>
+ {# TODO: audit this license statement #}
+ /*
+ @licstart The following is the entire license notice for the JavaScript code in this page.
+
+ Copyright (C) 2020 Internet Archive
+
+ The JavaScript code in this page is free software: you can
+ redistribute it and/or modify it under the terms of the GNU Affero
+ General Public License as published by the Free Software
+ Foundation, either version 3 of the License, or (at your option)
+ any later version. The code is distributed WITHOUT ANY WARRANTY;
+ without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
+
+ As additional permission under GNU AGPL version 3 section 7, you
+ may distribute non-source (e.g., minimized or compacted) forms of
+ that code without the copy of the GNU AGPL normally required by
+ section 4, provided you include this license notice and a URL
+ through which recipients can access the Corresponding Source.
+
+ @licend The above is the entire license notice for the JavaScript code in this page.
+ */
+ </script>
+ <style>
+ {# bnewbold: fix light grey bars in header #}
+ .ui.inverted.menu .item:before { background: none; }
+
+ @media only screen and (max-width: 479px) {
+ .mobile-hide{ display: none !important; }
+ }
+ {# for fulltext search result highlighting #}
+ .search_highlights em {
+ background-color: #FFFFBB; {# yellow #}
+ }
+
+ footer p a {
+ color: rgba(255, 255, 255, 0.5);
+ }
+ footer p a:hover {
+ color: rgba(255, 255, 255, 1.0);
+ opacity: 1.0;
+ }
+ </style>
+ <title>{%- block title -%}scholar.archive.org{%- endblock %}</title>
+ <link rel="stylesheet"
+ href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.1/dist/semantic.min.css"
+ crossorigin="anonymous">
+ <link rel="icon"
+ type="image/x-icon"
+ href="{{ url_for('static', path='/ia-favicon.ico') }}">
+ {% block extra_head %}{% endblock %}
+</head>
+
+<body>
+<header class="ui inverted menu" style="margin: 0;">
+ <div class="ui container">
+ {% if True %}
+ <div class="ui left corner pink small label">
+ <div data-tooltip="[DEV] environment (data not preserved)" data-position="bottom left">
+ <i class="ui cogs icon"></i>
+ </div>
+ </div>
+ {% endif %}
+ <a href="https://archive.org/" class="header item">
+ <img class="logo" src="{{ url_for('static', path='/ia-logo.svg') }}" style="width: 20px;">
+ <img class="mobile-hide" src="{{ url_for('static', path='/ia-wordmark.svg') }}" style="margin-left: 10px; width: 180px;">
+ </a>
+
+ <div class="right menu">
+ <div class="ui simple dropdown item">
+ <!-- language/translate SVG icon -->
+ <img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB3aWR0aD0iMTc5MiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNzgyIDEwNzhxLTEgMy0xMi41LS41dC0zMS41LTExLjVsLTIwLTlxLTQ0LTIwLTg3LTQ5LTctNS00MS0zMS41dC0zOC0yOC41cS02NyAxMDMtMTM0IDE4MS04MSA5NS0xMDUgMTEwLTQgMi0xOS41IDR0LTE4LjUgMHE2LTQgODItOTIgMjEtMjQgODUuNS0xMTV0NzguNS0xMThxMTctMzAgNTEtOTguNXQzNi03Ny41cS04LTEtMTEwIDMzLTggMi0yNy41IDcuNXQtMzQuNSA5LjUtMTcgNXEtMiAyLTIgMTAuNXQtMSA5LjVxLTUgMTAtMzEgMTUtMjMgNy00NyAwLTE4LTQtMjgtMjEtNC02LTUtMjMgNi0yIDI0LjUtNXQyOS41LTZxNTgtMTYgMTA1LTMyIDEwMC0zNSAxMDItMzUgMTAtMiA0My0xOS41dDQ0LTIxLjVxOS0zIDIxLjUtOHQxNC41LTUuNSA2IC41cTIgMTItMSAzMyAwIDItMTIuNSAyN3QtMjYuNSA1My41LTE3IDMzLjVxLTI1IDUwLTc3IDEzMWw2NCAyOHExMiA2IDc0LjUgMzJ0NjcuNSAyOHE0IDEgMTAuNSAyNS41dDQuNSAzMC41em0tMjA1LTQ4NnEzIDE1LTQgMjgtMTIgMjMtNTAgMzgtMzAgMTItNjAgMTItMjYtMy00OS0yNi0xNC0xNS0xOC00MWwxLTNxMyAzIDE5LjUgNXQyNi41IDAgNTgtMTZxMzYtMTIgNTUtMTQgMTcgMCAyMSAxN3ptNjk4IDEyOWw2MyAyMjctMTM5LTQyem0tMTEwOCA4MDBsNjk0LTIzMnYtMTAzMmwtNjk0IDIzM3YxMDMxem0xMjQxLTMxN2wxMDIgMzEtMTgxLTY1Ny0xMDAtMzEtMjE2IDUzNiAxMDIgMzEgNDUtMTEwIDIxMSA2NXptLTUwMy05NjJsNTczIDE4NHYtMzgwem0zMTEgMTMyM2wxNTggMTMtNTQgMTYwLTQwLTY2cS0xMzAgODMtMjc2IDEwOC01OCAxMi05MSAxMmgtODRxLTc5IDAtMTk5LjUtMzl0LTE4My41LTg1cS04LTctOC0xNiAwLTggNS0xMy41dDEzLTUuNXE0IDAgMTggNy41dDMwLjUgMTYuNSAyMC41IDExcTczIDM3IDE1OS41IDYxLjV0MTU3LjUgMjQuNXE5NSAwIDE2Ny0xNC41dDE1Ny01MC41cTE1LTcgMzAuNS0xNS41dDM0LTE5IDI4LjUtMTYuNXptNDQ4LTEwNzl2MTA3OWwtNzc0LTI0NnEtMTQgNi0zNzUgMTI3LjV0LTM2OCAxMjEuNXEtMTMgMC0xOC0xMyAwLTEtMS0zdi0xMDc4cTMtOSA0LTEwIDUtNiAyMC0xMSAxMDYtMzUgMTQ5LTUwdi0zODRsNTU4IDE5OHEyIDAgMTYwLjUtNTV0MzE2LTEwOC41IDE2MS41LTUzLjVxMjAgMCAyMCAyMXY0MTh6Ii8+PC9zdmc+"
+ alt="select language" style="height: 1.5em; filter: invert(100%);">
+ <i class="dropdown icon" style="margin-left: 0.2em;"></i>
+ <div class="menu">
+ {# TODO: as a dynamic array #}
+ {# TODO: do url_for() here, with current endpoint (from request?) #}
+ <a class="item" href="/">English</a>
+ <a class="item" href="/de/">Deutsch</a>
+ <a class="item" href="/zh/">中文</a>
+ </div>
+ </div>
+ </div>
+ </div>
+</header>
+
+{% block fullmain %}
+<div class="ui vertical stripe segment" style="background-color: #dedede;">
+ <div class="ui container" style="padding: 1em; padding-bottom: 0.0em;">
+ <div class="ui equal height grid">
+ <div class="ui four wide column">
+ <div style="display: flex; justify-content: center; align-items: center; height:100%; width: 100%;">
+ <a href="{{ lang_prefix }}/">
+ <span style="font-size: 1.5rem; font-weight: bold;">[scholar.archive.org]</span>
+ {# hack to align vertically with search box #}
+ <br>&nbsp;
+ </a>
+ </div>
+ </div>
+ <div class="ui twelve wide column">
+ <form class="" id="fulltext_query" action="{{ lang_prefix }}/search") }}" method="get" role="search" aria-label="papers" itemprop="potentialAction" itemscope itemtype="https://schema.org/SearchAction">
+ <meta itemprop="target" content="https://{{ settings.FATCAT_DOMAIN }}/fulltext/search?q={q}"/>
+ <div class="ui form">
+ <div class="ui action input large fluid">
+ <input type="text" placeholder="{{ _("by title, authors, identifiers...") }}" name="q" aria-label="search metadata" required itemprop="query-input" style="border-radius: 0; border: 1px #999 solid;">
+ <button class="ui green button" style="border-radius: 0; background-color: #44a25a; font-size: 1.2rem;">{{ _("Search") }}</button>
+ </div>
+ </div>
+ <div style="float: right; padding-top: 0.5em;">
+ <a href="#">User Guide</a>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+</div>
+<main class="ui main container">
+{% block fullbody %}
+ <div class="ui container text">
+ {% block body %}Nothing to see here.{% endblock %}
+ </div>
+{% endblock %}
+</main>
+{% endblock %}
+
+{#
+<footer class="ui inverted vertical footer segment" style="margin-top: 2em; padding-top: 1em; padding-bottom:2em; position: absolute; bottom: 0px; width: 100%;">
+ <div class="ui center aligned container">
+ <div class="ui horizontal inverted small link list">
+ <a class="item" href="/">fatcat!</a>
+ <a class="item" href="/about">About</a>
+ <a class="item" href="https://guide.{{ settings.FATCAT_DOMAIN }}/sources.html">Sources</a>
+ <a class="item" href="{% if settings.FATCAT_DOMAIN == "fatcat.wiki" %}https://stats.uptimerobot.com/GM9YNSrB0{% elif settings.FATCAT_DOMAIN =="qa.fatcat.wiki" %}https://stats.uptimerobot.com/WQ8wAUREA{% else %}#{% endif %}">Status</a>
+ <a class="item" href="https://guide.{{ settings.FATCAT_DOMAIN }}/bulk_exports.html">Bulk Exports</a>
+ <a class="item" href="https://github.com/internetarchive/fatcat-scholar/">Code</a>
+ <a class="item" href="https://github.com/internetarchive/fatcat-scholar/commit/{{ settings.GIT_REVISION }}"><code>{{ settings.GIT_REVISION }}</code></a>
+ {% if settings.FATCAT_DOMAIN.startswith('qa.') %}
+ <a class="item"><b style="color: orange;">[QA]</b></a>
+ {% elif settings.FATCAT_DOMAIN.startswith('dev.') %}
+ <a class="item"><b style="color: magenta;">[DEV]</b></a>
+ {% endif %}
+ </div>
+ </div>
+</footer>
+#}
+
+<div style="height: 24em;">
+</div>
+<footer class="ui inverted vertical footer segment" style="padding: 5em 0em; position: absolute; bottom: 0px; width: 100%;">
+ <div class="ui container">
+ <div class="ui stackable inverted divided equal height grid">
+ <div class="nine wide column">
+ <div class="ui grid">
+ <div class="three wide column" style="padding-top: 4em;">
+ <img class="logo" src="{{ url_for('static', path='/ia-logo.svg') }}" style="width: 4em; opacity: 0.5;">
+ </div>
+ <div class="twelve wide column">
+ <h3>Internet Archive</h3>
+ <p style="color: rgba(255, 255, 255, 0.5);">We are a 501(c)(3) non-profit, building a digital library of Internet sites and other cultural artifacts in digital form. Other projects include the <a href="https://web.archive.org">Wayback Machine</a>, <a href="https://archive.org">archive.org</a> <a href="https://openlibrary.org">openlibrary.org</a> and <a href="https://archive-it.org">archive-it.org</a>
+ <div class="ui horizontal inverted link list">
+ <a class="item" href="https://archive.org/about/">About Us</a>
+ <a class="item" href="https://archive.org/about/contact.php">Contact Us</a>
+ <a class="item" href="https://archive.org/about/terms.php">Policies</a>
+ <a class="item" href="https://archive.org/donate">Donate</a>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="three wide column">
+ <h4 class="ui inverted header">scholar.archive.org</h4>
+ <div class="ui inverted link list">
+ <a href="#" class="item">How It Works</a>
+ <a href="#" class="item">Content Sources</a>
+ <a href="#" class="item">Text and Data Mining</a>
+ <a href="#" class="item">Discussion Forum</a>
+ <a href="#" class="item">Statistics</a>
+ <a href="#" class="item">Help</a>
+ </div>
+ </div>
+ <div class="three wide column">
+ <h4 class="ui inverted header">Open Infrastructure</h4>
+ <div class="ui inverted link list">
+ <a href="https://fatcat.wiki" class="item">Editable Catalog (Fatcat)</a>
+ <a href="https://guide.fatcat.wiki" class="item">Contribute</a>
+ <a href="/api/redoc" class="item">Search API</a>
+ <a href="https://status.fatcat.wiki" class="item">Service Status</a>
+ <a href="https://github.com/internetarchive/fatcat-scholar" class="item">Source Code</a>
+ </div>
+ </div>
+ </div>
+ </div>
+</footer>
+
+<script
+ src="https://code.jquery.com/jquery-3.1.1.min.js"
+ integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
+ crossorigin="anonymous">
+</script>
+<script
+ src="https://cdn.jsdelivr.net/npm/semantic-ui@2.3.2/dist/semantic.min.js"
+ crossorigin="anonymous">
+</script>
+{% block postscript %}{% endblock %}
+</body>
+</html>
diff --git a/fatcat_scholar/templates/home.html b/fatcat_scholar/templates/home.html
index e6e09b5..bb387f7 100644
--- a/fatcat_scholar/templates/home.html
+++ b/fatcat_scholar/templates/home.html
@@ -1,12 +1,92 @@
-<html>
-<head>
- <title>hello</title>
-</head>
-<body>
-<h1>The Start</h1>
-
-<p>{% trans %}This is a longer paragraph, all of which should be translated.{% endtrans %}
-
-<p>and {{ _("this is a quick") }} thing to translate.
-</body>
-</html>
+{% extends "base.html" %}
+
+{% block fullmain %}
+
+<div class="ui vertical stripe segment" style="background-color: #dedede;">
+ <div class="ui container" style="padding: 3em;">
+ <div class="ui centered grid">
+ <div class="ui fourteen wide column">
+ <div style="width: 100%; text-align: center;">
+ <h1>Search Inside Millions of Research Papers</h1>
+ <br>
+ <form class="" id="fulltext_query" action="{{ lang_prefix }}/search") }}" method="get" role="search" aria-label="papers" itemprop="potentialAction" itemscope itemtype="https://schema.org/SearchAction">
+ <meta itemprop="target" content="https://{{ settings.FATCAT_DOMAIN }}/fulltext/search?q={q}"/>
+ <div class="ui form">
+ <div class="ui action input big fluid">
+ <input type="text" placeholder="{{ _("by title, authors, identifiers...") }}" name="q" aria-label="search metadata" required itemprop="query-input" style="border-radius: 0; border: 1px #999 solid;">
+ <button class="ui green button" style="border-radius: 0; background-color: #44a25a; font-size: 1.2rem;">{{ _("Search") }}</button>
+ </div>
+ </div>
+ </form>
+ </div>
+ <br>
+ <br>
+ <p style="font-size: 1.1rem;">This fulltext search index includes over 25 million research articles and other documents preserved in the Internet Archive.
+ <p style="font-size: 1.1rem;">The collection spans from digitized copies of eighteenth century journals though the latest Open Access conference proceedings and pre-prints crawled from the World Wide Web.
+ </div>
+ </div>
+ </div>
+</div>
+
+<div class="ui container" style="padding: 1em; margin-top: 2em;">
+ <div class="ui four cards">
+
+ <div class="ui card">
+ <a class="image" href="https://web.archive.org/web/20171006225602/https://burnstrauma.biomedcentral.com/track/pdf/10.1186/s41038-017-0090-z?site=burnstrauma.biomedcentral.com">
+ <img src="https://covid19.fatcat.wiki/fulltext_web//thumbnail/c9/c9e87f843b3cf7dc47881fa3d3ccb4693d7d9521.png">
+ </a>
+ <div class="content">
+ <a class="header" style="font-size: 1.1em;">Children are not little adults: blood transfusion in children with burn injury</a>
+ Tina L. Palmieri
+ <div class="meta">
+ <span>2017</span>
+ <span>Burns &amp; Trauma</span>
+ </div>
+ </div>
+ </div>
+
+ <div class="ui card">
+ <a class="image" href="https://web.archive.org/web/20200328205104/http://europepmc.org/backend/ptpmcrender.fcgi?accid=PMC5180799&blobtype=pdf">
+ <img src="https://covid19.fatcat.wiki/fulltext_web//thumbnail/1e/1e13eaf1d0fe6682b7759d40c49f9bf35b6eef68.png">
+ </a>
+ <div class="content">
+ <a class="header" style="font-size: 1.1em;">Epidemic Influenza in and around the City of Calcutta</a>
+ Koilas Chandra Bose
+ <div class="meta">
+ <span>1920</span>
+ <span>The Indian Medical Gazette</span>
+ </div>
+ </div>
+ </div>
+
+ <div class="ui card mobile-hide">
+ <a class="image" href="https://web.archive.org/web/2017/http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0032486&type=printable">
+ <img src="https://covid19.fatcat.wiki/fulltext_web//thumbnail/6e/6ea1978890ab099e90e61ddf078b6d983e60b07f.png">
+ </a>
+ <div class="content">
+ <a class="header" style="font-size: 1.1em;">Repertoire of Intensive Care Unit Pneumonia Microbiota</a>
+ Sabri Bousbia, et al
+ <div class="meta">
+ <span>2012</span>
+ <span>PLoS ONE</span>
+ </div>
+ </div>
+ </div>
+
+ <div class="ui card mobile-hide">
+ <a class="image" href="https://web.archive.org/web/2017/http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0010071&type=printable">
+ <img src="https://covid19.fatcat.wiki/fulltext_web//thumbnail/60/60cd26dae93a4048b5aceb66c68bec325392fdf0.png">
+ </a>
+ <div class="content">
+ <a class="header" style="font-size: 1.1em;">BioTorrents: A File Sharing Service for Scientific Data</a>
+ Morgan Langille, et al
+ <div class="meta">
+ <span>2012</span>
+ <span>PLoS ONE</span>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+
+{% endblock %}
diff --git a/fatcat_scholar/templates/search.html b/fatcat_scholar/templates/search.html
index 783cb47..fcb19c3 100644
--- a/fatcat_scholar/templates/search.html
+++ b/fatcat_scholar/templates/search.html
@@ -1 +1,73 @@
-<h1>Search template will go here</h2>
+{% import "search_macros.html" as search_macros %}
+{% extends "base.html" %}
+
+{% block fullbody %}
+<div class="ui equal height divided grid" style="margin-top: 1em;">
+ <div class="ui two wide column">
+
+ {% if found %}
+ <div class="ui tiny statistic" style="width: 100%; text-align: center;">
+ <div class="value">
+ {{ "{:,}".format(found.count_found) }}
+ </div>
+ <div class="label">
+ Hits
+ </div>
+ </div>
+ {% else %}
+ Maybe some filters, facets, counts over here?
+ {% endif %}
+
+ <div style="text-align: right;">
+ <br>
+ <span style="color: rgba(0,0,0,0.4);">Release Date</span>
+ <div class="ui link list" style="margin-top: 0.3em;">
+ <a class="active item"><b>All Time</b></a>
+ <a class="item" style="color: rgba(0,0,0);">Past Week</a>
+ <a class="item" style="color: rgba(0,0,0);">Past Year</a>
+ <a class="item" style="color: rgba(0,0,0);">Since 2000</a>
+ <a class="item" style="color: rgba(0,0,0);">Before 1925</a>
+ </div>
+
+ <br>
+ <span style="color: rgba(0,0,0,0.4);">Resource Type</span>
+ <div class="ui link list" style="margin-top: 0.3em;">
+ <a class="active item"><b>Papers</b></a>
+ <a class="item" style="color: rgba(0,0,0);">Reports</a>
+ <a class="item" style="color: rgba(0,0,0);">Datasets</a>
+ <a class="item" style="color: rgba(0,0,0);">Everything</a>
+ </div>
+
+ <br>
+ <span style="color: rgba(0,0,0,0.4);">Availability</span>
+ <div class="ui link list" style="margin-top: 0.3em;">
+ <a class="active item"><b>Everything</b></a>
+ <a class="item" style="color: rgba(0,0,0);">Open Access</a>
+ <a class="item" style="color: rgba(0,0,0);">Lending</a>
+ <a class="item" style="color: rgba(0,0,0);">Paywall</a>
+ </div>
+
+ <br>
+ <span style="color: rgba(0,0,0,0.4);">Sort Order</span>
+ <div class="ui link list" style="margin-top: 0.3em;">
+ <a class="active item"><b>Relevancy</b></a>
+ <a class="item" style="color: rgba(0,0,0);">Recent First</a>
+ <a class="item" style="color: rgba(0,0,0);">Oldest First</a>
+ </div>
+ </div>
+
+ </div>
+ <div class="ui thirteen wide column">
+ {% if found %}
+ {% if found.results %}
+ {% for paper in found.results %}
+ {{ search_macros.fulltext_search_result_row(paper) }}
+ {% endfor %}
+ {% endif %}
+ {% else %}
+ Some other message here when there is no search? Like a bunch of examples?
+ Or does that ever happen... we can just run query on "*".
+ {% endif %}
+ </div>
+</div>
+{% endblock %}
diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html
new file mode 100644
index 0000000..b600cb4
--- /dev/null
+++ b/fatcat_scholar/templates/search_macros.html
@@ -0,0 +1,203 @@
+
+{% macro fulltext_search_result_row(paper) -%}
+{% set lang_code = "en" %}
+<div class="ui grid">
+<div class="thirteen wide column">
+ {# ### TITLE ROW #}
+ <h4 style="margin-bottom: 0px; font-size: 1.2em;">
+
+ {# "best URL" calculation #}
+ {% if paper.pmcid %}
+ <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/{{ paper.pmcid }}/"
+ {% elif paper.pmid %}
+ <a href="https://pubmed.ncbi.nlm.nih.gov/{{ paper.pmid }}/"
+ {% elif paper.arxiv_id %}
+ <a href="https://arxiv.org/abs/{{ paper.arxiv_id }}/"
+ {% elif paper.doi %}
+ <a href="https://doi.org/{{ paper.doi }}"
+ {% else %}
+ <a href="https://fatcat.wiki/release/{{ paper.fatcat_ident }}"
+ {% endif %}
+ style="color: #2224c7;">
+ {% if lang_code != 'en' and lang_code == paper.lang and paper.original_title %}
+ {# show original title first instead of title if UI is in that language #}
+ {{ paper.original_title[:512] }}
+ {% if paper.original_title|length > 512 %}...{% endif %}
+ {% elif paper.title %}
+ {{ paper.title[:512] }}
+ {% if paper.title|length > 512 %}...{% endif %}
+ {% else %}
+ [blank]
+ {% endif %}
+ </a>
+
+ {# release type suffix #}
+ {% if paper.release_type in ("article-journal", "paper-conference") %}
+ {# pass #}
+ {% elif paper.release_type in ("book", "chapter", "dataset") %}
+ <b style="text-transform: uppercase;">[{{ _(paper.release_type) }}]</b>
+ {% elif not paper.release_type %}
+ <b style="text-transform: uppercase; color: red;">[media?]</b>
+ {% else %}
+ <b style="text-transform: uppercase;">[{{ _(paper.release_type) }}]</b>
+ {% endif %}
+
+ {# show inverse of title/original_title above #}
+ {% if lang_code != 'en' and lang_code == paper.lang and paper.title and paper.title != paper.original_title %}
+ <br>
+ <i style="font-weight: normal;">
+ {{ paper.title[:512] }} {% if paper.title|length > 512 %}...{% endif %}
+ </i>
+ {% elif paper.original_title and paper.title != paper.original_title %}
+ <br>
+ <i style="font-weight: normal;">
+ {{ paper.original_title[:512] }} {% if paper.original_title|length > 512 %}...{% endif %}
+ </i>
+ {% endif %}
+
+ </h4>
+
+ {# ### AUTHOR ROW #}
+ {% if paper.contrib_names %}
+ <div style="margin-top: 0.1em; margin-bottom: 0.2em; font-size: 1.1em;">
+ <b>
+ {{ ", ".join(paper.contrib_names[:12]) }}
+ {% if paper.contrib_names|length > 12 %}<i>(+{{ paper.contrib_names|length - 12 }} others)</i>{% endif %}
+ </b>
+ </div>
+ {% endif %}
+
+
+ {# ### JOURNAL ROW #}
+ {% if paper.release_year %}
+ {{ paper.release_year }}
+ {% endif %}
+ {% if paper.release_year and paper.container_name %}
+ |
+ {% endif %}
+ {% if paper.container_name %}
+ {% if paper.container_id %}
+ <a href="https://fatcat.wiki/container/{{ paper.container_id }}" style="color: black;">{{ paper.container_name }}</a>
+ {% else %}
+ {{ paper.container_name }}
+ {% endif %}
+ {% if paper.container_is_oa %}<i class="icon unlock orange small"></i>{% endif %}
+ {% endif %}
+ {% if paper.withdrawn_status %}
+ <b style="color: red;"><code>[{{ paper.withdrawn_status }}]</code></b>
+ {% endif %}
+ {% if paper.release_stage == "accepted" %}
+ <b style="color: brown;"><code>[{{ paper.release_stage }}]</code></b>
+ {% elif paper.release_stage and paper.release_stage != "published" %}
+ <b style="color: red;"><code>[{{ paper.release_stage }}]</code></b>
+ {% elif not paper.release_stage %}
+ <b style="color: red;"><code>[unpublished?]</code></b>
+ {% endif %}
+
+ {# ### ABSTRACT / QUERY HIGHLIGHT #}
+ {% if paper._highlights %}
+ <div style="padding-top: 1em; padding-bottom: 0.5em;" class="search_highlights">
+ {% for highlight in paper._highlights %}
+ {{ highlight|safe }} ...
+ {% endfor %}
+ </div>
+ {% elif paper.abstract %}
+ <div style="padding-top: 1em; padding-bottom: 0.5em;">
+ {% if paper.abstract[0]|length > 500 %}
+ {{ paper.abstract[0][:500] }}...
+ {% else %}
+ {{ paper.abstract[0][:500] }}...
+ {% endif %}
+ </div>
+ {% else %}
+ <br>
+ {% endif %}
+
+ {# ### IDENTIFIERS #}
+ {% if paper.doi %}
+ <a href="https://doi.org/{{paper.doi }}" style="color: green;">doi:{{ paper.doi }}</a> &nbsp;
+ {% endif %}
+ {% if paper.pmid %}
+ <a href="https://www.ncbi.nlm.nih.gov/pubmed/{{paper.pmid }}" style="color: green;">pmid:{{ paper.pmid }}</a> &nbsp;
+ {% endif %}
+ {% if paper.pmcid %}
+ <a href="https://pubmed.ncbi.nlm.nih.gov/{{paper.pmcid }}/" style="color: green;">pmcid:{{ paper.pmcid }}</a> &nbsp;
+ {% endif %}
+ {% if paper.arxiv_id %}
+ <a href="https://arxiv.org/abs/{{paper.arxiv_id }}" style="color: green;">arXiv:{{ paper.arxiv_id }}</a> &nbsp;
+ {% endif %}
+ {% if paper.fatcat_ident %}
+ <a href="https://fatcat.wiki/release/{{paper.fatcat_ident}}" style="color: green;">fatcat:{{ paper.fatcat_ident}}</a> &nbsp;
+ {% endif %}
+
+ {# ### SOURCE TAGS #}
+ <div style="margin-top: 0.2em;">
+ {% if paper.cord19_uid or 'cord19' in paper.source_tags %}
+ <a href="https://pages.semanticscholar.org/coronavirus-research">
+ <span class="ui label small">CORD-19</span>
+ </a>
+ {% endif %}
+ {% if 'fatcat' in paper.source_tags %}
+ <a href="https://fatcat.wiki">
+ <span class="ui label small">fatcat</span>
+ </a>
+ {% endif %}
+ {% if 'who' in paper.source_tags %}
+ <a href="https://www.who.int/emergencies/diseases/novel-coronavirus-2019/global-research-on-novel-coronavirus-2019-ncov">
+ <span class="ui blue label small">WHO</span>
+ </a>
+ {% endif %}
+ {% if 'wanfang' in paper.source_tags %}
+ <a href="http://subject.med.wanfangdata.com.cn/Channel/7">
+ <span class="ui olive label small">Wanfang</span>
+ </a>
+ {% endif %}
+ {% if 'cnki' in paper.source_tags %}
+ <a href="http://en.gzbd.cnki.net/GZBT/brief/Default.aspx">
+ <span class="ui brown label small">CNKI</span>
+ </a>
+ {% endif %}
+ {# olive, brown, grey, pink, red, etc #}
+ </div>
+
+</div>
+<div class="three wide left aligned column" style="padding-top: 3em; padding-right: 0em;">
+ {% if paper.fulltext.thumbnail_url %}
+ {# <img src="{{ settings.COVID19_FULLTEXT_HOST }}{{ paper.fulltext.thumbnail_url }}" style="border: 1px solid grey; max-height: 12em; max-width: 100%;"> #}
+
+ <div class="ui card">
+ <a class="image"
+ {% if paper.fulltext.ia_pdf_url %}
+ href="{{ paper.fulltext.ia_pdf_url }}"
+ {% else %}
+ href="{{ settings.COVID19_FULLTEXT_HOST }}{{ paper.fulltext.pdf_url }}"
+ {% endif %}>
+ <img src="{{ settings.COVID19_FULLTEXT_HOST }}{{ paper.fulltext.thumbnail_url }}">
+ </a>
+ {#
+ <div class="content">
+ <div class="meta">
+ <span>PDF</span>
+ </div>
+ </div>
+ #}
+ </div>
+
+ </a>
+ <br>
+ {% else %}
+ {# No Fulltext #}
+ {% endif %}
+{# should we include these little links?
+ <code style="font-size: 0.9rem; padding-left: 0.5em;">
+ {% if paper.fulltext.pdf_url %}
+ <a href="{{ settings.COVID19_FULLTEXT_HOST }}{{ paper.fulltext.pdf_url }}">mirror</a>
+ {% endif %}
+ {% if paper.fulltext.grobid_xml_url %}
+ <a href="{{ settings.COVID19_FULLTEXT_HOST }}{{ paper.fulltext.grobid_xml_url }}">xml</a>
+ {% endif %}
+ </code>
+#}
+</div>
+</div>
+{% endmacro %}