From 1301f6ba6c6ea31bdbcd3619d7f235912726f30a Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 28 Jul 2020 15:54:44 -0700 Subject: refactor search macros into new file --- python/fatcat_web/templates/entity_macros.html | 40 -------------------------- 1 file changed, 40 deletions(-) (limited to 'python/fatcat_web/templates/entity_macros.html') diff --git a/python/fatcat_web/templates/entity_macros.html b/python/fatcat_web/templates/entity_macros.html index 0e7f135a..ab0e817a 100644 --- a/python/fatcat_web/templates/entity_macros.html +++ b/python/fatcat_web/templates/entity_macros.html @@ -262,43 +262,3 @@ yellow {% endif %} {%- endmacro %} -{% macro top_results(query, found) -%} - -Showing - {% if found.offset == 0 %} - first - {% else %} - results {{ found.offset }} — - {% endif %} - - {{ found.offset + found.count_returned }} - out of {{ found.count_found }} results - - -{%- endmacro %} - - -{% macro bottom_results(query, found, endpoint='release_search') -%} - -{% if found.offset > 0 %} - {% if found.offset - found.limit < 0 %} - « Previous - {% else %} - « Previous - {% endif %} -{% else %} - « Previous -{% endif %} - -  Showing results {{ found.offset }} — {{ found.offset + -found.count_returned }} out of {{ found.count_found }} results   - -{% if found.offset + found.limit < found.count_found and found.offset + found.limit < found.deep_page_limit %} - Next » - {% else %} - Next » -{% endif %} - - - -{%- endmacro %} -- cgit v1.2.3 From 720ab57430e48d7e84b5dac3b56ffeb67ee87967 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 28 Jul 2020 18:43:48 -0700 Subject: switch SERP stage coloring to brown uppercase To match fatcat-scholor, where this scheme has been successful. --- python/fatcat_web/templates/entity_macros.html | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'python/fatcat_web/templates/entity_macros.html') diff --git a/python/fatcat_web/templates/entity_macros.html b/python/fatcat_web/templates/entity_macros.html index ab0e817a..8e4c4f6a 100644 --- a/python/fatcat_web/templates/entity_macros.html +++ b/python/fatcat_web/templates/entity_macros.html @@ -162,12 +162,10 @@ {# release type suffix #} {% if paper.release_type in ("article-journal", "paper-conference") %} {# pass #} - {% elif paper.release_type in ("book", "chapter", "dataset") %} - [{{ paper.release_type }}] {% elif not paper.release_type %} - [unknown-media] + [unknown] {% else %} - [{{ paper.release_type }}] + [{{ paper.release_type }}] {% endif %} {# show original_title #} @@ -212,17 +210,17 @@ {% endif %} {% if paper.container_is_oa %}{% endif %} {% endif %} - {% if paper.withdrawn_status %} - [{{ paper.withdrawn_status }}] - {% endif %} - {% if paper.release_stage == "accepted" %} - [{{ paper.release_stage }} manuscript] - {% elif paper.release_stage == "submitted" %} - [pre-print] + + {% if paper.release_stage == "submitted" %} + pre-print {% elif paper.release_stage and paper.release_stage != "published" %} - [{{ paper.release_stage }}] + {{ paper.release_stage }} version {% elif not paper.release_stage %} - [unpublished?] + unpublished + {% endif %} + + {% if paper.withdrawn_status %} + {{ paper.withdrawn_status }} {% endif %} {# ### IDENTIFIERS #} -- cgit v1.2.3