From 9ab023c1cd13c867f393907cb50ea20b0e4c630b Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 13 Jan 2021 18:10:15 -0800 Subject: serp: replace thumbnails with vertical buttons --- fatcat_scholar/templates/base.html | 10 +++ fatcat_scholar/templates/search_macros.html | 109 ++++++++++++++++++++-------- 2 files changed, 87 insertions(+), 32 deletions(-) (limited to 'fatcat_scholar') diff --git a/fatcat_scholar/templates/base.html b/fatcat_scholar/templates/base.html index 595b8c9..268d97a 100644 --- a/fatcat_scholar/templates/base.html +++ b/fatcat_scholar/templates/base.html @@ -35,6 +35,16 @@ nav.ui.inverted.menu .item:before { background: none; } nav.ui.menu { border-radius: 0; } + .ui.button.serp_button { + border-radius: 0; + margin-bottom: 0.3em; + text-align: left; + } + + .ui.blue.button.serp_button { + background-color: #2224c7ad; + } + @media only screen and (max-width: 767px) { .mobile-hide { display: none !important; } } diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html index b7ff922..3ce49f6 100644 --- a/fatcat_scholar/templates/search_macros.html +++ b/fatcat_scholar/templates/search_macros.html @@ -189,11 +189,78 @@ {{ tag_label("lang:" + paper.biblio.lang_code) }} {% endif %} + + + + +
+ {# ### ACCESS LINKS #} + + {# trusted platform fulltext links #} + {# TODO: DOAJ, dblp #} + {% if paper.biblio.arxiv_id %} + + + + {% elif paper.biblio.pmid %} + + + + {% endif %} + + {# publisher (DOI) link #} + {# TODO: detect prefix? JSTOR, biorxiv, medrxiv, zenodo, figshare, dryad, etc #} + {% if paper.biblio.doi %} + + + + {% endif %} + + {# archive links (if available) #} + {% if paper.fulltext and paper.fulltext.access_url %} + {% if paper.fulltext.file_mimetype == "application/pdf" %} + {% set access_alt = _('fulltext PDF download') %} + {% elif paper.fulltext.access_type == "ia_sim" %} + {% set access_alt = _('read fulltext microfilm') %} + {% else %} + {% set access_alt = _('fulltext access') %} + {% endif %} + + + + {% endif %} + + + {# ### VERSIONS #} {% if (paper.access and paper.access|length > 1) or (paper.releases and paper.releases|length > 1) %} -