moviewyrm/bookwyrm/templates/snippets/stars.html

9 lines
363 B
HTML
Raw Normal View History

2020-04-03 19:43:49 +00:00
<div class="stars">
2020-09-30 22:10:37 +00:00
<span class="is-sr-only">{{ rating|floatformat }} star{{ rating|floatformat | pluralize }}</span>
2020-04-03 19:43:49 +00:00
{% for i in '12345'|make_list %}
2020-04-03 20:58:14 +00:00
<span class="icon icon-star-{% if rating >= forloop.counter %}full{% elif rating|floatformat:0 >= forloop.counter|floatformat:0 %}half{% else %}empty{% endif %}">
2020-04-03 19:43:49 +00:00
</span>
{% endfor %}
</div>