From 6976b6868cdf0628aa79d47aab4e889a9ccfc0dc Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 8 Feb 2022 19:02:34 -0800 Subject: container SERP: fix layout on mobile --- python/fatcat_web/templates/container_search.html | 7 +- python/fatcat_web/templates/entity_macros.html | 109 +++++++++++----------- 2 files changed, 62 insertions(+), 54 deletions(-) (limited to 'python/fatcat_web') diff --git a/python/fatcat_web/templates/container_search.html b/python/fatcat_web/templates/container_search.html index f091fc3b..0031a0a8 100644 --- a/python/fatcat_web/templates/container_search.html +++ b/python/fatcat_web/templates/container_search.html @@ -33,7 +33,12 @@ {% if found %} {% if found.results %} - {{ search_macros.top_results(query, found) }} +
+
+ Content Status +
+ {{ search_macros.top_results(query, found) }} +

{% for entity in found.results %} diff --git a/python/fatcat_web/templates/entity_macros.html b/python/fatcat_web/templates/entity_macros.html index b801f3c5..6ad63a14 100644 --- a/python/fatcat_web/templates/entity_macros.html +++ b/python/fatcat_web/templates/entity_macros.html @@ -268,9 +268,63 @@ {% macro container_search_result_row(entity, show_stats=False) -%} -
+
+
+

+ {{ entity['name'] }} +

+ {% if entity.original_name %} + {{ entity.original_name }}
+ {% endif %} + {% if entity.publisher %} + {{ entity.publisher }} +
+ {% endif %} + {% if entity.issnl %} + issnl:{{ entity.issnl }}   + {% endif %} + {% if entity.wikidata_qid %} + wikidata:{{ entity.wikidata_qid }}   + {% endif %} + {% if entity.dblp_prefix %} + dblp:{{ entity.dblp_prefix }}   + {% endif %} + {% if entity.ia_sim_collection %} + [archive.org]   + {% elif entity.sim_pubid %} + [archive.org]   + {% endif %} + {# too much clutter + {% if entity.country_code %} + country:{{ entity.country_code }}   + {% endif %} + {% for lang in entity.languages %} + lang:{{ lang }}   + {% endfor %} + {% if entity.any_kbart %} + [KBART]   + {% endif %} +
+ #} + {% if entity.in_doaj %} + [DOAJ]   + {% endif %} + {% if entity.in_road %} + [ROAD]   + {% endif %} + {% if entity.is_oa and not (entity.in_doaj or entity.in_road) %} + [open-access]   + {% endif %} + {% if entity.container_type and entity.container_type != "journal" %} + [{{ entity.container_type }}]   + {% endif %} + {% if entity.publication_status and entity.publication_status != "active" %} + {{ entity.publication_status }}   + {% endif %} +
+ {% if show_stats %} -
+
{% if entity.releases_total %} ~{{ "{:,}".format(entity.releases_total) }} releases {% elif entity.releases_total == 0 %} @@ -281,57 +335,6 @@ {% endif %}
{% endif %} -

- {{ entity['name'] }} -

- {% if entity.original_name %} - {{ entity.original_name }}
- {% endif %} - {% if entity.publisher %} - {{ entity.publisher }} -
- {% endif %} - {% if entity.issnl %} - issnl:{{ entity.issnl }}   - {% endif %} - {% if entity.wikidata_qid %} - wikidata:{{ entity.wikidata_qid }}   - {% endif %} - {% if entity.dblp_prefix %} - dblp:{{ entity.dblp_prefix }}   - {% endif %} - {% if entity.ia_sim_collection %} - [archive.org]   - {% elif entity.sim_pubid %} - [archive.org]   - {% endif %} - {# too much clutter - {% if entity.country_code %} - country:{{ entity.country_code }}   - {% endif %} - {% for lang in entity.languages %} - lang:{{ lang }}   - {% endfor %} - {% if entity.any_kbart %} - [KBART]   - {% endif %} -
- #} - {% if entity.in_doaj %} - [DOAJ]   - {% endif %} - {% if entity.in_road %} - [ROAD]   - {% endif %} - {% if entity.is_oa and not (entity.in_doaj or entity.in_road) %} - [open-access]   - {% endif %} - {% if entity.container_type and entity.container_type != "journal" %} - [{{ entity.container_type }}]   - {% endif %} - {% if entity.publication_status and entity.publication_status != "active" %} - {{ entity.publication_status }}   - {% endif %}
{% endmacro %} -- cgit v1.2.3