moviewyrm/bookwyrm/templates/snippets/stars.html

8 lines
422 B
HTML
Raw Normal View History

2021-01-31 18:34:25 +00:00
<p class="stars">
2020-11-10 05:15:55 +00:00
<span class="is-sr-only">{% if rating %}{{ rating|floatformat }} star{{ rating|floatformat | pluralize }}{% else %}No rating{% endif %}</span>
2020-04-03 19:43:49 +00:00
{% for i in '12345'|make_list %}
2021-01-31 18:34:25 +00:00
<span class="icon 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>