feat: display teamers' average ratings in several locations

This commit is contained in:
Björn Fromme
2024-01-10 13:05:47 +01:00
parent 7215b3077b
commit 159ea37a42
9 changed files with 49 additions and 14 deletions
@@ -0,0 +1,6 @@
{% set averageRating = teamer.averageRating %}
<div class="inline-flex items-center"{% if teamer.averageRating %}{{ stimulus_controller('tooltip', { content: averageRating|format_rating|raw, placement: 'top' }) }}{% endif %}>
{% for grade in range(1, 6) %}
{{ icon('star', html_classes('w-3 h-3', { 'text-gray-200': averageRating < grade * 100, 'text-primary': averageRating >= grade * 100 })) }}
{% endfor %}
</div>