moviewyrm/bookwyrm/templates/snippets/stars.html

9 lines
364 B
HTML
Raw Normal View History

2020-04-03 19:43:49 +00:00
<div class="stars">
2020-04-03 20:58:14 +00:00
<span class="hidden-text">{{ 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>