diff options
Diffstat (limited to 'fatcat_scholar/templates/search_macros.html')
-rw-r--r-- | fatcat_scholar/templates/search_macros.html | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html index 0e6b3f0..5552dc3 100644 --- a/fatcat_scholar/templates/search_macros.html +++ b/fatcat_scholar/templates/search_macros.html @@ -489,24 +489,26 @@ {% macro search_pagination(hits, top) %} {% if hits.offset > 0 %} - <button class="text-button" form="search_form" type="submit" name="offset" value="{{ hits.offset - hits.limit }}" style="margin-right: 2em;" rel="prev"> + <button class="text-button" form="search_form" type="submit" name="offset" value="{{ hits.offset - hits.limit }}" style="float: left;" rel="prev"> <a>« {% trans %}Previous{% endtrans %}</a> </button> {% else %} - <span style="color:rgba(0,0,0,0.55); margin-right: 2em;">« {% trans %}Previous{% endtrans %}</span> + <span style="color:rgba(0,0,0,0.55); float: left">« {% trans %}Previous{% endtrans %}</span> {% endif %} + +{% if hits.offset + hits.limit < hits.count_found %} +<button class="text-button" form="search_form" type="submit" name="offset" value="{{ hits.offset + hits.limit }}" style="float: right;" rel="next"> + <a>{% trans %}Next{% endtrans %} »</a> +</button> +{% else %} + <span style="color:rgba(0,0,0,0.55); float: right;">{% trans %}Next{% endtrans %} »</span> +{% endif %} + <i> {% trans trimmed start=(hits.offset + 1), end=(hits.offset + hits.limit), total="{:,}".format(hits.count_found) %} Showing results {{ start }} — {{ end }} out of {{ total }} results {% endtrans %} </i> -{% if hits.offset + hits.limit < hits.count_found %} -<button class="text-button" form="search_form" type="submit" name="offset" value="{{ hits.offset + hits.limit }}" style="margin-left: 2em;" rel="next"> - <a>{% trans %}Next{% endtrans %} »</a> -{% else %} - <span style="color:rgba(0,0,0,0.55); margin-left: 2em;">{% trans %}Next{% endtrans %} »</span> -{% endif %} -</button> {% endmacro %} {% macro query_option(options, selected) -%} |