From 4f75995e05f004ab05cbf162e414bcc310eef405 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 21 Jan 2021 12:59:17 -0800 Subject: html: many tweaks and improvements --- fatcat_scholar/templates/base.html | 3 + fatcat_scholar/templates/search.html | 2 + fatcat_scholar/templates/search_macros.html | 90 +++++++++++++++++------------ 3 files changed, 58 insertions(+), 37 deletions(-) (limited to 'fatcat_scholar/templates') diff --git a/fatcat_scholar/templates/base.html b/fatcat_scholar/templates/base.html index 354f111..f284cb2 100644 --- a/fatcat_scholar/templates/base.html +++ b/fatcat_scholar/templates/base.html @@ -77,12 +77,14 @@ @media only screen and (max-width: 767px) { .mobile-hide { display: none !important; } + .ui.items>.item>.image:not(.ui) { width: auto }; } @media only screen and (min-width: 768px) { .mobile-only { display: none !important; } } @media only screen and (max-width: 991px) { .tablet-hide { display: none !important; } + .ui.items>.item>.image:not(.ui) { width: auto }; .ui.grid>[class*="fourteen wide"].column.serp-column { width: 100% !important; box-shadow: none !important; @@ -215,6 +217,7 @@ } details.access-options .meta { width: 100%; + white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: underline; diff --git a/fatcat_scholar/templates/search.html b/fatcat_scholar/templates/search.html index 85c6a89..e7ccc1b 100644 --- a/fatcat_scholar/templates/search.html +++ b/fatcat_scholar/templates/search.html @@ -38,6 +38,7 @@ {{ search_macros.query_option(query.type_options, query.filter_type) }} {{ search_macros.query_option(query.availability_options, query.filter_availability) }} {{ search_macros.query_option(query.sort_options, query.sort_order) }} + {{ search_macros.clear_query(query) }} @@ -94,6 +95,7 @@ {{ search_macros.query_option(query.type_options, query.filter_type) }} {{ search_macros.query_option(query.availability_options, query.filter_availability) }} {{ search_macros.query_option(query.sort_options, query.sort_order) }} + {{ search_macros.clear_query(query) }} diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html index 3ef5174..a9ac528 100644 --- a/fatcat_scholar/templates/search_macros.html +++ b/fatcat_scholar/templates/search_macros.html @@ -1,7 +1,7 @@ {% macro tag_label(tag) -%} {% if tag == "oa" %} - OA + {% trans %}Open Access{% endtrans %} {% elif tag == "jstor" %} JSTOR {% elif tag == "scielo" %} @@ -17,6 +17,8 @@ Szczepanski {% elif tag == "doaj" %} DOAJ + {% elif tag == "multiple-versions" %} + {% trans %}Multiple Versions{% endtrans %} {% elif tag.startswith("lang:") %} {{ tag }} {% else %} @@ -65,31 +67,25 @@ @@ -544,6 +551,15 @@
{% endmacro %} +{% macro clear_query(query) -%} + {% if query.filter_time or query.filter_type or query.filter_availability or query.sort_order %} +
+ {% trans %}Clear Filters{% endtrans %} +
+
+ {% endif %} +{% endmacro %} + {% macro query_hidden(options, selected) -%} {% if selected %} -- cgit v1.2.3