From 5dd7a15db9656fc28f26dac77e5e9f6dc0d4dbc9 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 20 Oct 2020 15:02:51 -0700 Subject: html: several small tweaks and accessibility improvements --- fatcat_scholar/templates/search_macros.html | 48 +++++++++++++++-------------- 1 file changed, 25 insertions(+), 23 deletions(-) (limited to 'fatcat_scholar/templates/search_macros.html') diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html index 66dd975..a114986 100644 --- a/fatcat_scholar/templates/search_macros.html +++ b/fatcat_scholar/templates/search_macros.html @@ -20,7 +20,7 @@ {% elif tag.startswith("lang:") %} {{ tag }} {% else %} - {{ _(tag) }} + {{ _(tag) }} {% endif %} {% endmacro %} @@ -28,7 +28,7 @@
{# ### TITLE ROW #} -
+

{% if paper.doc_type == "work" %} @@ -65,11 +65,11 @@ [{{ _("page") }}] {% endif %} -

+ {# ### AUTHOR ROW #} {% if paper.biblio.contrib_names %} -
+
{{ ", ".join(paper.biblio.contrib_names[:12]) }} {% if paper.biblio.contrib_names|length > 12 %}(+{{ paper.biblio.contrib_names|length - 12 }} others){% endif %}
@@ -260,22 +260,25 @@
{% if paper.fulltext and paper.fulltext.access_url %} - {% if paper.fulltext.thumbnail_url %} - + {% if paper.fulltext.file_mimetype == "application/pdf" %} + {% set access_alt = _('fulltext PDF download') %} + {% elif paper.fulltext.access_type == "ia_sim" %} + {% set access_alt = _('read fulltext microfilm') %} {% else %} -
- - - -
+ {% set access_alt = _('fulltext access') %} {% endif %} + + + {% if paper.fulltext.thumbnail_url %} +
+ fulltext thumbnail +
+ {% else %} +
+ +
+ {% endif %}
+ {% else %} {# No Fulltext #} {% endif %} @@ -298,11 +300,11 @@ {% macro search_pagination(hits, top) %} {% if hits.offset > 0 %} - {% else %} - « {% trans %}Previous{% endtrans %} + « {% trans %}Previous{% endtrans %} {% endif %} {% trans trimmed start=hits.offset, end=(hits.offset + hits.limit), total="{:,}".format(hits.count_found) %} @@ -310,10 +312,10 @@ {% endtrans %} {% if hits.offset + hits.limit < hits.count_found %} - {% endmacro %} -- cgit v1.2.3