From 5096b0b7407aadfb97093615696f951829dc3506 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 21 Jan 2021 18:25:23 -0800 Subject: move a bit more CSS out of HTML --- fatcat_scholar/static/scholar.css | 23 +++++++++++++++++++++- fatcat_scholar/templates/search_macros.html | 30 +++++++++++++++-------------- 2 files changed, 38 insertions(+), 15 deletions(-) diff --git a/fatcat_scholar/static/scholar.css b/fatcat_scholar/static/scholar.css index 2d506d5..fcf0349 100644 --- a/fatcat_scholar/static/scholar.css +++ b/fatcat_scholar/static/scholar.css @@ -37,6 +37,9 @@ nav.ui.menu { .ui.basic.blue.button.serp-button > .icon { background-color: transparent; } +.ui.button.serp-button > .ia-icon { + background: no-repeat center / 50% url('/static/ia-favicon.ico'); +} .ui.labeled.icon.button.serp-button { padding-left: 3.0em!important; @@ -156,10 +159,18 @@ nav.ui.menu { } /* for fulltext search result highlighting */ -.search_highlights em { +.search-highlights em { font-style: normal; font-weight: bold; } +.search-highlights { + padding-top: 0.5em; + padding-bottom: 0.5em +} + +.tag-row { + margin-top: 0.2em; +} .search_filters summary::marker { display: none; @@ -210,6 +221,12 @@ details.access-options .meta { text-decoration: underline; } +.serp-right-col { + padding-top: 0.5em; + padding-right: 0.5em; + min-width: 10em; +} + 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; @@ -260,6 +277,10 @@ details.serp-action-menu > .citation-menu { padding-bottom: 0!important; } +.external-identifiers > a { + color: green; +} + .translate-icon { display: inline-block; vertical-align: middle; diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html index 66f8ebe..f580cee 100644 --- a/fatcat_scholar/templates/search_macros.html +++ b/fatcat_scholar/templates/search_macros.html @@ -28,28 +28,30 @@ {% endmacro %} {% macro external_identifiers(biblio) -%} - {# NOTE: should be able to call with paper.biblio or any paper.release[] #} +{# NOTE: should be able to call with paper.biblio or any paper.release[] #} + {% if biblio.doi %} - doi:{{ biblio.doi }}   + doi:{{ biblio.doi }}   {% endif %} {% if biblio.pmid %} - pmid:{{ biblio.pmid }}   + pmid:{{ biblio.pmid }}   {% endif %} {% if biblio.pmcid %} - pmcid:{{ biblio.pmcid }}   + pmcid:{{ biblio.pmcid }}   {% endif %} {% if biblio.arxiv_id %} - arXiv:{{ biblio.arxiv_id }}   + arXiv:{{ biblio.arxiv_id }}   {% endif %} {% if biblio.dblp_id %} - dblp:{{ biblio.dblp_id }}   + dblp:{{ biblio.dblp_id }}   {% endif %} {% if biblio.doaj_id %} - doaj:{{ biblio.doaj_id }}   + doaj:{{ biblio.doaj_id }}   {% endif %} {% if biblio.release_ident or biblio.ident %} - fatcat:{{ biblio.release_ident or biblio.ident }}   + fatcat:{{ biblio.release_ident or biblio.ident }}   {% endif %} + {% endmacro %} {% macro ia_access_button(access, show_thumbnail=False, other_version=False) -%} @@ -65,7 +67,7 @@ {% endif %}