From f3d286d92088a2f7038e0635a85a09c7de322147 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 23 Apr 2020 18:26:11 -0700 Subject: web search: improve indentation, fix missing div tags These are back-ported fixes from covid19.fatcat.wiki --- python/fatcat_web/templates/container_search.html | 89 ++++++++++++----------- python/fatcat_web/templates/release_search.html | 59 ++++++++------- 2 files changed, 81 insertions(+), 67 deletions(-) (limited to 'python') diff --git a/python/fatcat_web/templates/container_search.html b/python/fatcat_web/templates/container_search.html index 1a089643..1a804595 100644 --- a/python/fatcat_web/templates/container_search.html +++ b/python/fatcat_web/templates/container_search.html @@ -9,6 +9,7 @@ {% endif %} {% endblock %} + {% block fullmain %}
@@ -17,8 +18,7 @@
- - +

Can also lookup by identifier or search releases.
@@ -30,49 +30,56 @@
{% if found %} -{% if found.results %} - {{ entity_macros.top_results(found) }} + {% if found.results %} -{% for entity in found.results %} -
-

- {{ entity['name'] }} - {% if entity.is_oa %}{% endif %} -

- {% if entity.publisher %} -
{{ entity.publisher }}
- {% endif %} - {% if entity.issnl %} - issn:{{ entity.issnl }} - {% endif %} - {% if entity.container_type %} -  {{ entity.container_type }} - {% endif %} -
-{% endfor %} -{% if found.results|length > 8 %} -
-
- {{ entity_macros.bottom_results(found, endpoint='container_search')}} -
-{% endif %} -{% else %} + {{ entity_macros.top_results(found) }} -Raw query was: {{ found.query.q }} + {% for entity in found.results %} +
+

+ {{ entity['name'] }} + {% if entity.is_oa %}{% endif %} +

+ {% if entity.publisher %} +
{{ entity.publisher }}
+ {% endif %} + {% if entity.issnl %} + issn:{{ entity.issnl }} + {% endif %} + {% if entity.container_type %} +  {{ entity.container_type }} + {% endif %} +
+ {% endfor %} + + {% if found.results|length > 8 %} +
+
+ {{ entity_macros.bottom_results(found, endpoint='container_search') }} +
+ {% endif %} -
-
-
- confused paper man + {% else %} + + Raw query was: {{ found.query.q }} + +
+
+
+ confused paper man +
+
+

No results found!

+

You could try elsewhere:

+ +
+
-
-

No results found!

-

You could try elsewhere:

- -
-{% endif %} + + {% endif %} + {% endif %}
diff --git a/python/fatcat_web/templates/release_search.html b/python/fatcat_web/templates/release_search.html index 47f4330a..70c46c0a 100644 --- a/python/fatcat_web/templates/release_search.html +++ b/python/fatcat_web/templates/release_search.html @@ -35,37 +35,44 @@
{% if found %} -{% if found.results %} + {% if found.results %} + {{ entity_macros.top_results(found) }} - {% for paper in found.results %} - {{ entity_macros.release_search_result_row(paper) }} -{% endfor %} -{% if found.results|length > 8 %} -
-
- {{ entity_macros.bottom_results(found)}} -
-{% endif %} -{% else %} + {% for paper in found.results %} + {{ entity_macros.release_search_result_row(paper) }} + {% endfor %} + + {% if found.results|length > 8 %} +
+
+ {{ entity_macros.bottom_results(found, endpoint='release_search') }} +
+ {% endif %} + + {% else %} -Raw query was: {{ found.query.q }} + Raw query was: {{ found.query.q }} -
-
-
- confused paper man +
+
+
+ confused paper man +
+
+

No results found!

+

You could try elsewhere:

+ +
+
-
-

No results found!

-

You could try elsewhere:

- -
-{% endif %} + + {% endif %} + {% endif %}
-- cgit v1.2.3