From 892da3ccc83f398eb9f92785e79ac624894fbabe Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 19 Jan 2021 19:43:26 -0800 Subject: html: new dropdown main link --- fatcat_scholar/templates/base.html | 20 +-- fatcat_scholar/templates/search_macros.html | 185 ++++++++++++++++++++-------- 2 files changed, 148 insertions(+), 57 deletions(-) diff --git a/fatcat_scholar/templates/base.html b/fatcat_scholar/templates/base.html index 56b10c3..9fd1351 100644 --- a/fatcat_scholar/templates/base.html +++ b/fatcat_scholar/templates/base.html @@ -48,7 +48,7 @@ .ui.labeled.icon.button.serp-button { padding-left: 3.0em!important; padding-right: 1em!important; - min-width: 12em; + min-width: 10em; max-width: 15em; box-shadow: 1px 1px 2px 1px rgba(0, 0, 0, 0.3); } @@ -97,9 +97,6 @@ font-size: 16px; line-height: 20px; } - .ui.serp.card { - max-width: 180px; - } div.fulltext-link { width: 180px; } @@ -109,12 +106,10 @@ } .ui.serp.card { + max-width: 180px; margin-bottom: 0.2em; border-radius: 0; } - .ui.serp.card img { - max-width: 100%; - } .hit-count { font-weight: bold; line-height: 1.28571429em; @@ -262,6 +257,17 @@ overflow: auto; } + details.access-options summary { + text-decoration: none; + color: inherit; + } + details.access-options .menu { + /* border: 1px solid black; */ + margin: 0.5em; + width: auto; + padding: 1em; + } + details.serp-action-menu[open] > summary .ui.basic.button { box-shadow: 0 0 0 1px rgba(0,0,0,.15) inset, 0 1px 4px 0 rgba(34,36,38,.15) inset; background: #f8f8f8!important; diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html index fab9510..d267cdc 100644 --- a/fatcat_scholar/templates/search_macros.html +++ b/fatcat_scholar/templates/search_macros.html @@ -50,6 +50,24 @@ {% endif %} {% endmacro %} +{% macro ia_access_button(access) -%} + {% set access_alt = _('fulltext access') %} + + + +{% endmacro %} + {% macro journal_row(biblio, paper) -%} {# NOTE: should be able to call with paper.biblio or any paper.release[] #} {% if biblio.release_year %} @@ -84,18 +102,21 @@ {% macro fulltext_search_result_row(paper, locale=None, debug_mode=False) -%}
+ +
+ {# ### TITLE ROW #}

{% if paper.doc_type == "work" %} - + {% if paper.biblio.title %} {{ paper.biblio.title[:512] }} {% if paper.biblio.title|length > 512 %}...{% endif %} {% else %} [blank] {% endif %} - + {# release type suffix #} {% if paper.biblio.release_type in ("article-journal", "paper-conference") or paper.doc_type == "sim_page" %} @@ -138,6 +159,113 @@ {# ### JOURNAL ROW #} {{ journal_row(paper.biblio, paper) }} +

+ +
+ + {# ### ABSTRACT / QUERY HIGHLIGHT #} {% if paper._highlights %}
@@ -216,7 +344,7 @@ {% elif paper.fulltext.file_mimetype == "text/xml" %} XML {% else %} - File |{{ paper.fulltext.file_mimetype }}| + File {% endif %} {% if paper.fulltext.size_bytes %} ({{ paper.fulltext.size_bytes|filesizeformat }}) @@ -287,12 +415,10 @@ {# ### VERSIONS #} {% if (paper.access and paper.access|length > 1) or (paper.releases and paper.releases|length > 1) %} - -
- - {% trans %}Other Versions{% endtrans %} -
-
+
+ + {% trans %}Multiple Versions{% endtrans %} +
{% endif %} {# ### COLLAPSED HITS #} @@ -340,47 +466,6 @@
-{# ### VERSIONS MODAL #} - - - -

{% trans %}Access Options{% endtrans %}

- {% if paper.fulltext and paper.fulltext.thumbnail_url %} - - fulltext thumbnail - - {% endif %} - - {% for access in paper.access %} - {% if access.access_type == "ia_sim" %} -

There is a digitized microfilm copy at archive.org. - {% elif access.access_type == "ia_file" %} -

There is a {{ access.mimetype }} file at archive.org. - {% elif access.access_type == "wayback" %} -

There is a {{ access.mimetype }} file in The Wayback Machine. - {% else %} -

Some other access here. - {% endif %} - {% endfor %} - {% if paper.biblio.doi %} -

You can visit the publisher landing page. - {% endif %} - - {% if paper.releases|length > 1 %} -

All Versions

- {% for release in paper.releases %} -
- {{ journal_row(release, paper) }} -
- {{ external_identifiers(release) }} -
-
- {% endfor %} - {% endif %} -
-
{# final row close #} {% endmacro %} -- cgit v1.2.3