diff options
Diffstat (limited to 'templates/_film_card.html')
| -rw-r--r-- | templates/_film_card.html | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/templates/_film_card.html b/templates/_film_card.html index 9fcd89b..7147a1e 100644 --- a/templates/_film_card.html +++ b/templates/_film_card.html @@ -21,7 +21,19 @@ {% endif %} </p> </div> - {% if film.stars %} + {% if film.shelf == 'diary' %} + <div class="star-control" role="group" aria-label="Rate film" data-film-id="{{ film.id }}" data-current-stars="{{ film.stars }}"> + {% for value in range(1, 4) %} + <button + type="button" + class="star-button {% if film.stars >= value %}is-active{% endif %}" + data-stars="{{ value }}" + aria-label="{{ value }} star{% if value > 1 %}s{% endif %}" + aria-pressed="{% if film.stars >= value %}true{% else %}false{% endif %}" + >✦</button> + {% endfor %} + </div> + {% elif film.stars %} <span class="rating">{% for _ in range(film.stars) %}✦{% endfor %}</span> {% endif %} </div> |
