From a24615d3d3ee3f0d4a523e3c8055be32093ff65e Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 14 Jan 2021 14:56:54 -0800 Subject: WIP: model pop-ups --- fatcat_scholar/templates/base.html | 62 ++++++- fatcat_scholar/templates/search_macros.html | 260 +++++++++++++++++----------- 2 files changed, 221 insertions(+), 101 deletions(-) diff --git a/fatcat_scholar/templates/base.html b/fatcat_scholar/templates/base.html index 268d97a..1cc9e86 100644 --- a/fatcat_scholar/templates/base.html +++ b/fatcat_scholar/templates/base.html @@ -35,16 +35,21 @@ nav.ui.inverted.menu .item:before { background: none; } nav.ui.menu { border-radius: 0; } - .ui.button.serp_button { + .ui.button.serp-button { border-radius: 0; margin-bottom: 0.3em; text-align: left; } - .ui.blue.button.serp_button { + .ui.blue.button.serp-button { background-color: #2224c7ad; } + .ui.labeled.icon.button.serp-button { + padding-left: 3.5em!important; + padding-right: 1em!important; + } + @media only screen and (max-width: 767px) { .mobile-hide { display: none !important; } } @@ -181,6 +186,59 @@ cursor: pointer; display: inline-block; } + + .modal-overlay { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + background: rgba(0,0,0,0.5); + transition: opacity 200ms; + visibility: hidden; + opacity: 0; + } + .modal-overlay .cancel { + position: absolute; + width: 100%; + height: 100%; + cursor: default; + } + .modal-overlay:target { + visibility: visible; + opacity: 1; + } + + .modal-popup { + margin: 75px auto; + padding: 20px; + background: #fff; + border: 1px solid #666; + width: 300px; + box-shadow: 0 0 50px rgba(0,0,0,0.5); + position: relative; + } + .modal-popup .close { + position: absolute; + width: 20px; + height: 20px; + top: 20px; + right: 20px; + opacity: 0.8; + transition: all 200ms; + font-size: 24px; + font-weight: bold; + text-decoration: none; + color: #666; + } + .modal-popup:hover { + opacity: 1; + } + .modal-popup .content { + max-height: 400px; + overflow: auto; + } + {% if paper.doc_type == "work" %} - + {% if paper.biblio.title %} {{ paper.biblio.title[:512] }} {% if paper.biblio.title|length > 512 %}...{% endif %} @@ -235,136 +235,198 @@ {% set access_alt = _('fulltext access') %} {% endif %} - {% endif %} - + {# publisher #} + {% if paper.biblio.doi %} + + + + {% endif %} + + {# trusted platform fulltext links #} + {# TODO: DOAJ, dblp #} + {% if paper.biblio.arxiv_id %} + + + + {% elif paper.biblio.pmcid %} + + + + {% endif %} {# ### VERSIONS #} {% if (paper.access and paper.access|length > 1) or (paper.releases and paper.releases|length > 1) %} - -
- {% if paper.fulltext and paper.fulltext.access_url and paper.fulltext.thumbnail_url and 0 %} - {% 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') %} + {# ### OTHER ACTIONS #} + + + + + + + + {# ### CITATION MODAL #} + +

Cite Paper

+ Something something bibtex will go here. +
+ + {# ### VERSIONS MODAL #} + +

Paper Versions

+ {% if paper.fulltext.thumbnail_url %} + fulltext thumbnail +
{% endif %} + There are several versions of this paper! + + + + + + + + + + + + {% for release in paper.releases %} + + + + + + + {% endfor %} + {% for access in paper.access %} + {% if not access.release_ident and access.access_type == "ia_sim" %} + + + + + + + {% endif %} + {% endfor %} + +
{{ _("Publication Stage") }}{{ _("Date") }}{{ _("Fulltext") }}{{ _("Metadata") }}
+ + {{ release.release_stage or _("unknown") }} + + + {% if release.release_date %} + {{ release.release_date }} + {% elif release.release_year %} + {{ release.release_year }} + {% endif %} + + {% for access in paper.access %} + {% if access.release_ident == release.ident %} + + + {% if access.mimetype == "application/pdf" %} + + {% endif %} + {{ access.access_type }} + + + {% endif %} + {% endfor %} + + + + + fatcat + + +
+ + {{ _("published") }} + + + + + + {{ _("microfilm") }} + + +
+ +
- -
- fulltext thumbnail -
-
- {% else %} - {# No Fulltext #} - {% endif %}
{% endmacro %} -- cgit v1.2.3