moviewyrm/bookwyrm/templates/snippets/stars.html

9 lines
462 B
HTML
Raw Normal View History

2021-02-28 02:48:10 +00:00
{% load i18n %}
2021-01-31 18:34:25 +00:00
<p class="stars">
2021-02-28 02:48:10 +00:00
<span class="is-sr-only">{% if rating %}{{ rating|floatformat }} star{{ rating|floatformat | pluralize }}{% else %}{% trans "No rating" %}{% endif %}</span>
2020-04-03 19:43:49 +00:00
{% for i in '12345'|make_list %}
2021-02-23 22:00:19 +00:00
<span class="icon is-small mr-1 icon-star-{% if rating >= forloop.counter %}full{% elif rating|floatformat:0 >= forloop.counter|floatformat:0 %}half{% else %}empty{% endif %}" aria-hidden="true">
2020-04-03 19:43:49 +00:00
</span>
{% endfor %}
2021-01-31 18:34:25 +00:00
</p>