summaryrefslogtreecommitdiff
path: root/templates/_film_card.html
diff options
context:
space:
mode:
authorTyler Hoang <tyler@tylerhoang.xyz>2026-05-06 14:34:01 -0700
committerTyler Hoang <tyler@tylerhoang.xyz>2026-05-06 14:34:01 -0700
commita3df69ff5218cee132a6def9d860cd0276cc0cd4 (patch)
tree2d8bf71b98a606b2f1194ce608c23a8e17d8cb6c /templates/_film_card.html
parente708bec6cd76c2686de4158dde4d04f72a3c300d (diff)
Add year review and inline diary ratings
Diffstat (limited to 'templates/_film_card.html')
-rw-r--r--templates/_film_card.html14
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>