diff options
| author | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-05-06 14:34:01 -0700 |
|---|---|---|
| committer | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-05-06 14:34:01 -0700 |
| commit | a3df69ff5218cee132a6def9d860cd0276cc0cd4 (patch) | |
| tree | 2d8bf71b98a606b2f1194ce608c23a8e17d8cb6c /templates/_film_card.html | |
| parent | e708bec6cd76c2686de4158dde4d04f72a3c300d (diff) | |
Add year review and inline diary ratings
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> |
